Protocol

Add one adversarial case the coding agent did not propose

Agreement between generator and verifier can share the same blind spot.

About 1 min read

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.

Keep reading

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

  1. What input should be rejected?
  2. What permission should fail?
  3. What boundary value can break it?
  4. What partial dependency failure matters?
  5. 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.

Use email
Keep exploring

Connected ideas

You are readingAdd one adversarial case the coding agent did not propose

Evidence and sources
Supports

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

Supports

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

All sources (2)
Edition and review

Version 0.1.0

No review details are supplied for this edition.

Read this idea as JSON · Release details