Spaces:
Running

AiStackGuru / index.html
Check1233's picture
Update index.html
a9b6136 verified
Raw History Blame Contribute Delete
19.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Blast Radius β€” what one bad instruction reaches</title>
<meta name="description" content="Toggle the permissions you've granted an AI agent and see what a single hostile instruction could reach. Permissions compose; the dangerous configurations are horizontal.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500&display=swap" rel="stylesheet">
<style>
:root{
--ground:#0F1C1E;
--panel:#16292C;
--panel-2:#1D3437;
--line:#2C4A4E;
--light:#E7E9E2;
--dim:#8FA39F;
--teal:#4E858A;
--moss:#93A487;
--ochre:#C79A34;
--oxide:#B04A38;
--display:"Bricolage Grotesque","Arial Black",system-ui,sans-serif;
--body:"IBM Plex Sans",system-ui,-apple-system,sans-serif;
--mono:"IBM Plex Mono",ui-monospace,monospace;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{background:var(--ground);color:var(--light);font-family:var(--body);font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased}
.wrap{max-width:1080px;margin:0 auto;padding:32px 20px 64px}
.masthead{border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:28px}
.eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--teal);margin:0 0 10px}
h1{font-family:var(--display);font-weight:700;font-size:clamp(30px,5.2vw,54px);line-height:.98;letter-spacing:-.02em;margin:0 0 12px;max-width:15ch}
.standfirst{margin:0;max-width:58ch;color:var(--dim);font-size:17px}
.grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:36px;align-items:start}
@media (max-width:880px){ .grid{grid-template-columns:1fr;gap:28px} }
h2{font-family:var(--display);font-weight:700;font-size:18px;margin:0 0 4px}
.note{font-size:14px;color:var(--dim);margin:0 0 16px;max-width:54ch}
.block{margin-bottom:32px}
.capgroup{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--teal);margin:20px 0 6px;padding-bottom:5px;border-bottom:1px solid var(--line)}
.capgroup:first-of-type{margin-top:0}
.cap{display:flex;gap:12px;align-items:flex-start;padding:9px 8px;margin:0 -8px;cursor:pointer;border-radius:2px}
.cap:hover{background:var(--panel)}
.cap input{width:auto;margin-top:4px;flex-shrink:0;accent-color:var(--teal)}
.cap input:focus-visible{outline:2px solid var(--moss);outline-offset:2px}
.cap .lab{font-size:15px}
.cap .sub{display:block;font-size:13px;color:var(--dim);line-height:1.4}
.cap.mitigation .lab{color:var(--moss)}
/* ---------- signature: containment diagram ---------- */
.core{position:sticky;top:24px}
@media (max-width:880px){ .core{position:static} }
.gauge{border-top:1px solid var(--line);padding-top:14px;margin-bottom:16px}
.gauge dt{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--dim);margin-bottom:2px}
.gauge dd{margin:0 0 14px;font-family:var(--display);font-weight:700;font-size:32px;line-height:1;letter-spacing:-.02em}
.gauge dd small{display:block;font-family:var(--body);font-weight:400;font-size:13px;color:var(--dim);margin-top:5px;letter-spacing:0;line-height:1.45}
.band-contained{color:var(--moss)}
.band-low{color:var(--teal)}
.band-moderate{color:var(--ochre)}
.band-high{color:var(--oxide)}
svg{display:block;width:100%;height:auto;background:var(--panel);border:1px solid var(--line)}
.caption{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--dim);margin:8px 0 20px}
.chains{list-style:none;margin:0;padding:0}
.chains li{border-left:3px solid var(--oxide);background:var(--panel);padding:10px 12px;margin-bottom:8px}
.chains strong{display:block;font-size:14px;margin-bottom:2px}
.chains span{font-size:13px;color:var(--dim);line-height:1.45}
.chains li.clear{border-left-color:var(--moss)}
.copybtn{margin-top:14px;width:100%;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;background:transparent;border:1px solid var(--line);color:var(--dim);padding:11px;cursor:pointer}
.copybtn:hover{border-color:var(--moss);color:var(--light)}
.copybtn:focus-visible{outline:2px solid var(--moss);outline-offset:2px}
.outro{margin-top:40px;border-top:1px solid var(--line);padding-top:20px}
.outro p{max-width:58ch;font-size:15px}
.cta{display:inline-block;margin-top:6px;background:var(--light);color:var(--ground);text-decoration:none;font-family:var(--mono);font-size:12px;letter-spacing:.1em;text-transform:uppercase;padding:13px 22px}
.cta:hover{background:var(--moss)}
.cta:focus-visible{outline:2px solid var(--moss);outline-offset:3px}
.fineprint{font-size:12px;color:var(--dim);margin-top:20px;max-width:62ch}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@media (prefers-reduced-motion:reduce){ *{transition:none!important;animation:none!important} }
</style>
</head>
<body>
<div class="wrap">
<header class="masthead">
<p class="eyebrow">AiStackGuru Β· Field tool 02</p>
<h1>What one bad instruction reaches</h1>
<p class="standfirst">Assume an agent will, at some point, faithfully execute an instruction it read somewhere. The question isn't whether that happens. It's what it can reach when it does. Permissions compose β€” and the dangerous configurations are almost always horizontal.</p>
</header>
<div class="grid">
<main>
<div class="block">
<h2>What has this agent been granted?</h2>
<p class="note">Tick what's true of one agent β€” not your whole stack. Run it again per agent. Nothing here leaves your browser.</p>
<div id="caps"></div>
</div>
<div class="outro">
<p><strong>None of the mitigations depend on the model behaving.</strong> That's the point of them. Filtering and better instructions reduce volume; they aren't boundaries, because they need to succeed every time against input someone else chose.</p>
<a class="cta" href="https://www.youtube.com/@AiStackGuru">Watch the boundary-layer build</a>
<p class="fineprint">A scoring heuristic, not an assessment of your specific system β€” use it to find the combination you hadn't considered, not as a verdict. Anything touching financial accounts deserves a real review; guidance here is educational and is not financial advice.</p>
</div>
</main>
<aside class="core" aria-label="Blast radius summary">
<dl class="gauge">
<dt>Blast radius</dt>
<dd id="band" class="band-contained">Contained<small id="bandNote">Nothing granted yet.</small></dd>
<dt>You'd likely notice in</dt>
<dd id="window" style="font-size:24px">β€”<small id="windowNote">Detection window depends on autonomy and logging.</small></dd>
</dl>
<svg id="diagram" viewBox="0 0 340 340" role="img" aria-labelledby="diagTitle">
<title id="diagTitle">Containment diagram: capabilities outside the boundary and the chains between them</title>
<g id="chords"></g>
<g id="spokes"></g>
<circle cx="170" cy="170" r="62" fill="none" stroke="#4E858A" stroke-width="1" stroke-dasharray="4 5"/>
<circle cx="170" cy="170" r="17" fill="#1D3437" stroke="#93A487" stroke-width="1.5"/>
<text x="170" y="174" text-anchor="middle" font-family="IBM Plex Mono, monospace" font-size="9" fill="#E7E9E2">agent</text>
<g id="nodes"></g>
</svg>
<p class="caption">Solid spoke = granted. Red chord = a composed capability.</p>
<h2 style="font-size:15px;margin-bottom:8px">Composed capabilities</h2>
<ul class="chains" id="chains"></ul>
<button class="copybtn" id="copy" type="button">Copy summary</button>
</aside>
</div>
</div>
<script>
(function(){
const CAPS = [
{g:"Mail and calendar", id:"mail_read", label:"Read email", sub:"Inbox, archives, attachments", w:3, node:"Mail"},
{g:"Mail and calendar", id:"mail_send", label:"Send email as you", sub:"Not drafts β€” actually sends", w:4, node:"Outbound"},
{g:"Mail and calendar", id:"calendar", label:"Read calendar", sub:"Meetings, attendees, travel", w:1, node:"Calendar"},
{g:"Files and code", id:"files_read", label:"Read files or drive", sub:"Documents, exports, notes", w:3, node:"Files"},
{g:"Files and code", id:"files_write",label:"Write or delete files", sub:"Including overwrite", w:4, node:"Write"},
{g:"Files and code", id:"repo_write", label:"Write to a code repository", sub:"Push, branch, or merge", w:4, node:"Repo"},
{g:"Files and code", id:"ci", label:"Trigger builds or deploys", sub:"CI pipeline with build secrets",w:5, node:"CI"},
{g:"Network", id:"net", label:"Request arbitrary URLs", sub:"No egress allowlist", w:3, node:"Egress"},
{g:"Network", id:"render", label:"Output rendered as HTML or markdown", sub:"Remote images load in a browser", w:2, node:"Render"},
{g:"Money", id:"finance", label:"Financial or wallet access", sub:"Payments, exchange keys, signing", w:8, node:"Funds"},
{g:"How it runs", id:"autonomous", label:"Runs unattended", sub:"Scheduled or event-triggered, no human watching", w:2, node:"Unattended"},
{g:"How it runs", id:"untrusted", label:"Reads content you didn't write", sub:"Web pages, inbound mail, PDFs, issue comments", w:2, node:"Untrusted"},
{g:"Mitigations", id:"m_human", label:"Human approves irreversible actions", sub:"Sends, merges, deploys, signatures", w:0, mit:true},
{g:"Mitigations", id:"m_logs", label:"Logs the agent can't edit", sub:"External, append-only, denials recorded", w:0, mit:true},
{g:"Mitigations", id:"m_split", label:"Reader has no tools or credentials", sub:"Untrusted content never reaches the component with capability", w:0, mit:true},
{g:"Mitigations", id:"m_scoped", label:"Own credential, capped and expiring", sub:"Per agent, with spend cap and rate limit", w:0, mit:true}
];
const state = Object.fromEntries(CAPS.map(c => [c.id, false]));
const CHAINS = [
{ need:["mail_read","mail_send"], name:"Account recovery chain",
why:"Your inbox is a password-reset engine. Something that can both read mail and send it can trigger resets and consume them.",
fix:"m_human" },
{ need:["files_read","net"], name:"Exfiltration path",
why:"Everything readable can leave in a query string. The only missing piece is a trigger.",
fix:"m_split" },
{ need:["files_read","render"], name:"Rendered-output leak",
why:"A remote image reference in the output makes the browser fetch it β€” with whatever ended up in the URL. The user sees a broken image.",
fix:"m_split" },
{ need:["repo_write","ci"], name:"Build execution",
why:"Write access plus a pipeline trigger is code execution in your build environment, with your build secrets.",
fix:"m_human" },
{ need:["calendar","mail_send"], name:"Credible impersonation",
why:"Real meeting details plus your address makes social engineering against your contacts convincing.",
fix:"m_human" },
{ need:["files_write","autonomous"], name:"Silent overwrite",
why:"Destructive writes on a schedule, with nobody present at the moment they happen.",
fix:"m_logs" },
{ need:["finance","autonomous"], name:"No recovery path",
why:"Financial actions taken unattended are the one category with no cheap undo.",
fix:"m_human" },
{ need:["untrusted","net"], name:"Instruction-to-egress",
why:"Content you didn't write can influence what the agent requests, and outbound requests carry data.",
fix:"m_split" },
{ need:["untrusted","mail_send"], name:"Instruction-to-send",
why:"Something in an inbound message can shape an outbound one sent under your name.",
fix:"m_human" }
];
const capsEl = document.getElementById("caps");
const chainsEl = document.getElementById("chains");
let group = null;
CAPS.forEach(c => {
if (c.g !== group){
group = c.g;
const h = document.createElement("div");
h.className = "capgroup";
h.textContent = group;
capsEl.appendChild(h);
}
const lb = document.createElement("label");
lb.className = "cap" + (c.mit ? " mitigation" : "");
const cb = document.createElement("input");
cb.type = "checkbox"; cb.id = "c_" + c.id;
cb.addEventListener("change", e => { state[c.id] = e.target.checked; render(); });
const txt = document.createElement("span");
txt.className = "lab";
txt.textContent = c.label;
const sub = document.createElement("span");
sub.className = "sub";
sub.textContent = c.sub;
txt.appendChild(sub);
lb.append(cb, txt);
capsEl.appendChild(lb);
});
const active = () => CAPS.filter(c => !c.mit && state[c.id]);
const mits = () => CAPS.filter(c => c.mit && state[c.id]);
function score(){
let s = active().reduce((n,c) => n + c.w, 0);
const live = CHAINS.filter(ch => ch.need.every(id => state[id]));
s += live.length * 4;
if (state.autonomous && s > 0) s = Math.round(s * 1.35);
s -= mits().length * 4;
if (state.m_split && state.untrusted) s -= 4;
return { s: Math.max(0, s), live };
}
function drawDiagram(){
const on = active();
const R = 132, cx = 170, cy = 170;
const pos = {};
on.forEach((c,i) => {
const a = (-Math.PI/2) + (i / Math.max(1,on.length)) * Math.PI * 2;
pos[c.id] = { x: cx + Math.cos(a)*R, y: cy + Math.sin(a)*R, c };
});
const nodesG = document.getElementById("nodes");
const spokesG = document.getElementById("spokes");
const chordsG = document.getElementById("chords");
const NS = "http://www.w3.org/2000/svg";
const mk = (t,attrs) => { const e = document.createElementNS(NS,t); for(const k in attrs) e.setAttribute(k,attrs[k]); return e; };
spokesG.replaceChildren(...on.map(c => {
const p = pos[c.id];
return mk("line",{x1:cx,y1:cy,x2:p.x,y2:p.y,stroke:c.id==="finance"?"#B04A38":"#2C4A4E","stroke-width":c.w>=4?2:1});
}));
const live = CHAINS.filter(ch => ch.need.every(id => state[id]));
chordsG.replaceChildren(...live.filter(ch => ch.need.every(id => pos[id])).map(ch => {
const a = pos[ch.need[0]], b = pos[ch.need[1]];
return mk("path",{
d:`M ${a.x} ${a.y} Q ${cx} ${cy} ${b.x} ${b.y}`,
fill:"none", stroke:"#B04A38", "stroke-width":2, opacity:.75
});
}));
const nodes = [];
on.forEach(c => {
const p = pos[c.id];
const fill = c.id==="finance" ? "#B04A38" : c.w>=4 ? "#C79A34" : "#4E858A";
nodes.push(mk("circle",{cx:p.x,cy:p.y,r:6,fill,stroke:"#0F1C1E","stroke-width":1.5}));
const t = mk("text",{
x:p.x, y:p.y + (p.y < cy ? -12 : 17),
"text-anchor": p.x > cx+30 ? "end" : p.x < cx-30 ? "start" : "middle",
"font-family":"IBM Plex Mono, monospace","font-size":"9.5",fill:"#8FA39F"
});
t.textContent = c.node;
nodes.push(t);
});
nodesG.replaceChildren(...nodes);
}
function render(){
const { s, live } = score();
let band, note, cls;
if (active().length === 0){ band="Contained"; cls="band-contained"; note="Nothing granted yet."; }
else if (s <= 5) { band="Low"; cls="band-low"; note="Narrow reach. Verify the scope you actually granted, not the one you remember."; }
else if (s <= 14) { band="Moderate"; cls="band-moderate"; note="Real reach. Split the component that reads untrusted content from the one that holds credentials."; }
else if (s <= 26) { band="Wide"; cls="band-high"; note="A single hostile instruction has somewhere useful to land. Gate the irreversible actions behind a human."; }
else { band="Severe"; cls="band-high"; note="Compromise here has no cheap undo. Reduce grants before adding controls β€” the fastest fix is removing a capability."; }
const bandEl = document.getElementById("band");
bandEl.firstChild.nodeValue = band;
bandEl.className = cls;
document.getElementById("bandNote").textContent = note;
let win, winNote;
if (active().length === 0){ win="β€”"; winNote="Detection window depends on autonomy and logging."; }
else if (state.m_logs && !state.autonomous){ win="Minutes"; winNote="Present, and logging outside the agent's reach. Best case."; }
else if (state.m_logs){ win="Hours"; winNote="Unattended, but there's a record you can read afterwards."; }
else if (!state.autonomous){ win="Days"; winNote="You'd probably catch it eventually, by noticing something odd."; }
else { win="Weeks or never"; winNote="Runs unattended with no independent record. There is nothing to notice with."; }
const winEl = document.getElementById("window");
winEl.firstChild.nodeValue = win;
winEl.className = (win==="Weeks or never") ? "band-high" : "";
document.getElementById("windowNote").textContent = winNote;
if (live.length === 0){
const li = document.createElement("li");
li.className = "clear";
const st = document.createElement("strong");
st.textContent = active().length ? "No composed capabilities" : "Nothing granted";
const sp = document.createElement("span");
sp.textContent = active().length
? "Individually these don't chain into anything worse. Re-check after every new grant β€” the chains appear from combinations, not from single permissions."
: "Tick what one agent has been granted.";
li.append(st, sp);
chainsEl.replaceChildren(li);
} else {
chainsEl.replaceChildren(...live.map(ch => {
const li = document.createElement("li");
const st = document.createElement("strong");
st.textContent = ch.name;
const sp = document.createElement("span");
const fixed = state[ch.fix];
const fixLabel = (CAPS.find(c => c.id === ch.fix) || {}).label || "";
sp.textContent = ch.why + (fixed ? " \u2713 Mitigated by: " + fixLabel + "." : " Fix: " + fixLabel + ".");
if (fixed) li.className = "clear";
li.append(st, sp);
return li;
}));
}
drawDiagram();
}
document.getElementById("copy").addEventListener("click", async e => {
const { s, live } = score();
const txt = [
"Agent blast radius",
"Band: " + document.getElementById("band").firstChild.nodeValue.trim() + " (score " + s + ")",
"Detection window: " + document.getElementById("window").firstChild.nodeValue.trim(),
"",
"Granted:",
...active().map(c => "- " + c.label),
"",
"Mitigations in place:",
...(mits().length ? mits().map(c => "- " + c.label) : ["- none"]),
"",
"Composed capabilities:",
...(live.length ? live.map(c => "- " + c.name + (state[c.fix] ? " (mitigated)" : "")) : ["- none"])
].join("\n");
try { await navigator.clipboard.writeText(txt); e.target.textContent = "Copied"; }
catch { e.target.textContent = "Copy blocked β€” select the panel instead"; }
setTimeout(() => { e.target.textContent = "Copy summary"; }, 2200);
});
render();
})();
</script>
</body>
</html>