Inspiration
Autonomous developer agents increasingly draft real infrastructure commands during production incidents. A single unchecked line can drop a database table, flush a live cache under load, grant wildcard IAM permissions, or exfiltrate environment secrets. Safety claims are only persuasive when an operator or judge can mutate the proposed plan and watch the verdict, matched rule, line number, and affected resources update deterministically in front of them. BlastRadius Zero brings that verifiable action boundary and incident diagnostics console into a single offline page.
What it does
BlastRadius Zero separates proposed agent actions from execution through two coordinated layers:
- Verdict-First Diagnostics Console: Opens directly on one unified answer (
ALLOW,APPROVAL REQUIRED, orBLOCKED), the weighted blast score, and the exact deciding rule and line number. A single function (BlastTelemetry.verdict) drives the console, header, JSON/Markdown audits, and SARIF 2.1.0 export so they never disagree. - One-Click Interactive Verification: Judges can inject live attacks (
rm -rf /,DROP TABLE,iam:*wildcard,curlsecret exfiltration), load benign or approval-level plans (rolling restart, read-only query, autoscale to 50), or click Contain: apply safe plan to watch all four incident safe plans drop cleanly to score0(ALLOW). - Linked Rule Inspector, Map, and Containment Diff: Selecting any finding highlights its matched text, policy, effect, reached resources, and fix while flagging the exact editor gutter line and outlining reached resources on the blast-radius topology map. Toggle Before / After containment and inspect the longest-common-subsequence line diff from current plan to safe plan.
- Default-Deny Typed Action Boundary (Python + Browser Parity):
gate.pyandjs/manifest-gate.jsenforce the exact same closed vocabulary (read,test,delete,iam,compute,network) with strict parameter schemas, canonical virtual path checks, integer-cent per-replica compute cost caps (5 replicas at 1000 cents passes; 1001 cents fails), and default-deny network egress, complete with five one-click manifest presets. - Deterministic Modeled Telemetry and Honest Local Receipts:
js/telemetry.jsreplacesMath.random()with reproducible Mulberry32 recovery curves seeded by an FNV-1a hash of the real findings, clearly labeled as modeled simulations. Local receipts compute real WebCrypto SHA-256 digests and analysis timing while explicitly stating that no cloud execution occurred and all exports are unsigned. - Offline Action-Group Contract Adapter:
action_handler.pyexposesauthorizeAgentActionwith zero cloud SDK dependency and fail-closed handling on malformed inputs.
How we built it
gate.pyandjs/manifest-gate.jsmirror the same default-deny structured manifest policy in Python and JavaScript, cross-checked by parameterized parity tests.js/policy-engine.jsimplements deterministic heuristic scanning across security policies and fails closed (producing a blocking finding) if a scanner rule faults.js/telemetry.jsis a pure module computing verdicts, LCS containment diffs, weighted score breakdowns, scanner rule coverage, uint32 analysis fingerprints, and reproducible seeded recovery curves.js/app.jsrenders strictly from engine outputs and routes all editor text throughtextContentor an HTML escaper (verified against<img>,<svg onload>,<iframe>, and<script>XSS probes in headless Chrome).tests/runs bothnpm test(node:test) andpytestcompletely offline.
Challenges we ran into
Early versions had two classic safety-UI traps: three of the four scenario safe plans still triggered scanner rules (scores 60, 35, and 89) because explanatory comments contained risky tokens, so applying containment never reached ALLOW; and the header, verdict badge, and SARIF export used slightly different thresholds for low-score plans. Rewriting the safe plans with regression tests locking all 4 to score 0 (ALLOW) and unifying all views behind BlastTelemetry.verdict eliminated both contradictions. We also removed previously simulated container-lifecycle numbers so every receipt reports only genuine local WebCrypto SHA-256 digests and measured timing.
Accomplishments that we're proud of
- 145 passing automated tests, 0 failures: 73 Node tests (
npm test) and 72 Python tests (pytest), including 50+ parameterized Python/browser policy parity cases, malformed fail-closed checks, deterministic telemetry parity, demo-script contract checks, and automated source hygiene tests. (Two Python tests invoke the Node suite for parity and demo verification.) - 4 of 4 incident safe plans scan clean (
ALLOW, score0), 3 of 3 one-click plans match their engine verdict, and 4 of 4 attack injections block a clean plan on their own. - Zero external requests and zero XSS injections: Confirmed offline across desktop and mobile viewports with zero console errors and zero injected DOM elements under active XSS payloads.
What we learned
A text heuristic scanner is great for fast human-readable diagnostics, but real enforcement must sit on a closed, typed, default-deny action schema checked identically across languages. Honesty about boundaries (explicitly labeling curves as modeled, receipts as unsigned local digests, and the text scanner as heuristic rather than an AST parser) makes a security tool far more credible to engineers.
What's next for BlastRadius Zero
Replace the heuristic text scanner with real shell, SQL, and Terraform AST parsers; bind gate.py to an audited downstream executor with symlink-escape prevention; and validate action_handler.py in a real deployed cloud action-group environment with cryptographic signing from a hardware-backed runner.
Honest AI Disclosure
An AI coding assistant helped implement policy rules, deterministic telemetry, the verdict console UI, Python/Node parity tests, and documentation. I defined the default-deny policy invariants and honesty guardrails, reviewed every change, ran all 73 Node and 72 Python tests locally, and can explain all of the code. No AI model runs at runtime.
Built With
- ai
- cloud
- css3
- html5
- javascript
- security
