🔐 Lab 02: GitOps Steward - Secure Synchronization¶
Mission Scenario
You are the GitOps Steward of Atlantyqa. You've completed local analyses and now must sync results with the remote repository without leaking a single sensitive byte. Your mission: master the secure GitOps flow.
1. 🗺️ Operations Map¶
Before syncing, visualize the secure data flow.
graph TD
Local[💻 Local Analysis] -->|Generates| Raw[📂 Raw JSON]
Raw -->|Redaction| Safe[🛡️ Secure JSON]
Safe -->|Git Push| Repo[☁️ Remote Repo]
Repo -->|Deploy| Prod[🚀 Streamlit Prod]
style Local fill:#e7ae4c,stroke:#333,stroke-width:2px,color:#fff
style Raw fill:#f1f5f9,stroke:#333,stroke-width:2px,color:#182232
style Safe fill:#37a880,stroke:#333,stroke-width:2px,color:#fff
style Repo fill:#e0e7ff,stroke:#333,stroke-width:2px,color:#182232
style Prod fill:#f1f5f9,stroke:#182232,stroke-width:2px,color:#182232
2. ⚔️ Mission Execution¶
Follow the steps with surgical precision.
First, generate local data (you should have this from Lab 01).
Expected result: outputs/raw/analysis.json created.
Configure environment variables to activate the privacy shield.
Run the redaction script that masks personal information.
Critical verification: Open outputs/insights/analysis.json and confirm:
* ✅ Proper names → [REDACTED_PERSON_001]
* ✅ Emails → [REDACTED_EMAIL]
* ✅ Account numbers → [REDACTED_ACCOUNT]
Now yes, sync ONLY the secure data. The -f (force) flag is necessary because the outputs/ folder is protected by default in .gitignore.
# Force add the secure result
git add -f outputs/insights/analysis.json
# Commit with descriptive message
git commit -m "feat(data): Lab 02 submission - redacted and secure analysis"
# Push to your current branch (to simulate sync)
git push origin fix/i18n-footer-mobile
⚠️ NEVER do:
git add outputs/raw/- Contains unredacted data!
3. 📸 Compliance Evidence¶
To claim your reward (100 XP), you must present proof.
Delivery Checklist¶
- [ ] Redacted File:
outputs/insights/analysis.jsonwithout personal data. - [ ] Commit Hash: Hash of the commit you pushed to the repo.
- [ ] Screenshot: Capture of Git diff showing only secure files.
- [ ] Audit Log: Entry in
outputs/audit/gitops_sync.logwith timestamp.
📝 Template for your Pull Request
## 🔐 Lab 02 Mission Completed
- **Commit Hash:** [Insert hash]
- **Synced Files:** outputs/insights/analysis.json
- **Sensitive Data Filtered:** ✅ Yes
- **GitOps Mode:** Production
Evidence attached in /evidence folder.
4. 🛡️ Security Validation¶
Before pushing, run this automated validation to ensure data sovereignty:
Validator Code
This script is located at scripts/validate_gitops.py and is compatible with Windows and Linux.
🆘 Common Problems¶
Git rejects my push
- Did you configure the remote correctly? Check with
git remote -v - Do you have write permissions on the repo?
I don't see redacted files
Make sure environment variables are active: echo $COGNITIVE_ENV
🎯 Next Level¶
You've mastered secure synchronization. Now learn to visualize this data.