justrunme's picture
Redesign demo: audit certificate theme and verdict ledger
81e8580
Raw History Blame Contribute Delete
9.61 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Agent Security Contract</title>
<meta name="description" content="Policy engine demo of Agent Security Contract v0.2.1. Every tool call is checked against a pinned capability contract and fails closed. Runs entirely in your browser.">
<meta name="color-scheme" content="light">
<link rel="icon" href="./favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="./styles.css">
<link rel="stylesheet" href="./theme.css">
<meta name="theme-color" content="#f3eddc">
</head>
<body data-asc-status="loading">
<a class="skip" href="#verdict-card">Skip to decision</a>
<div class="topbar">
<button id="theme-toggle" type="button" aria-pressed="false">Switch to light theme</button>
</div>
<main>
<header class="hero cert">
<div id="seal" class="seal" aria-hidden="false"></div>
<p class="cert-kicker">Capability contract · pre-execution audit · fail-closed</p>
<h1>Agent Security Contract</h1>
<p class="promise">Every tool call an AI agent makes is checked against a signed-off capability contract. Fail closed.</p>
<p class="sub">
A <strong>policy engine demo</strong>, not a trained model. The published
<a href="https://github.com/justrunme/agent-security-contract/releases/tag/v0.2.1" target="_blank" rel="noopener noreferrer">ASC v0.2.1</a>
library evaluates a static tool-call trace against a YAML capability policy
pinned by SHA-256 catalog digest. Nothing is executed.
<strong>This page runs entirely in your browser</strong>: after the runtime
loads, traces and policies you enter are not sent to a server.
</p>
<div class="badges" aria-label="Demo facts">
<span class="badge">ASC v0.2.1</span>
<span class="badge">Apache-2.0</span>
<span class="badge">66 official scenarios</span>
<span class="badge">Runs in your browser</span>
<span class="badge">Fail-closed</span>
</div>
<nav class="links" aria-label="References">
<a href="https://justrunme.com/research/fail-closed-authorization-ai-agents/" target="_blank" rel="noopener noreferrer">Research</a>
<a href="https://justrunme.com/cases/agent-security-contract/" target="_blank" rel="noopener noreferrer">Case study</a>
<a href="https://github.com/justrunme/agent-security-contract" target="_blank" rel="noopener noreferrer">GitHub</a>
<a href="https://doi.org/10.5281/zenodo.24075886" target="_blank" rel="noopener noreferrer">DOI 10.5281/zenodo.24075886</a>
<a href="https://orcid.org/0009-0004-7583-4314" target="_blank" rel="noopener noreferrer">ORCID</a>
</nav>
<div id="status" class="status" data-state="loading">
<div class="progress" aria-hidden="true"><span id="progress-bar"></span></div>
<p id="status-text" class="status-text" role="status" aria-live="polite">Loading Pyodide 0.29.5 and the bundled ASC v0.2.1 library…</p>
</div>
</header>
<section id="insights" class="insights" aria-labelledby="insights-heading">
<div class="insights-head">
<h2 id="insights-heading">Audit at a glance</h2>
<span class="prov">Precomputed · official v0.2.1 corpus run bundled with this Space</span>
</div>
<div class="ins-grid">
<div class="card panel">
<h3>Verdict ledger: expected vs actual</h3>
<p class="hint">Each corpus scenario declares the verdict it expects. The grid counts what the library actually returned. Off-diagonal cells would be mistakes.</p>
<div id="ins-confusion" class="chart"></div>
<div id="ins-ledger" class="ledger" aria-label="One stamp per scenario. Tap a stamp to open it."></div>
<p class="hint" style="margin-top:.6rem">One stamp per scenario (A = ALLOW, B = BLOCK, R = REQUIRE_APPROVAL). Tap a stamp to open that case below.</p>
</div>
<div class="card panel">
<h3>Severity breakdown</h3>
<p class="hint">Corpus severity of each scenario, coloured by the verdict the library returned.</p>
<div id="ins-severity" class="chart"></div>
<h3 style="margin-top:1.1rem">Attack classes</h3>
<p class="hint">Corpus tag of each attack scenario.</p>
<div id="ins-tags"></div>
</div>
<div class="card panel wide">
<h3>Contract clauses</h3>
<p class="hint" id="ins-clauses-hint">Which clause of the contract decided each attack scenario.</p>
<div id="ins-clauses"></div>
</div>
</div>
</section>
<section id="verdict-card" class="card" data-verdict="" aria-live="polite">
<span class="label">Decision</span>
<p id="verdict-word" class="verdict-word">Waiting for runtime</p>
<div id="verdict-meta" class="verdict-meta"></div>
<p id="reason" class="reason"></p>
<p id="details" class="details"></p>
</section>
<section class="card" aria-labelledby="timeline-label">
<span class="label" id="timeline-label">Tool-call sequence</span>
<div id="timeline" class="timeline">
<p class="details">The call list appears after a scenario is evaluated.</p>
</div>
</section>
<section class="card" aria-labelledby="envelope-label">
<span class="label" id="envelope-label">Evidence envelope</span>
<div id="envelope-meta" class="verdict-meta"></div>
<div class="envelope-actions">
<button id="copy-envelope" type="button" disabled>Copy JSON</button>
<button id="download-envelope" type="button" disabled>Download JSON</button>
<button id="tamper" type="button" disabled>Tamper reason field</button>
<button id="restore-envelope" type="button" hidden>Restore original</button>
</div>
<p id="copy-status" class="details" hidden></p>
<p id="tamper-result" class="tamper-result" hidden></p>
<pre id="envelope" class="output"></pre>
</section>
<section aria-labelledby="gallery-heading">
<div class="gallery-head">
<div>
<h2 id="gallery-heading">Scenario gallery</h2>
<p class="details">Official v0.2.1 corpus. One click evaluates the selected trace against the demo policy.</p>
</div>
</div>
<div id="filters" class="filters" role="toolbar" aria-label="Filter scenarios"></div>
<h3 class="group-title" id="attack-heading">Attacks</h3>
<div id="gallery-attacks" class="grid"></div>
<h3 class="group-title" id="benign-heading">Benign controls</h3>
<div id="gallery-benign" class="grid"></div>
</section>
<section id="corpus-panel" class="card" aria-labelledby="corpus-heading">
<div class="corpus-head">
<div>
<h2 id="corpus-heading">Run the official corpus</h2>
<p class="details">Evaluates all 66 shipped scenarios in this browser and reports the verdicts the library actually produces.</p>
</div>
<button id="run-all" class="primary" type="button" disabled>Run all 66</button>
</div>
<div id="corpus-progress-wrap" hidden>
<div class="bar" aria-hidden="true"><span id="corpus-bar"></span></div>
<p id="corpus-progress" class="details"></p>
</div>
<p id="corpus-summary" class="summary"></p>
<div id="corpus-matrix" class="matrix" hidden></div>
<p id="corpus-legend" class="legend" hidden>
<span><i style="background:var(--allow)"></i>ALLOW, matches expected</span>
<span><i style="background:var(--block)"></i>BLOCK, matches expected</span>
<span><i style="background:var(--ask)"></i>REQUIRE_APPROVAL, matches expected</span>
<span><i style="background:var(--block); opacity:.7"></i>Mismatch or integrity failure</span>
</p>
</section>
<details class="advanced" id="advanced">
<summary>Advanced: edit the trace or policy</summary>
<p class="details" id="note">Choose a preset or paste a custom trace. If <code>tool_catalog</code> is omitted, the evaluator uses the policy catalog.</p>
<label class="label" for="preset">Corpus preset or custom trace</label>
<select id="preset" disabled>
<option value="path_traversal_relative">Loading presets…</option>
</select>
<div class="actions">
<button id="evaluate" type="button" disabled>Evaluate</button>
<button id="recompute" type="button" disabled>Recompute catalog digest</button>
</div>
<p id="digest-message" hidden></p>
<div class="editors">
<div>
<label class="label" for="trace">Tool-call trace (JSON)</label>
<textarea id="trace" spellcheck="false" disabled></textarea>
</div>
<div>
<label class="label" for="policy">Capability contract (YAML)</label>
<textarea id="policy" spellcheck="false" disabled></textarea>
</div>
</div>
</details>
</main>
<footer>
<p>
Library pin: ASC v0.2.1
(<code>768853bde5a56fcc6c9b486f52848761db1b0ef1</code>),
evaluated in the browser with Pyodide 0.29.5.
The evidence envelope digest is unkeyed: it is hash-checked, not signed.
</p>
<p>
Claims about corpus results belong to this official v0.2.1 corpus only.
This demo does not restate or extend them as a general safety guarantee.
</p>
</footer>
<script src="./insights.js" defer></script>
<script type="module" src="./app.js"></script>
</body>
</html>