Homework
Lock down secrets and crypto in your own workflow: build a scanner, rotate keys, and replace a weak primitive.
Task 1 — Secret Scanner Prompt
Objective: Build a reusable prompt that scans any text blob for secrets and outputs them as JSON (type, confidence, rotation urgency).
Instructions:
- Include common patterns: AWS, GitHub, JWT, private keys
- Output must include a rotation command
- Test on the lab's
git-history-secrets.txt
Deliverable: A prompt file and its JSON output.
Task 2 — Rotate Your Own Token
Objective: Pick one API token you personally use and rotate it.
Instructions:
- Document: the service, the old storage location, the new storage location
- Include the verification step (the new token works)
- Remove the old token from all caches / bash history / configs
Deliverable: A 150-word rotation log (no actual secret included).
Task 3 — Crypto Replacement
Objective: Find a small Python or JS project that uses MD5, SHA1, or DES and replace the primitive correctly.
Instructions:
- Use argon2 / bcrypt for passwords, SHA-256 for integrity, AES-GCM for encryption
- Show the before/after diff
- Explain any compatibility issues you had to handle
Deliverable: A patch file and a short rationale.