Bravos · Threat model
The threat model, written next to the code.
Bravos keeps your threat model in the repository, as GuardLink annotations beside the code they describe. Ask your coding agent to annotate a file and it writes what the code is exposed to, what guards it and where the data goes, then runs GuardLink's lint until it reports no errors.
npm install -g @bugb-technologies/bravos/bravos-annotateWhat an annotation pass does.
Claims beside the code
Each annotation sits directly above the code it describes:
@exposessays what the code is exposed to,@mitigateswhat guards it,@flowswhere the data goes, and@auditwhat a person should look at.Names defined once
Assets, threats and controls each get an id in the definitions file under
.guardlink/. Every annotation reuses those ids, and none is defined twice.A slice at a time
The agent picks a budgeted slice, entry points and trust code first, and skips files teammates have in open pull requests. By default that is what you changed plus five files. Say "annotate at high" for more.
Lint until clean
After writing, the agent runs GuardLink's lint on the lines it wrote and applies each fix until there are no errors. Then it validates the model and reports the coverage change in one line.
A card for a serious new threat
When an edit adds a critical or high
@exposesthat no test has confirmed or refuted, a hook shows a card in your terminal: the severity, the claim and where it is, its state, and one next step.Untested until a test says so
An annotation alone confirms or refutes nothing. The agent never writes
@accepts,@entitlesor@confirmedby hand. A claim is marked confirmed or refuted only on evidence from a real run.
See it
The same model, as a picture.
bravos dashboard builds one page from the code as it stands and opens it in your browser. Its Threat model tab is GuardLink's own view of the repository, with who introduced and fixed each exposure. The Diagrams view there has a threat graph: assets, their threats, and the controls that cover them.
bravos dashboardbuild the page and open the Threat model tab in your browserbravos watchfollow along in a terminal, with every threat card listedbravos nextthe setup steps in order, annotation coverage among thembravos setup --guardlink-mode externalkeep annotations in .gal sidecars instead of source commentsbravos prefs set annotate off --by "<your name>"switch the background pass off for this clone
When it gets written
Ask for it, or let it keep up.
After you write security-relevant code.
When you write or change an endpoint, an auth check, a query, file or process handling, crypto or config parsing, ask the agent to annotate it. It annotates what you changed and runs the lint gate until clean.
/bravos-annotateOne pass each new session.
While coverage is under 100%, each new session asks the agent to start one annotation pass in a background subagent, beside whatever you asked. It writes annotations only, never code, and reports the files it covered and the coverage change in one line. In an agent without subagents it offers the pass instead.
At the end of each turn, on Team.
With bravos setup --autopilot, in Claude Code and Codex, the agent reviews the code it changed at the end of the turn, including edits inside files that are already annotated, so the threat model keeps up with no command to remember.
bravos setup --autopilotQuestions
Is annotating free?
Yes. Annotate is part of the Free plan and needs no licence, in any number of repositories. The dashboard's Threat model tab is free too.
Where is the threat model kept?
In your repository. By default the annotations are comments in the source files. With bravos setup --guardlink-mode external they go in .gal sidecars instead. There is no Bravos server and no Bravos database: your team shares the model through git.
Does an annotation mean the code is vulnerable?
No. It is a claim from reading the code, and it starts untested. Each claim has three independent states. It is open, mitigated or accepted. It is untested, confirmed or refuted. And it is verified or stale. Only an authorized test run against a target you own confirms or refutes it.
What if something looks dangerous but is intended?
The agent writes an "intended?" audit for you to answer. It never accepts a risk for you. Threats are judged against what your product intends, as written in SDR-0, the application's own security decision record (bravos records new --app), not only against code patterns. An older .guardlink/intent.md is still read.
Which agents can run it?
The six supported agents: Claude Code, Codex, Cursor, opencode, omp and Antigravity. In Claude Code the skill is the slash command /bravos-annotate. In the others, ask for bravos-annotate by name.
Does the agent commit the annotations?
Only as you say. bravos prefs set commits records once whether your agent commits the files Bravos writes, leaves them for you, or asks. Your own code is never part of such a commit.
What reads the threat model afterwards?
Your agent's session briefing says what is open around your code. SAST, on Team, reads the model as input, so annotate first. On Team the pre-PR gate validates the model and lints your new claims before a pull request opens.
Start your threat model.
Install the CLI, run bravos setup in your repository, then ask your agent to annotate a file.
npm install -g @bugb-technologies/bravosOpen your project in your coding agent, then paste this.