- All playbooks
- Have security agents write a failing integration test before they fix
Have security agents write a failing integration test before they fix
For each security finding, an agent writes an endpoint-level test that reproduces it and confirms it fails, and a second agent patches the code until that test passes.
How Ramp used this technique
Read what Ramp changed and follow the original sources.
Have security agents write a failing integration test before they fix
Translated to GitHub Actions
- What Ramp built
- Ramp's validator agent wrote a failing integration test for each security finding, and its fixer, an early version of Inspect, patched the code until that test passed.
- Your GitHub Actions version
- An agent workflow that writes a failing endpoint-level integration test for each security finding, patches the code until the test passes, and opens the fix as a pull request for review.
In a one-week experiment, Ramp ran a team of security agents: detectors for each vulnerability class, managers that critiqued their findings, a validator and a fixer. The validator took each reported finding, read the existing tests for the endpoint and wrote an integration test that reproduced the vulnerability as an attacker would while asserting the secure result. It ran the test and confirmed it failed; a test that already passed marked the finding a false positive, and no code changed. The fixer, an early version of Inspect, ran the same test to confirm it failed, patched the code and re-ran the test until it passed, leaving the test as written, then opened a pull request for a person to review and land.
2026: Ramp's test-based validation captured nearly all of the false positive findings produced earlier in its triage pipeline. Source
- Use it when
- Security findings arrive faster than people can validate them, and the affected endpoints already have integration tests to copy.
- Before applying it
- A person still reviews and lands every patch the fixer opens, so each validated finding reaches review with the test that proves it.
- GitHub Actions adaptation
- Compare the source system with your own workflow before applying this translation.
Company Playbooks
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookMove a CPU-bound test suite to a faster CPU
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed