Why the edges
A model, a repository, an agent or a person is not safe or dangerous on its own. Risk appears where one thing can reach, call, read, change or act for another. Keryn models those connections first and the things they connect second.
| Term | Meaning |
|---|---|
| Edge | A directed relationship: one thing reaches, calls, reads, writes, sends to, grants, depends on or trusts another. |
| Trust boundary | An edge where authority changes: user input into a prompt, model output into a shell, an agent into a tool, a workflow into an outside service. |
| Reach | What one thing can affect through edges, directly or through a chain. |
| Chain | An ordered sequence of edges. An attack path is a chain an attacker can follow to a consequence. |
| Graph | The nodes and edges of a scope, each edge with its evidence. |
| Verdict | A recorded judgement on a finding: upheld, refuted, needs context, unsupported or declined. |
Why the edge is the unit
Section titled “Why the edge is the unit”An inventory answers “what do we have?”. A security decision asks “what can reach what, on whose authority, and what happens if that edge is abused?”
- A model does nothing until code sends it input and acts on its output.
- A tool is harmless until an agent is allowed to call it.
- A finding matters because of the path it sits on.
One chain you can check, edge by edge, is worth more than a long list of findings about separate things. Keryn’s AI-BOM is still there. It is the list of nodes the edges attach to.
One edge, in code
Section titled “One edge, in code”Model output into a shell is a trust boundary: authority changes at the call that runs it. The rule below names the two ends of the edge, the call that produces the text and the call that acts on it, and the finding shows the path between them.
import subprocess
from anthropic import Anthropic
client = Anthropic()
def fix_it(error_text):
reply = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=300,
messages=[{"role": "user", "content": "Give one shell command that fixes: " + error_text}],
)
command = reply.content[0].text
return subprocess.run(command, shell=True, capture_output=True)Rule
rules:
- id: acme.model-output-reaches-shell
languages: [python]
severity: ERROR
message: Text a model produced is run as a shell command. Treat it as untrusted input.
mode: taint
pattern-sources:
- pattern: $CLIENT.messages.create(...)
pattern-sinks:
- pattern: subprocess.run($CMD, ...)1 finding · 1 of 1 rules ran on 1 file
- error
acme.model-output-reaches-shellline 14proof 2 path-in-fileText a model produced is run as a shell command. Treat it as untrusted input.
Flow source (line 8) → propagation (line 8) → propagation (line 13)
return subprocess.run(command, shell=True, capture_output=True)
Result computed when this page was built. Run an example with the CLI
The inventory lists anthropic and the model. The finding is about the edge between them and the shell.
What follows
Section titled “What follows”- Every finding states its proof level, so a reader can tell a lead from evidence.
- A verdict is a second opinion recorded next to a finding. It never changes the finding’s proof.
- Scans run where the code is. Nothing leaves unless you press a button that names the destination. See local by design.
- The same input gives the same report and the same fingerprints.
Read next
Section titled “Read next”The edges section is the manual: trust boundaries, the eight edge kinds, paths, chains and chokepoints and agentic triage.
Where this stops today
Section titled “Where this stops today”Keryn does not yet keep one model of every edge. Today the edges appear as source-to-sink traces, the routes-to-tools view, workflow analysis and the exported evidence graph, which links findings, files, rules and AI components. Cross-file reach is one import level. See what Keryn does not do.