Claude Code
Automatic configWrites the project MCP config, ignore rules, policy bundle, AGENTS.md, and starter rules.
npx -y @boringsec/claude-code init --editor claude --scope project --write-rulesDocumentation
Everything you need to secure your AI-built projects
Developer security
Review the code you are changing, scan the app you deploy, and turn verified findings into safe next steps without leaving your editor. Setup uses device authorization, so normal installation never asks you to paste an API key into a config file.
Node.js 18 or newer and a BoringSec Pro, Business, or Enterprise workspace are required. macOS Keychain, Linux Secret Service, and Windows protected storage are used automatically when available.
Device login
No API key pasted into editor config
Workspace boundary
Local tools stay inside the startup repository
One result model
Editor, API, and dashboard use the same scan state
npx -y @boringsec/claude-code loginThe command opens /auth/device, shows a short code, and waits for your approval. Keep that code private. A dedicated machine credential is stored after approval.
Writes the project MCP config, ignore rules, policy bundle, AGENTS.md, and starter rules.
npx -y @boringsec/claude-code init --editor claude --scope project --write-rulesWrites the Cursor project config and the same repository security baseline.
npx -y @boringsec/claude-code init --editor cursor --scope project --write-rulesUse this when the repository is opened by both clients. Existing unrelated config is preserved.
npx -y @boringsec/claude-code init --editor both --scope project --write-rules{
"mcpServers": {
"boringsec": {
"command": "npx",
"args": ["-y", "@boringsec/claude-code"]
}
}
}npx -y @boringsec/claude-code doctorDoctor checks authentication, protected credential storage, editor config, workspace rules, API reachability, plan access, and device posture. Resolve every FAIL before using hosted tools. A warning explains the exact follow-up command.
boringsec_workspace_review.The currently published 0.4.5 package runs correctly as a Codex MCP server, but its initializer does not write .codex/config.toml. Add the block below to the project config and keep every unrelated setting already in that file.
[mcp_servers.boringsec]
command = "npx"
args = ["-y", "@boringsec/claude-code"]
startup_timeout_sec = 60
tool_timeout_sec = 6601. Trust the project root
Open the repository in Codex and approve the workspace trust prompt. Codex ignores project MCP config until that canonical root is trusted.
2. Verify effective config
Run both checks from the configured repository. They verify the file and the server Codex can actually see.
npx -y @boringsec/claude-code doctor --editor codex --scope project
codex mcp get boringsecnpx -y @boringsec/claude-code version. For the current published 0.4.5 client, the TOML path above is the supported setup. This guide will only advertise automatic Codex initialization after a compatible initializer is publicly released.Start with the compact workspace tool. It prefers staged files, then changed files, and only falls back to the full repository when there is no active diff.
Review this repository with boringsec_workspace_review in auto mode.
Show evidence-backed security findings first.
For every finding, include the affected file, why it matters, and the safest next fix.
Do not change files until I approve the plan.Review
The MCP reads eligible files inside the trusted workspace boundary.
Decide
You receive evidence, confidence, affected files, and a merge recommendation.
Fix and recheck
Approve a patch, then run review_diff before commit or release.
boringsec_workspace_reviewReview the current workspace and return compact, evidence-linked findings
boringsec_review_diffReview staged or changed code and produce a merge decision
boringsec_scanScan a deployed HTTPS application
boringsec_scan_asyncStart an asynchronous URL scan without blocking the editor
boringsec_scan_statusFollow base and independent deep-scanner progress
boringsec_suggestChoose the most useful next security action
boringsec_scan_repoScan a public GitHub repository
boringsec_checkLoad a completed scan by ID
boringsec_ai_analysisGenerate risk context, attack scenarios, and prioritized fixes
boringsec_complianceMap evidence to PCI DSS, GDPR, SOC 2, HIPAA, or ISO 27001
boringsec_fixLoad built-in and community remediation prompts
boringsec_autofixGenerate a safe patch blueprint for supported low-risk findings
boringsec_generate_rulesGenerate .cursorrules and AGENTS.md from scan evidence
boringsec_policy_packsList policy packs and recommended bundles for the detected stack
boringsec_workspace_rulesGenerate workspace rules from .boringsec/policy-bundle.json
boringsec_sync_waiversSubmit local waivers to the managed approval queue
boringsec_finding_feedbackSend false-positive, accepted-risk, or resolved feedback
boringsec_usageShow plan capabilities, quota, and current usage pricing
boringsec_privacy_reportExplain the data boundary for each MCP tool
boringsec_statsShow local project history and privacy-safe account statistics
boringsec_cicd_setupCreate a GitHub Actions or GitLab CI starter without overwriting files
boringsec_scan_workspace, boringsec_scan_project, and boringsec_scan_code can create large raw previews. Enable them only for CI or precise debugging with BORINGSEC_EXPOSE_ADVANCED_TOOLS=1.Use boringsec_workspace_review while coding, then run the diff gate against the branch you plan to merge.
Compact findings, evidence, and merge guidance in the editor
In the current published client, boringsec_scan_async is an asynchronous convenience. Keep the returned scan ID and poll with boringsec_scan_status. A failed request before an ID is returned must be retried and is not presented as a durable queued scan.
Keep the returned scan ID and inspect each scanner state separately
Generate AGENTS.md, .cursorrules, and a versioned policy bundle for the stack. Managed teams can inherit central governance.
The repository carries its own review policy
Keep local waivers reviewable, sync managed waivers to the organization queue, and send resolution feedback back to BoringSec.
Every suppression has an owner, reason, approval, and optional expiry
npx -y @boringsec/claude-code review-diff --mode diff --diff-base-ref origin/main --markdown-output boringsec-review.md --sarif-output boringsec-review.sarif --github-annotations-output boringsec-review.annotations.jsonMarkdown
Readable PR summary for reviewers
SARIF
Uploadable findings for code scanning
Annotations
File and line feedback in CI logs
local_onlyRepository discovery, ignore rules, local history, and supported static checks stay on the machine.
hosted_sanitizedHosted review receives only the sanitized code or config required by the tool you invoke.
metadata_onlyTelemetry contains privacy-safe counts and a hashed workspace identity, not raw code or prompts.
Run boringsec_privacy_report before a tool when you need the exact boundary. boringsec_stats shows the resulting provenance mix.
npx -y @boringsec/claude-code doctor --fix
npx -y @boringsec/claude-code rotate
npx -y @boringsec/claude-code status
npx -y @boringsec/claude-code support-bundle --project-root . --output boringsec-support.json
npx -y @boringsec/claude-code logout --revokeCredential lifecycle
rotate renews the device credential. logout --revoke removes it locally and revokes the server key.
Safe support bundle
The support bundle excludes raw code, prompts, and secrets. Review the JSON before sharing it with support.
npx -y @boringsec/claude-code doctor. For Codex, trust the repository and confirm codex mcp get boringsec from the same project root.npx -y @boringsec/claude-code status. If the device key is expiring, run rotate. If it was revoked, run login again.boringsec_usage for the required capability and remaining quota.boringsec_scan_async returned a scan ID, poll that ID with boringsec_scan_status. The status response shows whether the base scan or any of Injection, XSS, Ports, Nuclei, ZAP, or Medusa is still running. If no scan ID was returned, retry the request once instead of assuming it was queued.Create a workspace, complete device login, and run the first evidence-backed review before your next merge.