Skip to content
Docs›IDE›Claude Code plugin
Bring-your-own-agent · plugin

Claude Code plugin

Install the plugin, run /x-security-scan, and your own Claude Code model does the detection. Every rule it proposes is gated by a bundled, LLM-free CLI that keeps only controls citing a real file:line in your code.

/ 01section

Install

  • Download the x-security-claude-<ver>.zip from the download page. It is self-contained: the CLI and MCP runtime are bundled, so there is no npm install and no network call.
  • Unzip it anywhere, then point Claude Code at the directory with claude --plugin-dir <dir> (or install-from-path from inside Claude Code).
  • Run /x-security-scan on the repo you want covered.
terminal
# 1. Download the Claude plugin zip from /download, then unzip it.
$ unzip ~/Downloads/x-security-claude-0.1.0.zip -d ~/x-security-claude

# 2. Point Claude Code at the unzipped plugin directory.
$ claude --plugin-dir ~/x-security-claude
#   (or, from inside Claude Code, install-from-path ~/x-security-claude)

# 3. Run the scan command on any repo.
> /x-security-scan
→ inventory → profile → detect → verify → emit → self-check
→ wrote .x-security/report.md · 100% of emitted rules cite your code
No API key, runs on your subscription
Detection runs on the Claude model you already pay for. The plugin adds no key, no SaaS call, and no separate billing. Your subscription is the engine. On the free-plugin path no x-security servers are involved; see trust & data flow.
/ 02section

The verify gate

Your model proposes findings; the bundled LLM-free CLI byte-matches every citation against your source before anything compiles. Unverifiable findings are dropped to reviewRequired; a citation proves the model read the code, and you review every policy before anything deploys. Full taxonomy and gate mechanics: detection capabilities.

verify-gate
# Each proposed finding is gated by the bundled LLM-free CLI before it can compile.
# The CLI re-reads the file and byte-matches cite.quote against [lineStart,lineEnd].
$ echo '<finding json>' | node bin/cli.mjs verify-finding
{"verdict":"pass","snappedCite":{...}}     # real, code-cited → compiles
{"verdict":"fail","reasons":["cite did not byte-match"]}   # rejected → never written
/ 03section

What /x-security-scan does

  • Inventory — enumerates every route the repo exposes, grounded by the CLI's deterministic routes extractor, then confirmed by reading source.
  • Profile + detect — classifies each route and detects the controls it needs, citing the exact vulnerable line for each finding.
  • Verify + emit — runs the verify gate, compiles the survivors into x-security policies, and emits a WAF ruleset, a human report, and a CI gate under .x-security/.
  • Self-check — audit re-validates everything on disk and proves 100% of emitted rules cite a line in your code.
/ 04section

Sample session

claude · session
> 
Honest framing
The report says "100% of emitted rules cite your code," never "100% secure". Recall scales with the model reading your code; the scan is a verified starting point, not a clean bill of health. Findings the gate could not verify are flagged for a human, never written as rules.