Code RoomSecurity-critical code delegation
HardPrep Room Coding #4367

Security-critical code delegation

Vibe & agenticSecuritySenior–Staff~20 min

A teammate wants to ship an AI-generated implementation of your own custom JWT verification and session-rotation logic in Rust, arguing the AI 'knows crypto better than we do.' You need to decide whether security-critical auth code is a place to lean on AI heavily or to pump the brakes. Make the call and justify it against the specific failure modes of this task class.

Implement
verify_session_token(token_line: str, expected_issuer: str, expected_audience: str, expected_signature: str, now_epoch: int) → list[str]
Examples
in["alg=HS256;iss=prep-room;aud=web;exp=1800000000;sig=s3cr3t","prep-room","web","s3cr3t",1700000000]out[]
in["alg=none;iss=prep-room;aud=web;exp=1600000000;sig=","prep-room","web","s3cr3t",1700000000]out["alg_none","expired","signature_mismatch"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 20 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.