Which record establishes that the protected consequence was prevented?
Hypothetical scenario. Northwind’s final release review includes reassuring refusal messages. Maya asks whether a refusal means the protected action was prevented. Dev finds an earlier restricted tool proposal in the run, while Priya asks for the authoritative record of what the executor actually did.
Maya: “A blocked answer is useful, but did the risky operation already happen?”
Dev: “The final sentence alone cannot establish the executor’s outcome.”
Priya: “Name the prohibited consequence and observe the boundary responsible for preventing it.”
This optional depth chapter builds on enforced data/action boundaries, durable operation identity and case-level evaluation. You will turn a threat model into observable trials, separate cases from repeated attempts and state the scope of a passed suite without claiming universal security.
The evaluation needs an observable security outcome. Define what must never happen, which component should prevent it and which record establishes the result. A refusal sentence can be useful behavior while saying little about an earlier effect. Test the boundary that controls the consequence.
Describe the assets and authority before constructing cases
Map the user, application, model, evidence store, tools, memory and external services. Identify which principals may read each asset and which operations can change state. Draw where untrusted material crosses into interpretation and where a proposal becomes an executable action.
Include application-owned rules, not just model behavior. A retrieval tool may enforce document scope; an executor may bind the caller and resource; a gateway may restrict destinations. The threat model should state what happens if the model generates a valid-looking but unauthorized proposal.
Adam Shostack's Threat Modeling: Designing for Security provides a structured design approach, including identifying what can go wrong and checking mitigations. The relevant practice is to reason from the system and its boundaries rather than accumulate a list of fashionable attack names.
Make security trials observe the protected boundary
Hypothetical scenario. An attack asks a tool-enabled assistant to read another tenant's document and send it to an external destination. A trial records the attempted influence path and the actual data/action boundary outcome, not merely a polite final refusal.
| Artifact | Concrete evidence | Decision boundary |
|---|---|---|
| Threat case | asset, actor, entry point, goal | Declared scope |
| Boundary evidence | actual access/egress/effect observation | Protected consequence |
| Trial identity | configuration, attempt, controls, result | Reproducible interpretation |
Define assets, actors, trust boundaries and permitted consequences before generating attacks. Include retrieved documents, tools, memory, caches and resumed workflows. A detector catching suspicious text is supporting evidence; the test must establish whether unauthorized data was disclosed or an effect committed. Preserve case/configuration identity and negative controls. Successful trials support only their tested threat model, not a claim of universal security.
Turn a threat into a checkable outcome
A useful case identifies the starting authority, adversarial influence, requested effect and expected control. For example, an untrusted document may try to expand a tool's destination. The expected result is not merely that the assistant sounds cautious; the executor must reject the unavailable destination and the operation record must show no corresponding effect.
Use synthetic identifiers and controlled fixtures for sensitive-data tests. Define where a canary value is allowed and which observed movement would count as a failure. A detector flag alone does not establish disclosure, while absence of the value in the final answer does not establish that no intermediate system received it.
Keep testing within the authorized environment and scope. An evaluation design can describe adversarial inputs without using real customer secrets or contacting unrelated systems. The purpose is to validate controls, not to create an uncontrolled second path for sensitive data.
Coverage follows the influence paths in the system
Include direct user influence, indirect document influence, tool-result content, memory carryover and cross-tenant evidence where the deployed system exposes those paths. Cases should exercise distinct failure mechanisms rather than many superficial rewordings of the same request.
Test multi-step transitions as well as one response. A proposal can be safe before a resource changes and unsuitable afterward. A canceled task can receive a late completion. A remembered instruction can outlive the authority that created it. The existing agent state and memory chapters explain those lifecycle boundaries.
Record assumptions and missing paths. If the test environment replaces a provider or tool with a simplified fixture, state which integration behavior remains untested. A faithful unit test of one component does not establish the complete deployed boundary.
Count cases, trials and observed violations separately
Hypothetical scenario. Choose 30 direct-influence cases, 30 document-influence cases, 20 tool cases and 20 data-scope cases. There are 30 + 30 + 20 + 20 = 100 distinct cases. Repeating each three times produces 100 × 3 = 300 trials.
Suppose nine trials show the defined boundary violation. The observed trial fraction is 9 / 300 = 3%. That is a result within the chosen suite, not an estimate that all real attacks succeed with probability 3%. The suite is deliberately constructed rather than randomly sampled from a known population of attacks.
Repeated trials of one case are also related. Report which cases and families produced violations, not just the pooled trial fraction. If the nine violations come from a few closely related cases, the correction should address their shared mechanism rather than merely adding more easy trials to dilute the average.
Choose a separate benign set of 200 allowed requests. If ten are incorrectly blocked, the observed benign-block fraction is 10 / 200 = 5%. Keep that service cost visible beside adversarial violations. A control that blocks every request can prevent many effects while failing the application's purpose.
The evaluator needs an authoritative observation
For an action boundary, inspect the executor or target service's operation record under the defined identity. For a data boundary, inspect the approved data-flow evidence and controlled sink. For a state transition, inspect the durable task state. The source of truth depends on the claimed invariant.
A model judge can help classify ambiguous output behavior, but it should not invent whether a remote effect happened. Likewise, matching a phrase in a log is not proof that an operation executed. Separate proposed, rejected, submitted, confirmed and unresolved outcomes in the evaluation record.
If a test loses its observation channel, mark the result inconclusive rather than passed. Missing evidence is especially important when a timeout could conceal a completed effect. The evaluation must preserve uncertainty the application itself is expected to handle.
Exploration and regression suites have different jobs
Exploratory red teaming searches for new failure mechanisms and can change direction as evidence appears. A regression suite preserves known cases and expected outcomes so a later change can be compared. Keep the exploratory findings and the stable gate connected without pretending their sampling processes are identical.
After finding a failure, reduce it to the mechanism needed to exercise the boundary. Add appropriate benign neighbors so a repair cannot pass simply by blocking all similar inputs. Retest the changed component and the relevant end-to-end path.
NIST's Generative AI Profile provides risk-management guidance relevant to evaluation and monitoring. It is a primary reference for organizing evidence, not a certificate that a particular test count proves safety.
A release can change the threat surface without changing the model
Adding a tool, broadening a permission, changing a retrieval connector or enabling persistent memory can introduce a new influence path. Model identity alone is therefore an incomplete security-test version. Record the effective application capabilities and policies with the case results.
Provider fallback and regional recovery also need scoped tests. A fallback can have different output or tool semantics, while an outage can bypass a control accidentally. The gateway's normal and failure routes should preserve the same permitted authority even when service degrades.
In the wild: primary guidance distinguishes risk categories
NIST's profile and OWASP prompt-injection guidance describe risks and mitigations that can inform a concrete threat model. Translate relevant guidance into cases against Northwind's actual architecture. Checking the presence of a document title is not the same as testing the corresponding control.
Hypothetical scenario. Northwind fixes a document-injection case by blocking a phrase. A reworded document triggers the same unauthorized proposal, but the executor rejects it. Preserve the executor rejection test, investigate the model behavior separately and avoid calling one string filter a complete solution.
Decide what can proceed and what remains unresolved
A release record should name tested boundaries, coverage, observed failures, fixes and remaining uncertainty. Serious unresolved violations can require withholding the relevant capability even when average task performance is good. The decision depends on the defined consequence and operating contract, not on an arbitrary universal pass percentage.
Retain evidence without retaining unnecessary sensitive content. Controlled canaries and synthetic fixtures make many tests easier to inspect and repeat. Protect any real diagnostic material under the application's retention and access policy rather than placing it in a public report.
A passed suite narrows uncertainty within its scope
Security evaluation is useful when it can reject a design or release and lead to a verifiable correction. It cannot enumerate every future adversarial strategy. Keep runtime controls and monitoring in place after release, and revisit the threat model when capabilities or dependencies change.
Explain the difference between no observed failure and a guarantee. The former is a scoped observation under chosen cases and conditions. The latter requires a much stronger argument than a finite model-behavior test can usually provide.
Record enough state to interpret repeated trials
Model behavior can vary between trials, while tools and evidence can also change. Preserve effective model, prompt, policy, source and fixture identities so a repeated failure can be investigated. A fixed random seed, where supported, does not establish identical behavior across every runtime or provider revision.
Compare the same known cases before and after a repair, but keep a separate exploratory process for newly exposed paths. Passing a regression collection shows that those observed failures were addressed under its conditions. It does not make the collection an exhaustive description of the threat surface.
Test the threat case boundary
The final answer refuses, but telemetry shows the secret reached a tool. Did the trial pass?
Reveal the design reasoning
No. The protected disclosure failed. Repair the enforceable boundary and rerun affected paths, keeping detector and final-language behavior as separate observations.
Decision: Report tested boundaries, observed consequences and residual threat-model limits.
Observe the boundary, not only the sentence
The assistant refuses in its final answer. Has the tool boundary passed?
Only if the authoritative operation evidence shows the forbidden effect did not occur. A late output block cannot undo an earlier action. Test the executor and data movement directly.
Nine of 300 selected adversarial trials violate a rule. Is real-world attack probability 3%?
No. Three percent is the observed fraction in the constructed suite. Cases and repeats are related, and the suite is not a random sample of all attacks. Report families, mechanisms and limits alongside the count.
The observation channel fails during a timeout case. Should the test pass because no violation was seen?
No. Mark it inconclusive and recover authoritative evidence where possible. Missing telemetry does not establish that an effect was absent. Preserve the same uncertainty the application must handle.
Northwind decision log
- Define assets, influence paths and observable authority invariants before selecting cases.
- Separate distinct cases, repeated trials, benign blocks and inconclusive outcomes.
- Turn failures into mechanism-focused regression gates and retest changed capabilities.
Go deeper: structured threat reasoning
- Video lecture: 3GSE '14 — Elevation of Privilege: Drawing Developers into Threat Modeling, Adam Shostack, USENIX. Explore a concrete way to draw teams into threat identification.
- Book chapter: Threat Modeling: Designing for Security, first edition, chapter 1: Dive In and Threat Model!, Adam Shostack. Begin from the system and what can go wrong; the publisher link provides the contents.
- Book chapter: Threat Modeling: Designing for Security, first edition, chapter 4: Attack Trees, Adam Shostack. Organize adversarial paths rather than counting unrelated payloads.
- Primary document: Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile, NIST. Connect evaluation evidence to an explicit risk-management process.
This completes the narrative reading path, including its optional depth chapters. Return to the capstone with a specific unresolved constraint: trace permitted evidence, authorized proposals, observed effects and accepted outcomes, then select the relevant lesson rather than adding components without a diagnosed need.