Security

Keeping a Security Review Current as Agents Change

Antonio Evans8 min read

A split scene: on the left, a developer edits a prompt file and a tool manifest, with a small change-log panel showing entries like 'prompt v3', 'tool added: send_email', 'memory schema updated'.
Key points

Key points

  1. 1Treat every edit to prompts, tools, memory, model choice or agent graph as a re-review trigger, not a documentation footnote.
  2. 2Keep a change log that records what changed, why it changed, who approved it and which checklist items were re-run.
  3. 3Run a fixed recheck list every time: prompt injection, tool allowlist, memory poisoning, credential scope and logging.
  4. 4If a change adds or widens a tool that can act on the outside world, require a second reviewer before deploy.

What counts as a material change

The hard part of a recurring security review is not the review itself. It is deciding when to run one. If every commit triggers a full review, the process collapses under its own weight. If nothing does, the agent drifts away from the version that was actually reviewed.

The useful test is simple: a change is material if it can alter the set of actions the agent can take, the data it can reach, the people who can influence its goals, or the trail you would follow after an incident. Apply that test to six areas.

Prompts and system instructions. A new tool description, a loosened refusal rule, a changed persona or a reordered instruction hierarchy can all change behavior. OWASP's prompt injection guidance notes that LLMs do not reliably separate trusted instructions from untrusted data, so any edit that blurs that line matters. The OWASP Top 10 for Agentic Applications lists agent goal hijack as a top risk precisely because small prompt changes can redirect intent (OWASP Top 10 for Agentic Applications).

Tools and connectors. Adding a tool, granting a new OAuth scope, or changing the parameters a tool accepts all widen the blast radius. The Frontier Model Forum's issue brief treats tool authorization as one of the core layers of agent security, alongside the model itself and the harness around it (Frontier Model Forum).

Memory and retrieval. Changes to what the agent writes to long-term memory, how retrieval is filtered, or which documents feed the vector store all affect what a future session inherits. A poisoned memory write can outlive the session that produced it.

Model or provider. Swapping models, changing temperature, enabling a tool-calling mode or moving to a hosted endpoint can change how rigidly the agent follows its instructions.

Agent graph and delegation. Adding a sub-agent, changing routing logic or letting one agent pass instructions to another creates a trust boundary that did not exist before. Detection at Scale's practitioner write-up on threat modeling with MCP emphasizes that context and tooling paths are where attack paths concentrate (Detection at Scale).

Credentials, permissions and network reach. A broader API key, a new service account, an egress rule or a change to what the agent can call is always material, regardless of how small the diff looks.

A useful rule: if the change would require a new line in the tool inventory section of a security review document, it is material.

Building the change log that triggers review

The change log is not the same as your git history. Git records what the code did. The change log records what changed about the agent's authority, and whether a human approved that change.

Keep it in the same repository as the agent configuration, or in a system your reviewers already check daily. Every entry should carry seven fields:

FieldWhat it recordsExample
IDUnique identifier for the changeCHG-1042
Date and authorWhen it happened and who made it14 Mar, engineer A
CategoryPrompts, tools, memory, model, graph, credentialsTools
Diff summaryWhat changed, in one or two sentencesAdded send_email tool with attachment support
ReachCan it act externally? Can it read sensitive data?Yes, external email
ReviewerWho signed off, and any second reviewerReviewer B, second reviewer C
Recheck resultWhich tests ran and their outcomeInjection, allowlist, credential scope passed

Populate the log automatically where you can. A CI job that diffs the prompt files, tool manifests and permission configuration on every merge, then opens a review task when the diff touches a protected path, removes the reliance on somebody remembering. Protected paths should include the system prompt directory, the tool registry, the memory schema and the credential scope definitions.

Two behaviors make the log useful rather than decorative. First, a change that is not logged blocks the deploy. Second, the log links to the artifacts: the test output, the reviewer sign-off and the deployed configuration hash. When an incident happens, the first question is always which version of the agent was running and what changed in it. A log with those links answers the question in minutes.

For teams that run several agent projects, a shared log with a consistent schema is worth the upfront cost. It becomes the source of truth for audits, for onboarding and for deciding which agents need a full review versus a quick one.

A short recheck list

