November 19, 2026
Continuous Threat Modeling and Penetration Testing as Code using Bravos

By shahid.exe
7 min read
Most security tools live somewhere else. A scanner runs in CI, a threat model sits in a wiki, and a pentest report arrives weeks after the code it describes. Meanwhile the work that changes security happens in one place: the session where a developer and a coding agent write the code.
Bravos puts security work in that session. It is a skills pack for the coding agent you already use. It makes the agent a power user of four tools: GuardLink for the threat model, cxg for authorized tests, a code graph for reachability, and licensed static analysis. The agent does the work with the real tools, in your repository, and the results are shared through git like everything else.
There is no Bravos server and no Bravos database. The threat model lives in your code, the evidence comes from real test runs, and your team reads both from the repository.
Why the coding agent
Threat models go stale because they are written once and kept away from the code. Findings go stale because nobody knows which code they were about. The coding agent sits exactly where both problems start. It reads the code, it changes the code, and it is already there when a new endpoint or an auth check is written.
What it lacks is memory and method. Each session starts fresh, and nothing tells it what is already known, what is open, or how a claim should be proven. Bravos supplies both. A hook hands the agent the repository's security picture at the start of every session, and a set of skills gives it a method for each job: annotate, test, recheck, gate.
If you read our earlier post on GuardLink and cxg, Bravos is the layer that makes that loop happen without anyone remembering the commands.
What happens when a session starts
You open your agent and say anything. Before you type, a hook has gathered the repository's security picture: open exposures, confirmed exploits, what to test next, stale claims, tickets, teammates' open pull requests and what the app is meant to do. It hands that picture to the model, so you never need a command to load it. In Claude Code you also see the Bravos banner above your first prompt.
From there Bravos keeps working alongside you.
- Threat cards. When an edit adds a critical or high threat that no test has confirmed or refuted, a card appears in your terminal straight away, with the severity, where the claim is, and the one next step. The agent raises it in the same reply. It never confirms, refutes or accepts a threat itself.
- The coach. Before each prompt a fast hook may add one line for the agent, such as claims waiting to be confirmed or coverage that could grow. Each topic comes up at most once a session.
- Background annotation. While the threat model doesn't cover every file, each new session asks the agent to start one annotation pass in a background subagent. It writes annotations only, never code.
- A live view.
bravos watchruns in a second terminal pane beside your agent. It is read-only and runs no model, and it redraws within seconds of a change.
The loop, run by your agent
Every claim moves through one loop. An annotation says code is exposed or mitigated. It becomes a cxg test. An authorized run tests it against a target you own. The result is recorded in GuardLink. And it is rechecked when the code changes.
Each step is a skill your agent runs. In Claude Code you invoke one as a slash command, in Codex with a dollar sign, or you just say what you want and the agent picks the skill.
First, the agent learns what the app intends. The bravos-context skill records what the product is for, who uses it, the data that matters, what must never happen, and what looks dangerous but is intended. Severities are then judged against this product, not against code patterns alone. Then the loop runs.
- Annotate. The bravos-annotate skill picks a budgeted slice of code, entry points first, writes GuardLink annotations to its evidence bar, and runs the lint gate until it is clean.
- Trace and scan. The bravos-codegraph skill answers bounded questions about routes, sinks and blast radius without reading the whole tree. The bravos-sast skill runs static analysis joined to the threat model. A static finding is a lead, never a confirmation.
- Write the test. The bravos-templatize skill turns open exposures into validated cxg templates, following GuardLink's own translate method.
- Prove it. The bravos-env skill brings up a target you own, and the bravos-prove skill runs the test, reads cxg's report and records the outcome in GuardLink's hypothesis ledger as confirmed or refuted, with the evidence.
- Recheck after a fix. The bravos-recheck skill replays the saved test, re-verifies stale claims, and checks that the fix added no new exposure.
- Gate the pull request. The bravos-ship skill validates the model, lints the branch's new claims, lists new exposure the pull request must disclose, and refuses to ship a confirmed exploit on a changed path.
When the code changes, the claims it touched go back in the queue and the loop runs again.
Only a reproduced run confirms a finding. Reading code never does.
Intent first
Most tools judge code by its patterns. Bravos starts by asking what the software is meant to do, because the same line of code can be a vulnerability in one product and a feature in another.
The bravos-context skill drafts the product's intent from the README, docs and code, then opens a review page where people confirm it. Answers are pre-filled with suggestions and their sources, and only what a named person agreed to counts as confirmed. The agent never confirms for you. You can give it your own design documents too: PRDs, design docs or an earlier threat model. Each is kept in the repository, after a check for secrets and local paths, and every rule then names the document it came from.
Rules written that way can be tested. "Sales may see every report except the revenue report" becomes a rule a test can try to break, where a scanner would see nothing wrong. bravos ruleslists every rule your design states with its status: broken, retest due, unguarded, guarded but untested, not placed, or holds.
Researching software you don't own? The same skill drafts intent from upstream's own docs instead and asks only the scope decisions, such as which configuration to rate against and which attackers are in scope.
The hard rules
Bravos lets an agent run security tests, so a few rules are not negotiable.
- Authorization. No request goes to any host other than loopback without a committed, reviewed scope file and your own typed authorization naming the target.
- Destructive tests. Denial of service and other destructive classes run only against a disposable loopback target.
- Credentials. Never invented. Test users and sessions are seeded or captured for real, or the run waits for you.
- No hidden agents. The agent in your session does the work. Bravos never spawns another agent CLI, and it never uses cxg's model API probe generation. The tests it runs are the ones written and reviewed in your session.
- Governance. Agents never write a risk acceptance or an entitlement, because those are a human's decision. They never record a confirmed exploit without reproduction evidence in hand.
How findings get proven is your team's call, not a fixed rule. The first time it comes up the agent asks once: prove automatically on your loopback target, ask each time, on a schedule, or not now. Your answer is recorded in the repository, and every briefing shows it.
Gates that keep up
Once the threat model exists, Bravos makes it hold.
- Autopilot. At the end of each turn the agent reviews the code it changed, including edits inside annotated files, and follows the recorded proving choice for the claims it touched.
- The pre-PR gate. It runs on every pull request the agent opens, and no pull request goes out with undisclosed exposure or a confirmed exploit on a changed path.
- CI and nightly. The same gate runs in GitHub Actions for the whole team, and a nightly workflow keeps annotating while laptops are closed. A team can also have the nightly open one GitHub issue for each critical or high threat still untested two days after it was committed. A refutation, a fix or a named person's acceptance closes it by itself.
What it looks like on a real repository
Here is bravos next, run on GuardLink's own repository. It is free, runs no model, and shows which of nine setup steps are done, what each one unlocks, and the exact next step.
The steps build on each other in that order: the code graph, what the app intends, annotation coverage, static analysis, how findings are proven, a test target, and then the gates. Each line names the skill or command for it, so a developer who has never threat modelled anything can follow it one step at a time.
Plans
Bravos is proprietary software from Bugb. GuardLink and cxg, the tools it drives, are open source.
- Free needs no account or licence. It covers one person researching their repositories, each on its own with no limit on how many, including the whole threat model and authorized testing loop: context, annotate, templatize, env, prove, recheck, report and watch.
- Team is licensed per developer, and Solo is one seat. It adds the pre-PR gate and autopilot, CI and nightly workflows, scheduled upkeep, multi-repository workspaces, campaigns, static analysis and the code graph.
bravos account activate starts a 30-day Team trial with no card when your account has no plan. Without a licence, a paid command explains what it would do, and a paid hook stands down with one line and never blocks your work.
Getting started
Bravos needs Node.js 20 or newer.
npm install -g @bugb-technologies/bravos
bravos setupnpm install -g @bugb-technologies/bravos
bravos setupRun bravos setup in a repository, in a terminal. It asks one question at a time: an optional sign-in you can skip to stay on Free, the tools to install, your agents, pull request checks, a scheduled run, and how testing is allowed. It shows every change and writes nothing until you choose Apply.
Then open your coding agent and say anything. Bravos begins with what the app is for. If you'd rather be shown around, ask the agent "help me get started".
bravos next
bravos watch
bravos guidebravos next
bravos watch
bravos guidebravos next shows your setup progress and the next step, bravos watch keeps the live view open beside your agent, and bravos guide explains every skill by role and by task.
Closing
Security knowledge is most useful in the place code gets written. Bravos keeps it there: a threat model in the repository, tests that ran against a target you authorized, and gates that hold the line on every pull request. The agent does the work, a person makes the decisions, and the evidence stays with the code.