Protocol
Add one adversarial case the coding agent did not propose
Agreement between generator and verifier can share the same blind spot.
Before you use it
- Use when
- AI-generated code and AI-generated tests agree perfectly on the happy path.
Keep this limit in mind
- One adversarial test is not a security assessment; scale independent testing to risk.
An idea to explore.
Try this idea.
Inspect the example, try the idea in your situation, then check your next move.
Why it matters
For consequential changes, add or select at least one negative, boundary or adversarial case independently: malformed input, missing permission, expired token, concurrency edge, partial failure or hostile data. Choose the case from the specification or threat model, not from the generated implementation.
Steps
- What input should be rejected?
- What permission should fail?
- What boundary value can break it?
- What partial dependency failure matters?
- Which case came from the spec rather than the implementation?
An example
For a new authorization endpoint, a reviewer manually adds the test for a user with the right object but wrong tenant.
Check your result
At least one meaningful test challenges the change from an independent failure model.
Save and practise this idea
My learning
Read. Recall. Repeat.
Save this idea and return to it on any device.
Keep exploring
Connected ideas
You are readingAdd one adversarial case the coding agent did not propose
Ideas that link here
These ideas link to this one. Check their conditions and limits before use.
Use before this ideaReview test changes independently from the code they excuse
Evidence and sources
OWASP recommends independent scrutiny of AI-generated test changes because an agent can make a suite pass by weakening, deleting or misdirecting tests.
This is a threat model and practice recommendation, not evidence that every agent routinely corrupts tests.
Secure Coding with AI Cheat Sheet · Test Fabrication and Test Deletion
NIST SSDF recommends integrating secure development practices into the software lifecycle rather than treating security as a separate late-stage review.
The framework is high-level and must be tailored to the organization's development model and risk.
Secure Software Development Framework (SSDF) Version 1.1 · SSDF overview
Edition and review
Version 0.1.0
No review details are supplied for this edition.