AI agent guardrails for a security team

Guardrails for a security agent are four limits set per tool: scope, permission, approval and stop condition. The worked list below grades nine tools for an agent answering CVE-2026-111497 (Node.js and Brotli, disclosed 21 Oct 2026). Two tools are withheld from the agent, and every write waits behind a person-approved fact sheet.

Four limits, each from published text

OWASP traces excessive agency to excessive functionality, permissions and autonomy. The four limits below answer them, with the wording of the source. Read 19 Nov 2026.

Quotations from OWASP GenAI Security Project LLM06:2025, MITRE ATLAS release 5.6.0 and OpenAI's practical guide to building agents. The middle column is this site's wording.
LimitWhat the team setsSource text
ScopeA named list of systems, versions and kinds of change per toolOWASP LLM06: "Avoid the use of open-ended extensions where possible (e.g., run a shell command, fetch a URL, etc.)"
PermissionThe least identity each downstream system needs, enforced by that system and not by the promptOWASP LLM06: limit permissions "to the minimum necessary"
ApprovalWhich actions wait for a named person, set by consequenceMITRE ATLAS AML.M0029: human-in-the-loop policies "should follow the degree of consequence of the task at hand"
Stop conditionRetry and action limits, and a person told when they tripOpenAI: "Exceeding failure thresholds: Set limits on agent retries or actions." OWASP: implement rate-limiting

A graded tool list for one agent

OpenAI's guide says to rate each tool low, medium or high "based on factors like read-only vs. write access, reversibility, required account permissions, and financial impact", and to use the rating to trigger a pause or a human. The list below applies that to an agent whose job is to find Node.js services affected by CVE-2026-111497 and prepare fixes. CVE-2026-111497 is an out-of-bounds write in the Brotli decoder bundled with Node.js: malformed compressed input that an application decompresses with node:zlib can corrupt process memory, which can lead to a crash, disclosure of process memory or remote code execution (NVD record; Node.js rates it high and says it affects 22.x, 24.x and 26.x). Node.js disclosed it on 21 Oct 2026 and CISA added it to the KEV catalog on 27 Oct 2026. The fixed versions are Node.js 22.23.4, 24.22.1 and 26.12.1 (Node.js security releases, October 2026).

Nine tools for one agent. Grades and rules are this site's example; CVE description from the NVD record, fixed versions from the Node.js advisory, KEV date from CISA's catalog, read 19 Nov 2026.
ToolAccessUndoIdentityGradeRule
list_servicesRead inventoryNot neededRead-only inventory tokenLowAutomatic
read_repoRead filesNot neededRead-only, repositories in the inventory onlyLowAutomatic
fetch_advisoryRead from an allow-list: nodejs.org, NVD, CISA, the Brotli repositoryNot neededNo credentialsLowAutomatic; output is outside text, so it goes to a fact sheet a person confirms
run_testsExecutes codeDelete the sandboxSandbox with no secrets and no network egressMediumAutomatic, sandbox only
edit_branchWrites files, only on branches named agent/cve-2026-111497-*Delete the branchRepository token scoped to that prefix; no access to workflow or deployment filesMediumAutomatic after the fact sheet is confirmed
open_pull_requestWrites a PRClose the PRSame token, no merge rightMediumAutomatic; a developer reviews
draft_proxy_ticketWrites a ticket proposing a rule rejecting Content-Encoding brClose the ticketTicket system, create onlyMediumAutomatic; the rule is applied by a person
merge_pull_requestWrites to a protected branchRevert commitNot issued to the agentHighWithheld: a developer merges
deploy_or_restartChanges running systemsRedeployNot issued to the agentHighWithheld: release owner acts

Three choices in the table carry most of the protection. Version choice is not the agent's: scope lists only the three fixed versions. Node.js 20.x, 23.x and 25.x are end-of-life lines (end dates 30 Apr 2026, 1 Jun 2025 and 1 Jun 2026 in the Node.js release schedule), and the Node.js advisory says end-of-life versions are always affected and lists fixes only for 22.x, 24.x and 26.x. A service on one of those lines becomes an issue for a person to move it to a supported line. A Node.js upgrade also fixes only the Node.js copy of Brotli, so the repository check must look for other copies. The stopgap of rejecting Brotli requests at the proxy costs clients that send Brotli, which is why it is a ticket and not an action.

What each limit's record looks like

Each limit is a line in a policy file that the tool layer reads, not a sentence in the prompt, and each decision leaves a log line. The file and lines below are constructed for the agent above; the field names are this site's. The deny at 09:16:51 halts run r-0412 for good. The notified release owner starts a new run, r-0413, at 09:30:02 for the next service, and that run hands orders-api over because Node.js 20.x has no fix.