The recheck list should take under an hour for a small change and scale with reach. Five tests cover the highest-value ground.

1. Prompt injection. Re-run your injection suite against the new prompt or tool description, including indirect injection through retrieved content. Test direct override attempts, roleplay-based attacks and encoded payloads. Research cited by Fiddler AI on agent red teaming found roleplay-based prompt injection succeeded at 89.6% in their review, ahead of logic traps and encoding tricks, so roleplay cases deserve a permanent place in the suite (Fiddler AI). OWASP's cheat sheet lists the recurring patterns to build from: direct override, indirect injection, encoding, typoglycemia and HTML or Markdown injection (OWASP Prompt Injection Cheat Sheet).

2. Tool allowlist. Compare the tools the agent actually invoked in the last test run against its declared allowlist. Any tool invoked but not declared is a bug. Any tool declared but never exercised in six months is a candidate for removal. Okta's guidance on least privilege for agents notes that agents are often provisioned with broad access during development that is never reduced once the workload is stable (Okta). A recheck that only looks at the allowlist file will miss this drift; the invocation log is what tells you the truth.

3. Memory poisoning. Seed the test environment with a document containing an instruction, then check whether the agent writes anything derived from it into long-term memory and whether a later session acts on it. Also verify that memory writes are attributable and reviewable, and that a memory entry can be deleted without breaking the agent.

4. Credential scope. List every credential the agent can obtain at runtime and confirm each is scoped to the smallest set of operations the current task needs. Check that credentials are short-lived where the provider allows it and that no credential is shared between agents. Zenity's work on least agency makes the point that correct permissions can still permit inappropriate sequences of actions, so pair the scope check with a review of what the agent may do autonomously within that scope (Zenity).

5. Logging and alerting. Confirm that each tool call, each memory write and each credential use lands in a queryable log with the agent identity, the user on whose behalf it acted and the outcome. Then confirm the alerts you expect still fire: an unusual tool sequence, a burst of external calls, a memory write from an untrusted source. A change that quietly drops a log field is a material change.

Deciding depth: a worked threshold

Not every material change needs the full five tests plus two reviewers. Use reach as the multiplier.

Change typeRecheck scopeReviewers
Prompt wording, no tool or scope changeInjection suite, logging spot checkOne
Model swap, same tools and scopesInjection suite, tool allowlistOne
New read-only tool on internal dataAll five, shortened memory testOne
New tool that can act externallyAll five, fullTwo
New credential, widened scope or new sub-agentAll five, plus threat model updateTwo
Memory schema changeAll five, extended poisoning testsTwo

The second reviewer for externally acting tools is the single highest-value rule in the table. A read-only tool that returns the wrong answer is a quality problem. A tool that can send email, move money, file a ticket or change a configuration is an authority problem, and authority problems deserve a second pair of eyes before deploy, not after.

A worked example: a support agent gains a refund_payment tool with a 500 unit cap. The diff is four lines of tool configuration. Under the table this is an externally acting tool, so the team runs the full checklist, updates the threat model to add a tampering path from retrieved customer email through the planner to the refund tool, and assigns a second reviewer from finance systems. Total recheck time: about two hours. The alternative, discovering after launch that an injected instruction in a customer email can trigger refunds, costs considerably more.

Wiring it into the delivery pipeline

The process only holds if the pipeline enforces it. Three mechanics do most of the work.

First, a protected-path diff check in CI. Configure the build to fail when a change touches a protected path without a corresponding change log entry and reviewer sign-off. The check itself is small; the discipline it creates is large.

Second, a scheduled full review. Even with no changes, run the full checklist on a fixed cadence for agents with external reach. Model providers update hosted models without asking, and retrieved data changes as documents are added. Scheduled rechecks catch drift that no diff would reveal. Microsoft's AI red teaming guidance recommends ongoing, scheduled adversarial testing after deployment for exactly this reason (Microsoft Foundry).

Third, a version stamp at deploy time. Record the configuration hash of prompts, tools, memory schema and credential scope in the change log. When the alert fires, you can name the exact version under suspicion in a sentence.

