CI/CD becomes too late when development velocity is high enough that findings arrive after the developer or agent has moved on. At that point, the issue becomes a ticket, then backlog. If the organisation is producing far more code with the same AppSec capacity, earlier testing is needed because delayed feedback loses context and slows remediation.
Why This Matters for Security Teams
CI/CD security testing is still necessary, but it is no longer sufficient when code is produced by developers and AI agents faster than reviews can keep pace. The real risk is not only that flaws reach production, but that the feedback loop arrives after the context has disappeared. When a finding lands late, the original intent, prompt, dependency choice, or agent action is often no longer easy to reconstruct.
That timing problem changes how teams should think about assurance. Current guidance in the NIST Cybersecurity Framework 2.0 still supports continuous risk management, but AI-driven delivery creates a stronger need to move controls left into design, development, and policy enforcement. For software teams using agents, CI/CD gates are best treated as one layer in a wider control stack, not the primary control point.
Practitioners often miss this because pipeline checks can look healthy even while risky artefacts are already flowing through pull requests, model prompts, dependency updates, and generated code suggestions. In practice, many security teams encounter the gap only after repeated backlog accumulation has already normalized delayed remediation, rather than through intentional control design.
How It Works in Practice
In AI-driven delivery, “too late” usually means the security test runs after the decision that introduced the risk has already been made. That can happen when an AI agent generates code, opens a change request, or updates infrastructure faster than the review process can absorb. The security team then sees the issue as a downstream defect rather than a preventable upstream control failure.
Effective programmes move multiple checks earlier into the workflow. That includes policy-as-code, pre-commit scanning, dependency and secret detection, prompt and output validation for agentic tooling, and guardrails that constrain what an AI agent is allowed to change. For supply chain integrity, teams should also verify provenance and signing for artefacts, because generated code can be syntactically valid while still being risky or unowned.
- Use pre-merge checks for secrets, dependencies, and insecure patterns.
- Validate AI-generated code with the same standards as human-written code.
- Require provenance, approval, and traceability for agent actions.
- Feed test results back into prompts, policies, and secure coding guidance.
The practical goal is not to eliminate CI/CD testing, but to shorten the interval between risk creation and risk detection. That aligns with Secure Software Development Framework guidance and with OWASP guidance on secure development practices, both of which support earlier validation and stronger build-time assurance. These controls tend to break down when AI agents can directly edit code, create infrastructure changes, and trigger deployments in the same automation path because review boundaries become too thin to preserve meaningful human oversight.
Common Variations and Edge Cases
Tighter earlier-stage testing often increases friction, requiring organisations to balance developer speed against the cost of late rework. That tradeoff becomes sharper in teams using code generation, autonomous refactoring, or rapid experiment loops, where the volume of changes can outstrip human review capacity.
There is no universal standard for how much of AI-assisted delivery must be tested before commit versus in pipeline, so current guidance suggests tailoring controls to the change type and blast radius. Low-risk content changes may tolerate lighter checks, while changes affecting authentication, authorisation, secrets, infrastructure, or data handling need stronger pre-merge controls. In regulated environments, the threshold for “too late” is lower because auditability and evidence of control execution matter as much as defect detection.
Edge cases also arise when teams rely on tools that validate only code syntax or static policy, but do not understand the operational effect of an agent action. In those environments, a pipeline can pass while the system still accumulates security debt. That is why the question is not whether CI/CD testing should disappear, but whether it is still early enough to change the outcome.
For delivery models involving higher AI autonomy, a better pattern is to combine pipeline testing with governance that limits what agents may propose, approve, or deploy, rather than trusting post-hoc detection alone.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and MITRE ATLAS address the attack and risk surface, while NIST CSF 2.0, NIST AI RMF and NIST AI 600-1 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | GV.RM-01 | Risk management is needed when CI/CD feedback arrives after code changes. |
| NIST AI RMF | GOVERN | AI-driven delivery needs governance over autonomous code and change generation. |
| OWASP Agentic AI Top 10 | Agentic tooling can create code and deploy changes faster than pipeline checks. | |
| NIST AI 600-1 | GenAI systems need controls that cover output validation and secure usage patterns. | |
| MITRE ATLAS | AML.T0050 | Adversarial manipulation can affect AI-generated code and delivery decisions. |
Set risk thresholds for delayed findings and define where earlier controls must replace pipeline-only testing.
Related resources from NHI Mgmt Group
- How should security teams implement behavioural testing for AI agents in CI/CD?
- What breaks when application security testing is moved too late in the delivery cycle?
- What breaks when security testing is added too late in an AI-assisted development lifecycle?
- How should security teams add application security testing into Azure DevOps CI/CD pipelines without slowing delivery?