Your goal: review a short function like a product security engineer: read before you
change, explain the flaw underneath, fix it so the classic tricks fail, and test it with
hostile inputs.
How this works (about 30 minutes)
- Marcus puts a short download helper in the shared editor. Pick Python or Java.
- Read it out loud first: what it does, what it trusts, what an attacker could send.
- Fix it in the editor and run the public tests. Tell Marcus when you want him to look.
- He'll ask for an input that would still break your fix, then what you'd change beyond
the function.
- Last, a follow-up: the reports move to a cloud storage bucket. What changes?
- No hints unless you're stuck for a while, and no scores during the call. Report after.
What scores well
- Reading the code and naming the source and the sink before typing
- The mechanism: why
../ and absolute paths escape, and why a string prefix check fails
- A fix that normalises the path and checks it is inside the folder, path by path
- Your own hostile tests, beyond the public ones
- Design beyond the patch: ids instead of paths, least privilege, logging
- A clear call on the bucket, with its trade-off
Tips
- Take Security Coach · Web App Security first.
- Say your test inputs before you run them.