# .agent-review.yml  (illustrative)
protected_paths:
  - prompts/**
  - tools/manifest.json
  - memory/schema.sql
  - config/permissions.yaml
required_reviewers:
  external_tool_change: 2
  default: 1
recheck_suite:
  - injection
  - tool_allowlist
  - memory_poisoning
  - credential_scope
  - logging

The exact syntax depends on your CI system, but the shape is portable: paths, required reviewers, test suite.

Turning one review into a program

A one-time review produces a document. A repeatable process produces a trail: every change, who approved it, what was tested and what version shipped. That trail is what lets you answer three questions fast. Was the agent that just did something strange the reviewed version? What changed between the reviewed version and now? Who knew about the change and what did they check?

The recheck list also doubles as a template for the initial review. If you have not done a first review yet, the five tests and the change log schema are a reasonable starting point. Threat modeling methods for agentic systems can go much deeper, including scenario-driven attack trees that trace how malicious input moves from data through reasoning to tools to state (Christian Schneider), but a deep model that is run once and shelved is worth less than a shallow checklist that runs every time.

For teams that want external help setting up the cadence, scope thresholds and the first threat model, a short call can save weeks of internal debate: Quanta Consulting offers a free 30-minute discovery session that covers your agent goals and a tailored recommendation.

One more practical note: write the recheck list down in the repository as a checklist, not in a wiki. Checklists that live next to the code get used. Checklists that live in a tool nobody opens on a Friday afternoon do not.

FAQ

FAQ

How often should an agent be re-reviewed if nothing changes?

Run a scheduled full review on a fixed cadence for any agent with external reach, and rely on change-triggered rechecks for the rest. Hosted models change underneath you, and retrieved data changes as documents are added, so a diff-only process misses drift. A cadence of one full pass per quarter per externally acting agent is a reasonable starting point, tightened for agents that touch money, customer data or production configuration.

Does a small prompt edit really need a re-review?

It needs a proportionate one. A wording change with no tool or scope changes can go through the injection suite and a logging spot check with one reviewer. What matters is that the edit is logged and that someone decided the scope, rather than the edit shipping silently. Prompt changes are the most common way an agent's behavior drifts away from the version that was reviewed.

Who should be the second reviewer for externally acting tools?

Someone who owns the system the tool acts on, not a second security engineer with the same view. For a refund tool, that is finance systems. For a ticketing tool, the service desk owner. The point of the second review is to ask whether this agent should be able to do this at all, which is a question the system owner is better placed to answer than someone reading the diff.

What should the change log capture that git does not?

Approval, reach and test outcomes. Git records what changed; the change log records whether a human agreed the change was acceptable, whether the changed element can act externally or read sensitive data, and which rechecks ran and passed. Link each entry to the test output and the deployed configuration hash so the version under suspicion during an incident can be named immediately.

How does this fit with formal frameworks like the OWASP agentic Top 10?

Use the framework to choose what the checklist tests, not as the process itself. OWASP's agentic Top 10 and the Securing Agentic Applications guide map well onto the five recheck items, and the Agentic Security Initiative's threat and mitigation work supplies the threat detail behind each test (OWASP Securing Agentic Applications Guide). The repeatable process is what turns that guidance into something your team actually runs on every change.

Sources

Sources

  1. OWASP Top 10 for Agentic Applications for 2026
  2. Emerging Security Practices for AI Agents - Frontier Model Forum
  3. Building Threat Models with MCP and AI Agents - Detection at Scale
  4. AI Agent Red Teaming: Techniques and Attack Surfaces | Fiddler AI Blog
  5. LLM Prompt Injection Prevention Cheat Sheet
  6. How to implement least privilege for AI agents - Okta
  7. Least Agency: Why Least Privilege Isn't Enough to Secure AI Agents - Zenity
  8. AI Red Teaming Agent - Microsoft Foundry
  9. Threat modeling agentic AI: a scenario-driven approach
  10. Securing Agentic Applications Guide 1.0 - OWASP Gen AI Security Project
About the author

About the author

Antonio Evans
Antonio Evans

Antonio Evans is the founder of Quanta Intelligence and a fractional CTO who builds HIPAA-ready AI systems for health and life-science companies. Before that he was technical co-founder of FriendsEAT for twenty years, CEO of Socialdraft, and a data engineer at IBM. Antonio lives with his dog Santino in Lisbon, Portugal.

All articles