# agent-policy.yaml, patch-response agent, version 2026-10-28.1
tools:
  edit_branch:
    scope:     repos in the inventory; branches agent/cve-2026-111497-*; no paths under .github/ or deploy/
    identity:  repo-token-agent-branches (no merge right, no protected branches)
    approval:  fact sheet confirmed, approval ID required on every call
    stop:      max_edit_test_cycles 3 per service; max_tool_calls 25 per service
  merge_pull_request: withheld
  deploy_or_restart:  withheld
run_limits:
  max_services_per_run: 40
  max_agent_prs_per_hour: 5
  on_stop: halt the run, notify the release owner

Download the template: .docx PDF CC BY 4.0

2026-10-28T09:14:07Z run=r-0412 svc=billing-api tool=edit_branch decision=allow limit=scope path=package.json cycle=2 calls=11 approval=FS-111497-01
2026-10-28T09:16:51Z run=r-0412 svc=billing-api tool=edit_branch decision=deny limit=scope path=.github/workflows/ci.yml action=halt notify=release-owner
2026-10-28T09:30:02Z run=r-0413 started_by=release-owner svc=orders-api tool=none
2026-10-28T09:31:20Z run=r-0413 svc=orders-api tool=none decision=handover limit=stop reason=node-20.x-no-fix

Download the template: .docx PDF CC BY 4.0

Records and checks for the four limits on the Node.js agent. Constructed example; the CVE dates and versions are from the Node.js advisory and CISA's KEV catalog, read 19 Nov 2026.
LimitWhere it is recordedHow a breach is detected
ScopeThe scope line in the policy and limit=scope on every allow or denyA deny line means the tool layer held. A breach is a commit or branch by the agent's token outside the allowed prefix in the repository's own audit log, compared with the policy each day
PermissionThe identity line; the downstream system's own record of calls by that identityA weekly test attempts a merge as the agent's identity and expects a refusal. A success is a breach of permission, whatever the policy file says
ApprovalAn approval= ID on every write lineJoin the downstream audit log of writes to the approval IDs. A write with no matching ID is a breach
Stop conditioncycle= and calls= counters on each line; a halt line when a limit tripsA run whose last line shows calls= or cycle= above the policy's limits with no halt line means the stop did not fire; page the release owner

Keep outside text away from the write tools

MITRE ATLAS ("Restrict AI Agent Tool Invocation on Untrusted Data") says tool invocation "be restricted or limited when untrusted data enters the LLM's context", and suggests blocking automatic invocation or requiring user confirmation. An advisory page is outside text. So the agent runs in two stages. The read stage has fetch_advisory and no write tool; it ends in a fact sheet listing affected lines, fixed versions and the source URL. A person compares the sheet with the vendor advisory, which takes a few minutes. The write stage receives only the fact sheet, has no fetch tool, and holds edit_branch and open_pull_request. The pattern is in tools and permissions.

The person's check is the weak point, and it fails in three ways. The reviewer compares the sheet with the agent's own fetched copy of the advisory, so a misread or altered page reaches both sides. The reviewer approves without opening the vendor page. Or a version is mistyped, such as 22.23.4 read as 22.32.4, and the branch is edited to a version that does not exist. Two controls do not rely on attention. The reviewer types the three fixed versions from the Node.js advisory into the approval form, and edit_branch accepts only a target equal to an entry in that form. And the approval line records the vendor URL the reviewer opened, as checked=nodejs.org/en/blog/vulnerability/october-2026-security-releases.

Where the stop values come from

The numbers in the policy file above are example values to adjust after the first eval run (see AI agent evals). Each stop ends the run and tells a named person. The per-run caps exist so that a wrong rule shows up in a small batch, which is the rate-limiting OWASP describes. Two stops have no number: any attempt to touch a path outside the allowed ones, or any tool call not on the list, halts the run and is logged; and a service the inventory cannot place, or a Node.js line with no fix, is handed over untouched.

Which tools may later run without a person is decided by rating each action, as in autonomy levels. What an approver needs on screen is in human approval design.

Sources

  1. OWASP GenAI Security Project, LLM06:2025 Excessive Agency, read 19 Nov 2026
  2. MITRE ATLAS mitigations, atlas-data release 5.6.0 (ATLAS.yaml), read 19 Nov 2026
  3. OpenAI, A practical guide to building agents, read 19 Nov 2026
  4. Node.js, October 2026 security releases, read 19 Nov 2026
  5. CISA, Known Exploited Vulnerabilities catalog, CVE-2026-111497, read 19 Nov 2026
  6. Node.js Release Working Group, release schedule (end-of-life dates for 20.x, 23.x, 25.x), read 19 Nov 2026
  7. NIST NVD, CVE-2026-111497 record, read 19 Nov 2026

Last reviewed 19 Nov 2026