Claude-written test harness let 31KB fake archives land on a real backup server

Grimmoner · reddit · 2026-10-18

The author had Claude write tests for a nightly backup script. The harness faked ssh, but the old script used scp—not faked—so a "control run" copied five 31KB test archives straight onto the real backup server. Since the server keeps only the newest 14 archives, the fakes plus the next real backup would have evicted six genuine ones. Claude spotted it within a minute and wrote a cleanup that only removes those five small files; nothing real was lost.

Hardening steps taken:

Lesson: when faking tools one by one, the one you forgot runs for real. Block the network for the whole test process. And a control run is still a run.

Original post →

More from coding & agent

coding & agent channel →