Security Response Intrinsic to Coding Agents

Proposal: Treat Automated Security Response as a First-Class AI Capability

Summary

AI systems are increasingly capable of discovering software vulnerabilities, generating code, and modifying large codebases at machine speed.

The defensive side should evolve at the same speed.

Rather than treating vulnerability discovery, patch development, and deployment as separate human-paced processes, AI coding infrastructure could maintain multiple contract-compatible implementations of critical software components, allowing a vulnerable implementation to be replaced rapidly when new evidence appears.

The goal is not to give AI unrestricted authority over production systems.

The goal is to make defensive alternatives continuously available, while allowing existing organizational governance to determine which responses may happen automatically.


1. Maintain multiple viable implementations

For important components, the system should be able to maintain:

  • the currently deployed, production-proven implementation;

  • alternative implementations generated from the same semantic contract;

  • their invariants and constraints;

  • deterministic verification results;

  • provenance and evidence describing how each alternative was produced and tested.

These alternatives do not need to remain fully deployed or continuously maintained as independent codebases.

A sufficiently precise representation of the contract, invariants, constraints, and relevant context can allow an agent to regenerate an implementation when required.

This changes the role of AI-generated code from:

generate one implementation and certify it

toward:

maintain a validated solution space from which another implementation can be activated when circumstances change.


2. Vulnerability response becomes a state transition

When a vulnerability is discovered:

Vulnerability detected
        ↓
Identify affected contract/component
        ↓
Select compatible alternative
        ↓
Generate or regenerate implementation
        ↓
Automated verification
        ↓
Mitigation / deployment according to policy
        ↓
Observe production behaviour
        ↓
Integrate official remediation when available

The important property is that emergency response does not necessarily begin with:

“We need engineers to understand the vulnerability and develop a patch.”

The system may already possess compatible alternatives or enough information to regenerate them.

This potentially changes defensive response from a software-development problem into a state-selection and verification problem.


3. Production evidence remains authoritative

Not every generated alternative should be treated equally.

The system can preserve evidence maturity:

  • production-proven;

  • externally/community tested;

  • deterministically verified;

  • newly generated and verified;

  • newly generated but insufficiently verified.

This does not require a complicated probabilistic score.

Organizations can establish explicit policies such as:

A production-proven alternative may be activated automatically for vulnerability class X.

or:

A newly generated alternative may be deployed automatically only when the mitigation is reversible and passes predefined verification.

Human governance therefore defines the allowed transitions in advance, rather than forcing an individual engineer or manager to make an ad-hoc risk calculation during an incident.


4. Detection does not require a CVE

A particularly important case is a vulnerability discovered internally or by an AI security system before an official CVE or public disclosure exists.

The absence of a CVE should not prevent the defensive engineering process from beginning.

Detection should be able to trigger:

  1. candidate mitigation generation;

  2. candidate patch generation;

  3. automated verification;

  4. exposure analysis;

  5. preparation of an emergency deployment.

Whether the result is actually deployed should remain governed by pre-authorized organizational policy.

A CVE is a disclosure and coordination mechanism. It should not be the mechanism that makes a system capable of responding.

No CVE does not mean no action.
No CVE does not mean automatic production deployment either.

The appropriate boundary is:

Evidence triggers the engineering response; governance determines the permitted production response.

This is especially important because an attacker does not require an official CVE before exploiting a vulnerability.


5. Separate vulnerability discovery from exploitation

The relevant security race is not simply:

TD<TRT_D < T_R

where:

  • TDT_D = vulnerability discovery time;

  • TRT_R = defensive response time.

There is also an exploitation pipeline:

Discovery→Exploit construction→Distribution→Execution→Persistence\text{Discovery} \rightarrow \text{Exploit construction} \rightarrow \text{Distribution} \rightarrow \text{Execution} \rightarrow \text{Persistence}

Therefore the objective is not necessarily to discover vulnerabilities faster than every possible attacker.

The objective is to make the defensive transition sufficiently fast that exploitation becomes substantially harder or less useful.

Reducing TRT_R through pre-existing alternatives, automated verification, and pre-authorized mitigations is therefore valuable even when vulnerability discovery itself continues to accelerate.


6. Security infrastructure should be built alongside capability infrastructure

The same AI systems that increase the speed of software development and vulnerability discovery can increase the speed of defensive engineering.

This should be treated as a first-class capability rather than an afterthought.

A future AI coding environment could therefore maintain:

Contract
  ├── Invariants
  ├── Constraints
  ├── Production implementation
  ├── Alternative implementation A
  ├── Alternative implementation B
  ├── Evidence
  └── Provenance

When production evidence changes, the system does not necessarily need to invent a solution from scratch.

It can search the existing solution space, select a compatible branch, regenerate it if necessary, verify it, and activate it according to policy.


7. This does not require frontier models

The architecture does not fundamentally depend on a hypothetical AGI or unrestricted autonomous agent.

The required capabilities already exist in pieces:

  • coding agents;

  • LLM-based code generation;

  • automated testing;

  • static and dynamic analysis;

  • repository access;

  • vulnerability scanners;

  • CI/CD;

  • deployment automation;

  • model-assisted reasoning.

The architectural change is to connect these capabilities into a persistent defensive state rather than treating every incident as a new software-development task.


Proposed principle

Don’t wait for a vulnerability to become a public incident before making the system capable of defending itself. Maintain validated alternatives, continuously accumulate evidence, and make defensive transitions executable under pre-authorized governance.

Fair question - who is going to deal with or work on these “alternatives”?
Short answer is - this should be part of general RSI, progressively eliminating wasted computation from a search-and-verification process.