Adversarial Security Testing Sandbox¶
A network-isolated capability for running adversarial security tests against arbitrary code repositories, with an optional secure-fix handoff loop to a coding agent.
Why this exists¶
- A single, repeatable place to run hardening tests against code (your projects, sometimes others' with consent).
- Strong isolation: nothing the analyzed code does can leak outside the sandbox.
- A loop from finding → patch → re-test → signoff that can be automated under explicit controls.
High-level flow¶
flowchart LR
Repo[Target Repo] --> Scope[Target Scope Policy Check]
Scope --> Spawn[Launch Isolated Sandbox]
Spawn --> Plan[Test Plan]
Plan --> Tools[SAST/DAST/Fuzz/Adversarial-LLM]
Tools --> Findings[Finding Reports]
Findings -- triage --> Decision{Severity?}
Decision -- critical/high --> Handoff[secure-fix-handoff]
Decision -- medium/low --> Backlog[Backlog]
Handoff --> CodingAgent[Coding Agent]
CodingAgent --> Sandbox2[Re-test]
Sandbox2 --> Findings2[Re-evaluation]
Findings2 -- closed --> Signoff[Signoff Checklist]
Findings2 -- still open --> Handoff
Hard guardrails¶
- Default-deny outbound network in the sandbox container (SPB-11).
- Filesystem isolation: only the target repo + per-test workspace; no host paths.
- Treat all analyzed code as untrusted.
- All findings, tool calls, and applied fixes are audited per
audit/security-audit-log-spec.md(SPB-12). - Human approval before any non-read-only external interaction.
Files¶
| File | Purpose |
|---|---|
policies/sandbox-policy.yaml |
Isolation and execution constraints. |
policies/target-scope-policy.yaml |
Legal/ethical scope. |
templates/test-plan.template.md |
Per-repo adversarial test plan. |
templates/finding-report.template.md |
Normalized finding format. |
workflows/security-loop.md |
Find → fix → re-test cycle. |
runbooks/launch-isolated-sandbox.md |
Sandbox bring-up. |
runbooks/secure-fix-handoff.md |
Safe handoff to coding agent. |
audit/security-audit-log-spec.md |
Event schema. |
Ownership¶
| Artifact | Owner |
|---|---|
sandbox-policy.yaml, target-scope-policy.yaml |
security |
test-plan.template.md, finding-report.template.md |
security engineering |
security-loop.md |
security + platform (co-owned) |
runbooks/* |
operations |
security-audit-log-spec.md |
security + compliance |
Incremental rollout¶
- Publish
target-scope-policy.yamlandsandbox-policy.yaml; one policy-only review. - Validate isolated container launch via
launch-isolated-sandbox.mdagainst a low-stakes test repo. - Run one adversarial test using
test-plan.template.md; produce one report fromfinding-report.template.md. - Run one controlled fix handoff via
secure-fix-handoff.md; re-test and document outcome. - Validate audit output against
security-audit-log-spec.md; one tabletop incident drill.
Acceptance checks¶
- Every security run is authorized by scope policy before execution.
- Sandbox isolation checks pass before any adversarial test starts.
- Findings are reproducible and mapped to concrete remediation actions.
- Fix handoff loops are bounded and auditable end-to-end.
- No unresolved critical findings remain in a run marked as hardened.