Agent Governance Register

Reviewed

Testing an agent policy before it goes live: replay and dry runs

Published by The Register desk. Theme: Approval and policy. Tags: policy testing, replay, change management, GOV-09.

In short: A new or changed agent policy should be tested before it blocks or allows live actions. Replay runs the policy against recorded sessions and counts what it would have allowed, asked about or denied. A dry run logs decisions on live traffic without enforcing them. Keep both results as evidence for control GOV-09.

Why test a policy before it goes live?

An untested policy fails in one of two ways. It blocks legitimate work, and people find a way around it. Or it lets risky actions through, and nobody notices until an incident. Both are hard to see from the policy text alone.

Control GOV-09 asks that new or changed policies be tested against realistic or recorded agent activity before they are enforced. This post covers two methods, replay and dry runs, and the evidence each produces. It assumes you already know which actions need a human, as covered in the approval rules guide.

What is the difference between replay and a dry run?

MethodWhat it usesWhat it showsMain limit
ReplayRecorded sessions from a past periodWhat the new policy would have decided on real past activityPast activity may not include new behaviour
Dry runLive traffic, decisions logged but not enforcedWhat the policy decides on current activityRisky actions still run during the test

Replay is faster and safer. A dry run catches behaviour the recorded period missed. Many teams use replay first, then a short dry run for high-risk changes.

How do you run a replay?

A replay needs a record of past sessions with enough detail to re-evaluate each call. That means the agent, the person it acted for, the tool, the action and the inputs the policy reads.

  • Pick a recent period that includes normal and busy days.
  • Run the current policy over it and record the counts of allow, ask and deny.
  • Run the new policy over the same period and record the same counts.
  • List every call whose outcome changed.
  • Review each changed call with the agent owner.

The list of changed calls is the useful part. A policy that moves a few hundred calls from allow to ask will change the approval load. Our post on consent fatigue covers what that does to approvers.

How do you run a dry run?

A dry run turns the new policy on in log-only mode. Every call is evaluated and the decision is written to the log, but the current policy still enforces.

Set an end date before you start. Dry runs that never end become a second, unenforced policy that nobody reads. Review the logged decisions daily for high-risk changes and at the end for others.

Do not dry run a policy that removes a block. If the current policy denies an action and the new one would allow it, the risk is in the allow. Use replay for that case.

What evidence should you keep?

An auditor testing GOV-09 will ask for the test result of the last policy change. Keep a short record:

  • The policy version tested and the version it replaced.
  • The method, replay or dry run, and the period covered.
  • Counts of allow, ask and deny under both versions.
  • The list of changed outcomes and who reviewed them.
  • The date the new version went live.

This record also serves change control. The change control post uses it as the test field of the change record.

What do the platforms in the register document?

Policy testing is the least documented control in the policy area. NewCore is the only platform in the register that documents it. It states that policies are written in a sentence and replayed against recent real sessions before going live.

Other platforms document the policy engines a test would exercise. Descope documents policy engine v2 with Deny policies and ordering. Silverfort documents evaluation against authorization planes and scopes, with approve, block or step-up verdicts. Aembit documents an access policy framework with conditional access and MCP tool filtering. Astrix Security documents allow, flag and block rules scoped by user, department, platform and resource. Where a vendor does not document testing, ask whether it offers replay or a log-only mode.

How does testing relate to the NIST tenets?

NIST's tenet 08 says deterministic capabilities should be the primary mechanism for access decisions. A deterministic policy can be replayed and give the same answer twice. A decision that depends on a model's judgement may not. That is one practical reason to keep access decisions deterministic. The tenet crosswalk maps tenet 08 to GOV-06.

How long should a recorded period be?

Long enough to include the agent's normal cycle. An agent that runs a monthly close should be replayed over a period that includes one. An agent that works every hour needs only a few days. When in doubt, pick a longer period and a smaller sample of agents.

Keep the recorded sessions themselves for as long as you might need to rerun the test. A test that cannot be repeated is weaker evidence than one that can.

Frequently asked questions

9.1 Is replay enough on its own?
Often, for small changes. For high-risk changes, follow replay with a short dry run, because recorded periods may miss new agent behaviour.
9.2 Can you dry run a policy that removes a block?
You should not. The risky action would run during the test. Use replay against recorded sessions instead.
9.3 What does an auditor ask for under GOV-09?
The test result of the last policy change, the method used, and evidence that changed outcomes were reviewed before enforcement.
9.4 Which platforms document policy replay?
NewCore documents replaying policies against recent real sessions before going live. See the GOV-09 control page for current coverage.

Sources

Reviewed by The Register desk