TOUGH TONGUE AI
  • Home
    LogoTOUGH TONGUE AI

    RESOURCES

    Loading...

    HomeLibrarySecurity Mock · Secure Code Review

    Security Mock · Secure Code Review

    Security Mock · Secure Code Review

    Overview

    A secure code review with Marcus in a shared editor: find the flaw in a small download helper, explain it, fix it, test it with hostile names, then secure the same feature when reports move to a public bucket. Python or Java. Written report after.

    Your Instructions

    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.

    More in Security Engineer Interview Prep: AI Coach Edition

    • Security Diagnostic
    • Security Coach · The Security Loop
    • Security Mock · The Phone Screen
    • Security Coach · Networks
    • Security Mock · Denial of Service
    • Security Coach · Web App Security
    • Security Coach · Identity and Access
    • Security Mock · Attack the OAuth Workflow
    • Security Coach · Cryptography
    • Security Mock · Caesar Groups
    • Security Coach · Threat Modeling
    • Security Mock · Design a Cyber Attack
    View the full course (40 sessions) →