GuardLink
Open-source CLI that keeps threat models as security annotations in code, validated and enforced in CI, with an MCP server for AI coding agents.
At a Glance
About GuardLink
GuardLink is an open-source threat modeling tool from Bugb Technologies that records security claims inside the codebase, either as comments or in .gal sidecar files. A CLI validates those claims, an MCP server lets AI coding agents read and write them, and CI commands can fail a build on unmitigated exposures. The latest release shown is v2.5.0.
What It Is
GuardLink is a threat-modeling-as-code tool. Developers or AI coding agents add annotations in the GuardLink Annotation Language (GAL), such as @exposes, @mitigates, @confirmed, @ticket and @accepts, next to the code they describe. The annotations are parsed into a threat model of assets, threats, controls, data flows and trust boundaries. The project says the threat model therefore stays current as the code changes.
How the Workflow Runs
The homepage describes three steps. guardlink annotate launches a coding agent to write claims. guardlink validate checks that every referenced id resolves and reports dangling references, duplicate ids and syntax errors. guardlink ci --strict fails the build when an exposure has no answering control or when a confirmed exploit exists. Only @mitigates and @accepts close a finding, and an acceptance must be recorded under a person's name.
Outputs include a self-contained HTML dashboard, SARIF export for GitHub's Security tab, threat reports, threat model diffs against a git ref (guardlink diff origin/main --fail-on-new), and a CycloneDX 1.6 AI-BOM of agents, MCP servers and skill bundles.
Coding Agent Integration
guardlink init detects the coding agent and configures an instruction-file rule, plus an MCP server where supported. Listed agents include Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI, Windsurf and Cline. Any MCP-capable editor can run guardlink mcp. The site says the server exposes 28 tools. Agent-facing annotate tools reject @accepts and @entitles, so risk acceptance stays a human decision. Since 2.4.0, GuardLink also reads coding-agent configuration to record what an agent may run, edit and call.
Setup Path
GuardLink installs with npm and requires Node.js 18 or newer. It can also be used as a TypeScript library through entry points such as guardlink/parser and guardlink/report. The annotation grammar is published as an open specification under CC-BY-4.0, and the code is MIT licensed. GuardLink does not build or run the application; Bugb positions its separate Bravos product for testing what is reachable.
Community Discussions
Be the first to start a conversation about GuardLink
Share your experience with GuardLink, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
GuardLink CLI and MCP server, installable via npm and licensed under the MIT license. The specification is published separately under CC-BY-4.0.
- MIT-licensed core CLI
- Install with npm install -g guardlink
- Requires Node.js 18+
- MCP server for AI agent tooling
- CI enforcement via guardlink ci --strict
Capabilities
Key Features
- Security annotations in code comments or .gal sidecar files
- GuardLink Annotation Language with 25 verbs
- Validation of dangling references, duplicate ids and syntax errors
- CI gate that fails on unmitigated exposures and confirmed exploits
- Threat model diff against a git ref
- SARIF export
- Self-contained HTML threat dashboard
- MCP server with 28 tools
- Coding agent instruction-file setup via guardlink init
- CycloneDX 1.6 AI-BOM export
- Coding agent configuration and reach analysis
- @ticket remediation tracking
- Optional code graph worklist and reach checks
- Library API
Integrations
Demo Video

