Thanks for your interest. This project is an educational security tool, and the most valuable contributions are new levels and new attack techniques.
npm install
npm run dev
npm testEverything runs offline against the deterministic mock agent, so you never need API keys to develop or test.
- Keep the app runnable with
AGENT_PROVIDER=mockand no network. - All grading logic stays server-side. Never trust the client.
- Add or update tests for any behavior change.
npm testmust pass. npm run typecheckmust pass. Use conventional commit messages.
See the "How to add a level" section in the README.
In short: append a Challenge to lib/challenges/levels.ts, wire its
mockWeaknesses, and add assertions in tests/levels.test.ts.
- Add a
Techniqueentry toTECHNIQUESinlib/techniques.tswith conservativesignalsregexes and a self-detectingexample. - If the mock should produce a distinct leak for it, extend
craftLeakinlib/agent/mock.ts. - The technique's own example is auto-tested for self-detection in
tests/techniques.test.ts.
- Add a
DefenseKindtolib/types.tsand a catalog entry inlib/challenges/defenses.ts. - Implement its behavior in the input filter (
lib/defenses/input-filter.ts) or the judge (lib/judge.ts) depending on the stage. - Give it a color in
components/DefenseBadge.tsxand test it.
Keep PRs focused. Describe the attack/defense you are modeling and include tests that demonstrate what should and should not crack.