Code RoomBash archive injection
MediumPrep Room Coding #3994

Bash archive injection

Vibe & agenticSecurityMid–Senior~15 min

An AI assistant wrote this Bash CI helper that archives a directory whose name comes from a pipeline variable (`$PROJECT`, set from a branch/PR field). It works for a branch named `main`. Review it before it runs in CI with write access to artifacts.

Implement
project_name_is_safe(name: str) → bool
Examples
in["main"]outtrue
in["--checkpoint-action=exec=sh -c id"]outfalse
in["release_2026.01"]outtrue
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 15 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.