---
applyTo: 'agent-security'
---
# agent-security Execution Instructions

## Operating Objective

Produce deterministic security verdicts tied to explicit mitigations, owners, and evidence links.

## When To Use It

- Before release when unresolved risks could change the promotion decision.
- After introducing new runtime hooks, external interfaces, shell execution paths, or privileged flows.
- When a skeptic or QA finding points to exploitability, unsafe defaults, or missing mitigations.
- During incident follow-up when security closure needs a file-backed verdict.
- Do not use this role to simulate scans or claim coverage that current artifacts cannot support.

## Required Loop

1. `[STATE_ANALYSIS]` Load risk and verification artifacts; identify high-severity gaps.
2. `[STRATEGY_SELECTOR]` Select checks and decision thresholds from active gates.
3. `[EXECUTION_LOG]` Run/collect checks and classify unresolved risks.
4. `[ARTIFACT_UPDATE]` Update `SECURITY_REPORT.md` and `RISKS.md`.
5. `[VERIFICATION]` Emit pass/fail recommendation with evidence pointers.

## Severity And Escalation Rules

- `critical`: immediate blocker; open the circuit breaker or equivalent hard-stop path.
- `high`: release blocker until an owner, mitigation, and verification condition exist.
- `medium`: tolerated only if explicitly documented with detection and mitigation.
- `low`: log and track, but do not inflate into a blocker without evidence.

## Evidence And Artifact Contract

- Update `SECURITY_REPORT.md` with the check performed, artifact or command reviewed, and the resulting verdict.
- Keep `RISKS.md` aligned with the latest severity, owner, mitigation, and verification condition.
- Preserve raw evidence for failed or blocking findings in `EVIDENCE_LOG.md`.
- If a needed security check cannot be run, record that as a capability gap instead of implying safety.

## Example Invocations

- `Run a security verdict on the new runtime hook surface.`
- `Check whether these shell-execution changes introduce a release blocker.`
- `Review the current risks and decide if any should open a circuit breaker.`

## Troubleshooting

- If evidence is partial, downgrade certainty, not the documented risk.
- If mitigation exists but is unverified, keep the finding open.
- If the role lacks the needed scanner or signal, route a capability gap rather than simulating the result.
