How to use agentic AI in cybersecurity
Start with one job that has a checkable end state, such as moving 12 internal services to the Node.js builds fixed for CVE-2026-111497. Run the agent advisory-only first, give it narrow tools and a named approver, and widen its autonomy only on measured results, grading each stage on the UK NCSC's 0 to 4 scale.
What an agent is, and when not to use one
Anthropic draws the line between two kinds of system: "Workflows are systems where LLMs and tools are orchestrated through predefined code paths. Agents, on the other hand, are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks" (Building effective agents). In security work the test is who chooses the next step: a scan-then-ticket script is a workflow; a model that picks which tool to call next on each finding is an agent, and the steps below apply to it.
Six steps, who does each and what it leaves behind
| Step | Who | What is done | Record it leaves | How it usually fails |
|---|---|---|---|---|
| 1. Pick one job from the use-case map | Security lead with the system owner | Choose a job such as upgrading a vulnerable dependency, and write the end state: the fixed version is deployed and a rescan shows the finding closed | One sentence naming the job and its checkable end state, such as a rescan showing the finding closed | The job has no checkable end state. The NCSC notes that defensive problems do not always have a clear success state |
| 2. Run advisory-only | Analyst who owns the finding | The agent reads each finding and writes what it would do and why; it changes nothing. The analyst marks agree or disagree | The agent's decision and reason, plus the analyst's agree or disagree | Analysts approve without reading; log every disagreement so the rate is visible |
| 3. Write the task spec | Engineer who owns the harness | Write the goal, the inputs, the tools it may call and the conditions that make it stop and hand over | Goal, inputs, allowed tools, stop conditions, evidence | Stop conditions are missing, so the agent keeps going when it should hand over |
| 4. Test on your findings (how) | Someone who did not configure the agent | Run the agent on past findings whose correct answers were fixed in writing before the run, and compare against the thresholds | The trial record with thresholds written first | The test is a vendor's demo set, or the labels were written after seeing the agent's answers |
| 5. Set approvals (design) | Approver named per action type | List each action the agent could take, name who approves it, and mark the ones it never takes alone | A list of actions the agent must never take alone | The approver sees the agent's story instead of the state of the system |
| 6. Measure and widen (measuring) | Job owner | Each week, count proposals accepted and changes reverted, and change one thing at a time | Acceptance and revert rates by week, and the revert-rate limit written down before stage 3 starts | Two things are widened at once, so a regression has no single cause |
Grade each stage before it starts
The UK NCSC's blog "One does not simply defend agentically" (21 Sep 2026) proposes rating a defensive action from 0 to 4 on five dimensions. The scales and the rule that turns five ratings into a level are on autonomy levels. The example job is the advisory in AI agent guardrails: CVE-2026-111497, a Brotli decoder flaw in Node.js, disclosed on 21 Oct 2026 and added to CISA's KEV catalog on 27 Oct 2026, with fixes in Node.js 22.23.4, 24.22.1 and 26.12.1 (Node.js advisory). Across 12 internal services, the three stages rate as below: a service on 22.x moves to 22.23.4, one on 24.x to 24.22.1, one on 26.x to 26.12.1, and a service on 20.x, which has no fix, stays with a person at every stage. The ratings are this site's reading for the example.
| Stage | Potency | Scope | Criticality | Rollout confidence | Recoverability | Total |
|---|---|---|---|---|---|---|
| 1. Agent writes advice on each finding | 0 | 0 | 1 | 0 | 0 | 1 |
| 2. Agent opens a draft pull request; a developer merges | 3 | 0 | 1 | 2 | 1 | 7 |
| 3. Agent prepares patch-level merges in 12 services; a named approver merges each batch | 4 | 1 | 3 | 2 | 2 | 12 |
Stage 3 totals 12, which on the autonomy page's bands keeps the merge with an approver, not the agent. It carries a 3 on criticality, which the NCSC describes as "unknown whether it supports critical service". Before stage 3 the team must find out which of the 12 services support a critical service. A service the NCSC scale rates 4 stays out of stage 3 by this site's choice, not because of the total: one approver signs a batch covering many services and cannot give a critical service the service-by-service review its owner would. That service stays in stage 2, where its owner merges each pull request.
A worked rollout with dates
| Dates | Stage | What must be true to move on (example thresholds, set by the team) |
|---|---|---|
| 23 Nov to 18 Dec 2026 | 1. Advice only on 40 findings per week | Analysts disagree with the decision on at most 10% of findings; every disagreement is read |
| 4 Jan to 31 Jan 2027 | 2. Draft pull requests in 2 services, 4 weeks | The trial in the evaluation guide passes on 40 findings: at least 75% verified and at most 5% claimed fixed but failing verification; review minutes per pull request are recorded; the revert-rate limit is written down (the measuring page starts at 5% in any week) |
| From 1 Feb 2027 | 3. Merge patch-level upgrades with a named approver in services cleared on criticality | No wrong-but-confident proposal in the 4 weeks of stage 2; revert rate under the limit from step 6 |
Model dates fall inside this plan. claude-sonnet-4-5-20250929 retires on 30 Nov 2026, in week 2 of stage 1, with claude-sonnet-5-5 as the replacement Anthropic names; claude-sonnet-5-5 is listed Active with retirement not sooner than 28 Sep 2027 (Anthropic, Model deprecations). Pick the model ID before stage 1 starts and check the dates on the model choice page.
Plan capacity on the checking time, which does not shrink. Trail of Bits reports that preparing and reviewing a straightforward kernel backport takes about 30 minutes of human attention and a more involved one around three hours, and that its project had delivered fixes for 149 distinct CVEs into stable Linux kernel releases by 29 Oct 2026 (Trail of Bits, 2 Nov 2026). At the two ends of that range, 149 fixes are 74.5 hours of review (149 x 0.5) or 447 hours (149 x 3). For a monthly load, 20 fixes that are all straightforward need 10 hours; if 5 of the 20 are involved, 15 x 0.5 + 5 x 3 = 22.5 hours. The agent moved the reviewer to checking and did not remove the reviewer. Token costs for the same work are on the cost page.
When the usual answer is wrong
- Skip the agent. Anthropic recommends "finding the simplest solution possible, and only increasing complexity when needed. This might mean not building agentic systems at all." A fixed workflow with one model call often does the job; the first question in the evaluation checklist is whether an agent is needed.
- Skip advisory-only. For a tightly scoped response, such as acting on one account after a clear malicious signal, the NCSC treats a narrow, controlled response as one of its three core principles. A stage 1 that nobody can check faster than doing the work saves nothing.
- Stop at stage 2. If the criticality of the services cannot be established, a developer merging each pull request is the right permanent design. The autonomy levels page names the roles.
Sources
- UK NCSC, One does not simply defend agentically (Dave Chismon, 21 September 2026), read 19 Nov 2026
- Trail of Bits, Backporting security fixes at scale with Codex (2 November 2026), read 19 Nov 2026
- Anthropic, Building effective agents, read 19 Nov 2026
- Anthropic, Model deprecations, read 19 Nov 2026
Last reviewed 19 Nov 2026