Lesson 2 of 4 · Free to read
Exercises
Exercises — Security & Supply Chain
Watch & learn
Course video
Course video
Keep a prompt log while you work. Speed without a trail is not a skill — it is luck.
Exercise 1 — Fix 3 OWASP issues in the sample app
Goal: locate and fix 3 planted OWASP issues in security_lab/.
Time: 30 minutes
Level: intermediate
Steps
cd code-examples/python/security_lab/.- Read the planted code in
app/. Find: SQL injection / SSRF / secret-in-code. - Fix each. Add a test that would have caught the issue.
Success criteria
- 3 fixes committed.
- 3 regression tests added.
AI prompt hints
- "Identify the SQL injection in this snippet. Propose a parametrised version."
Exercise 2 — SBOM + signing
Goal: build the image; generate SBOM with Syft; sign with Cosign (or simulate). Time: 25 minutes Level: intermediate
Steps
docker build -t lab .syft packages lab -o spdx-json > sbom.jsoncosign sign --key cosign.key lab(orcosign sign --keyless labfor OIDC flow)- Verify.
Success criteria
sbom.jsonexists.- Signature attached / verifiable.
AI prompt hints
- "Walk me through the cosign keyless flow; what changes vs key-based?"
Exercise 3 — Triage 3 CVEs
Goal: open CVES.md; for each, decide false / real / mitigate-now and justify.
Time: 30 minutes
Level: intermediate
Steps
- Read each CVE entry.
- For each: rate exploitability in your context; check fix availability; decide.
- Log in
TRIAGE.md.
Success criteria
- 3 decisions with reasoning that cites context (not just CVSS).
AI prompt hints
- "Summarise this CVE in 3 lines. Then list the 3 questions I should ask to decide if it's exploitable in my context."