Code RoomSecret redaction regex misses patterns
MediumPrep Room Coding #4174

Secret redaction regex misses patterns

Vibe & agenticAlgorithms & data structuresMid–Senior~18 min

An AI agent wrote this Python helper to redact secrets from text before it's sent to a logging-and-analytics AI assistant. It looks reasonable and the team is about to rely on it as their safety net. Identify the risks before they trust it.

Implement
classify_outbound_tokens(tokens: list[str]) → list[str]
Examples
in[["sk-ABCDEFGHIJKLMNOPQRSTU","hello","AKIAIOSFODNN7EXAMPLE"]]out["redact","pass","redact"]
in[["wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY","sk-short"]]out["review","pass"]
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 18 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.