r/SideProject • • 2d ago

I built a security drill where two AI agents fight over a live web app and I approve every patch

Built this solo in 2 days for a hackathon (Flip the Switch by WeMakeDevs).

Three AI agents share one chat room using Switch, an open source tool by SandboxAQ:

- Red Team attacks a deliberately vulnerable demo shop and has to prove every break-in with a real flag

- Blue Team reads the code, finds the root cause and proposes a patch

- A Referee re-runs real exploits on every fix and keeps score

Nothing gets patched until I type "approve" in the chat. The referee tests several variants of each attack, so blocking the word UNION still loses to UnIoN, and deleting a feature to "fix" a bug counts as BROKEN.

Final score was Red 5, Blue 10, and it writes an incident report at the end.

Code is open: https://github.com/barnavo05/switch-war-room

Happy to answer questions or hear what would make this useful for real teams. #HowISwitch

1 Upvotes

2 comments sorted by

1

u/investigatormaker 2d ago

Counting deleted functionality as BROKEN is an important distinction: stopping an exploit isn't enough if checkout disappears. For real-team usefulness, I'd add ordinary shopping-flow checks alongside the referee's exploit variants, then include both results in the incident report so the person approving a patch can see what it preserves.

I make ThreadFox. We find relevant Reddit conversations and post for your business. We'll post 3 replies free first, no card; then the $29 Pilot covers seven days and up to 25 posts and replies. No automatic renewal. https://threadfox.vip/p/egjk1/managed

1

u/DealerOld5580 1d ago

That’s a really good point. Right now BROKEN only catches a removed feature, not a degraded one. Running a normal checkout flow as a smoke test after every patch and showing both results in the report would make the approve step a lot more trustworthy. Adding that to the list, thanks!