Security evaluation and response
Turn scoped assessments into reproducible evidence, release decisions, and practiced containment of AI-system incidents.
On this page
The question for today
What you’ll understand
- Build evaluation cases around concrete security invariants and authorized scope.
- Interpret zero observed failures with an explicit statistical bound.
- Connect model, data, tool, and identity evidence to incident containment and recovery.
A security assessment is useful when it changes a decision. It should reveal which invariant was tested, what observation would count as failure, and how the team would respond if that failure appeared in production. AI systems need this discipline across models, retrieval, identities, tools, and data pipelines. A model-only score cannot describe the security of a larger application whose external authorization service or artifact loader is misconfigured.
Design evidence for a claim
Start from a threat model and an explicit claim, such as a tenant cannot retrieve another tenant's documents through any exposed retrieval path. Define authorized scope, synthetic assets, isolated test environments, rate limits, and stop conditions. Use inert tools where a real external effect is unnecessary. The assessment should not create new privacy leaks or operational incidents simply to prove that a failure is conceivable.
Combine deterministic boundary tests with adversarial and exploratory cases. Include legitimate tasks so a defense that refuses everything does not appear successful. Preserve the system version, model identity, dataset and prompt variants, tool policy, seeds where meaningful, and expected outcomes. A failing trace should identify the component that crossed the boundary, making it possible to write a focused regression test after remediation.
Interpret absence of observed failure
Zero failures in a finite suite do not imply zero risk. For independent identical cases, a one-sided exact upper confidence bound with no failures solves (1 − p) to the power n equals alpha. This frequentist construction describes coverage over repeated experiments, not a posterior probability that the true rate lies below the number. More importantly, its target is the suite's sampling distribution, which may omit important attack families.
Report both statistical uncertainty and coverage gaps. Correlated paraphrases of one case may provide far less diversity than their count suggests. Separate automated judgments from human-reviewed consequences and assess whether the judge misses subtle unauthorized effects. Rerun relevant cases after model, schema, retrieval, permission, or serialization changes. A test result should remain attached to the exact configuration it supports rather than becoming a permanent product-wide safety badge.
Practice response before an incident
Map response actions to each asset: revoke a workload credential, disable a specific tool, quarantine a model release, stop a dataset import, or temporarily serve a restricted capability. These actions have different consequences and should not depend on improvising broad administrator access during a crisis. Keep an owner, a communication path, and tested runbooks. Preserve minimal authorized evidence while avoiding wholesale copying of sensitive prompts and documents.
Containment limits ongoing effects; eradication removes the cause; recovery restores an accepted state and validates it. An old model rollback is insufficient if compromised data will immediately retrain a new candidate or stolen credentials still work. Use post-incident review to update the threat model, regression suite, release gates, and monitoring. Track corrective work through completion and verify that the original failure is closed without silently breaking legitimate workflows.
Work it through
Report a zero-failure assessment accurately
A synthetic suite samples 300 independent, identically distributed cases from a defined test generator. It observes zero unauthorized effects. Calculate the one-sided 95% exact binomial upper bound and describe its scope.
Set alpha to 0.05 and solve (1 − p)^300 = 0.05 for p.
The upper bound is 1 − 0.05^(1/300) ≈ 0.00994, about 0.994% per generated case.
The large-n approximation gives −ln(0.05)/300 ≈ 0.00999, consistent with the exact result.
Report the defined generator, system version, and independence assumption. The bound does not cover omitted attack families or establish that production adversaries sample from this generator.
The assessment provides bounded evidence for a concrete configuration and distribution, while explicit coverage review addresses what the calculation cannot.
The living notebook
Explore the model
Interactive lab · probability
Observe what zero test failures can miss
Set an assumed failure probability p and independent trial count n. Exact binomial bars include the probability of zero failures even when p is positive. The toy model does not measure attack coverage, adaptivity, judge correctness, or real incident likelihood.
- Mean · np
- 5
- Variance · np(1−p)
- 2.5
- Total probability
- 1
These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forFinite testing can miss real failures; statistical bounds and threat-model coverage answer complementary questions.
Pause & reason
Check your understanding
Your turn
Try it yourself
A defined independent test generator produces zero failures in 600 cases. Approximate the one-sided 95% upper failure-rate bound. Then explain why disabling a vulnerable tool may contain an incident without removing its root cause.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Use the approximate 3/n rule with its assumptions; distinguish stopping an effect from repairing the faulty boundary.
Compare with the solution
The approximate bound is 3/600 = 0.005, or 0.5% per generated case under the independent identical-trial model. Disabling a tool can stop current effects while leaving incorrect authorization, poisoned artifacts, or compromised credentials in place. Recovery needs root-cause remediation and regression evidence before restoring that capability.
Keep the idea
Take it with you
- Assess concrete invariants under authorized scope and preserve reproducible evidence.
- Zero observed failures supports a bounded claim under explicit sampling assumptions.
- Response must contain effects, remove causes, and validate the restored system.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.