A small notes API ships next week and a pen test is booked. Any user can read and edit other people's notes, search and sort are injectable, passwords are unsalted MD5 and logs contain secrets. Fix the access control, queries, password storage and error handling.
This is the practice version. Assessments always use a variant you have never seen.
An external pen test starts on Monday, and the API launches the week after. notes/api.py routes requests to handlers (handle(db, method, path, user, params)
returns a Response). notes/auth.py stores users and passwords. SECURITY.md lists what the pen testers
will try.
404, exactly like a note that does not exist. /admin/notes is for role == "admin" only.q, tag and sort must never reach SQL as text. sort accepts created_at, title
or -created_at, -title.500 returns {"error": "internal_error", "request_id": …}
and no traceback.Run python3 -m unittest discover -s tests. The hidden suite plays the pen tester.
| Fix Search and Filters on the Team DirectoryFrontend & UITiers: FresherEditorial | Easy | UI & full-stack | 35 min | Calibrating |
| Specify Bearing Fits and a Tolerance Stack-Up on a Gearbox Shaft DrawingCAD & engineeringTiers: Mid-levelEditorial | Hard | File deliverable | 45 min | Calibrating |
| Clean Up a Hard-Coded Sales Quote CalculatorFinance & analyticsTiers: FresherEditorial | Easy | File deliverable | 30 min | Calibrating |