secure-kb
This server provides MCP tools for detecting an app’s stack, retrieving security checks, managing reports, and discovering scanner adapters.
detect_stack: fingerprint a codebase path and return ranked platforms plus recommended profiles.get_profile: get ordered launch-gate checks for a platform profile, usingfastorfullgate.search_checks: free-text search over check cards with optionalk, domain, platform, and severity filters.get_check: fetch one full check card by ID.list_tools: list scanner tool adapters, optionally filtered by platform.start_report: create a security report skeleton for a target.submit_result: record one check result (pass,fail,n/a, orunknown) with optional evidence.
Provides OWASP MASTG and MASVS-derived security check cards for Android apps, allowing an agent to profile an Android stack and retrieve mobile-specific security tests (e.g. by MASTG/MASVS reference).
Includes authored security check cards for Electron desktop apps (from official docs) that an agent can retrieve when reviewing an Electron codebase.
Provides OWASP MASTG and MASVS-derived security check cards for iOS apps, allowing an agent to retrieve iOS mobile security tests by MASTG/MASVS reference.
The knowledge base is distilled from OWASP sources — ASVS 5.0, WSTG, MASTG, MASVS, ISTG, and the Top 10 / LLM Top 10 / API Top 10 — exposing 2,057 traceable check cards that an agent can search or fetch by ASVS/WSTG/CWE reference for secure code review.
Includes authored security check cards for Telegram (from official docs) that an agent can retrieve when reviewing a Telegram-based integration.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@secure-kb what security checks should I run on my project?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI Security Knowledge Base (secure-kb)
An AI security knowledge base — security check cards an AI coding agent can search.
Keywords: AI security · AI agent security · OWASP ASVS · WSTG · MASTG · Top 10 · LLM security · prompt injection · secure code review · AppSec · DevSecOps · MCP · Claude · Cursor
2,052 atomic check cards distilled from 67 tracked sources — cards are drawn from 15 public repositories plus 5 official-doc sources — each traceable to a real file, anchor and commit.
Status: public beta (v0.9.16). The build is reproducible — the same pinned sources produce the same
content_hashon any day, verified in CI againstCORPUS_DATE; retrieval targets are not yet met, so this is deliberately not v1.0.0. See Benchmarks and Known limitations.
Website → · Releases · Contributing · Security
What it is — and what it is not
It is a retrieval layer for AI agents: a merged, normalised corpus of security checks with provenance, a platform router, a fast gate, and a zero-dependency SQLite FTS5 index.
It is not a scanner, and it does not replace a professional security audit. It tells an agent what to verify; tool adapters only describe how to invoke external scanners.
Related MCP server: ai-devsecops-agent-mcp-server
Install in 60 seconds
Zero required dependencies (standard-library Python only). index/ and index/kb.sqlite build
themselves on first use.
git clone https://github.com/pavnxet/ai-security-knowledge-base.git
cd ai-security-knowledge-base
python3 cli/secure_kb.py detect /path/to/project
python3 cli/secure_kb.py profile web --gate fast --format brief
python3 cli/secure_kb.py search "how do I stop sql injection" --k 5
python3 cli/secure_kb.py get SKB-ASVS-V1-2-4 --format mdNo-build fallback — the index ships as shards, so plain tooling works with no build step:
cat index/checks/*.jsonl | jq -c 'select(.severity=="critical")'
cat index/checks/*.jsonl | grep -c "SKB-ASVS"The five-step agent workflow
Detect the stack (
detect) → ranked platforms.Profile it (
profile <platform> --gate fast).Gate — the top checks by priority, domain-balanced, in a small token budget.
Drill down (
get <id>, or by CWE / ASVS / MASVS ref).Report — pass / fail / n-a / unknown, with evidence. No “pass” without evidence.
MCP setup
The MCP server exposes detect_stack, get_profile, search_checks, get_check, start_report,
submit_result, list_tools, attest, verify_attestation (9 tools — run list_tools to enumerate).
Claude Code
claude mcp add secure-kb -- python3 /abs/path/to/secure-kb/mcp/server.pyClaude Desktop (claude_desktop_config.json)
{ "mcpServers": { "secure-kb": {
"command": "python3",
"args": ["/abs/path/to/secure-kb/mcp/server.py"] } } }Generic MCP client — JSON-RPC 2.0 over stdio; initialize then tools/call.
Use it as an agent skill (new)
secure-kb ships as an Agent Skills bundle, so Claude Code, Codex, OpenCode, Pi and any other
harness that follows the spec can use it directly. A skill is just a folder with a SKILL.md, so
installing it means placing (or symlinking) it where your harness looks for skills:
git clone https://github.com/pavnxet/ai-security-knowledge-base && cd ai-security-knowledge-base
./skills/secure-kb-audit/scripts/install.sh --claude # ~/.claude/skills/
./skills/secure-kb-audit/scripts/install.sh --agents # ~/.agents/skills/ (Codex/OpenCode/Pi)
./skills/secure-kb-audit/scripts/install.sh # auto-detect every harness presentThen invoke it either way:
Automatically — ask "audit this repo for security bugs" and the skill loads on its own.
Directly with a slash command — a skill's
namebecomes the command, so in Claude Code type/secure-kb-audit ./my-app(or/to pick it from the menu). Whatever you type after the command is passed to the skill as$ARGUMENTS. Codex/OpenCode match on the description or invoke theskilltool by name; Pi uses/skill:secure-kb-audit.
Either way the agent runs the detect → gate → check → report → attest workflow and returns a
severity-grouped report where every finding carries file:line evidence. See
skills/secure-kb-audit/SKILL.md.
Verifiable Security Attestation (new)
An agent's security claim is normally unfalsifiable prose. secure-kb can instead emit a
Verifiable Security Attestation — a deterministic, tamper-evident record of which checks were
run, against which KB build, on which exact code fingerprint — that anyone can verify offline:
secure-kb attest ./my-app --gate fast --key "$KEY" --out attestation.json
secure-kb verify-attestation attestation.json --key "$KEY" --path ./my-app # -> VALID, exit 0Any edit to the checks, a different KB build, or a changed target all make verification fail.
See docs/ATTESTATION.md. Also available over MCP as attest /
verify_attestation.
What's in it
Source | Cards | Licence |
OWASP Cheat Sheet Series | 1,032 | CC BY-SA 4.0 |
yesmayank/secure-coding-baseline (Tier-2) | 353 | MIT |
OWASP ASVS 5.0 | 339 | CC BY-SA 4.0 |
OWASP WSTG | 112 | CC BY-SA 4.0 |
raroque/vibe-security-skill (Tier-2) | 40 | see |
kadenzipfel/smart-contract-vulnerabilities | 38 | see |
OWASP MASTG (Android/iOS tests) | 32 | CC BY-SA 4.0 |
OWASP MASVS | 20 | CC BY-SA 4.0 |
OWASP ISTG (IoT) | 15 | CC BY-SA 4.0 |
shieldfy/API-Security-Checklist (Tier-2) | 13 | see |
crytic/not-so-smart-contracts | 11 | see |
OWASP Top 10 / LLM Top 10 / API Top 10 | 10 / 10 / 9 | CC BY-SA 4.0 |
mgreiler/secure-code-review-checklist (Tier-2) | 8 | see |
Authored (Telegram, Chrome, Electron — official docs) | 15 | CC BY-SA 4.0 |
Total | 2,052 |
Cards use source-identity IDs — SKB-<SRC>-<official-id> (e.g. SKB-ASVS-V3-4-5,
SKB-WSTG-INFO-01) or a short hash of repo|path|anchor. Merged cards keep every member id in
aliases[], so any historical id still resolves. See docs/PIPELINE.md.
Benchmarks
Held-out sets, frozen. Strict metrics (mapped refs only) — reported as measured.
Set | n | recall@5 | Target | Status |
Held-out (all) | 154 | 0.70 | ≥ 0.70 | ~met |
Curated v2 (standards-derived) | 59 | 0.48 | ≥ 0.60 | below |
v2_dev (developer vocabulary) | 40 | 0.53 | ≥ 0.60 | below |
Curated v1 | 59 | 0.25 | — | reference |
Templated | 95 | 0.92 | ≥ 0.90 | met |
Fast-gate recall (strict) | 30 | 46.7% | ≥ 0.70 | below |
Determinism: two consecutive rebuilds — and a rebuild with shuffled staging input — produce the
identical manifest.content_hash a57da404205eada6. Reproduce with
python3 scripts/fetch_sources.py && python3 scripts/ingest_from_cache.py && python3 scripts/build_cards_v2.py.
Known limitations
The honest list lives in KNOWN_LIMITATIONS.md, with the measured numbers
and a test that keeps them in sync with bench/results.json. The headlines:
Retrieval is below target on paraphrase — held-out 0.695 (target 0.70),
curated_v20.475 andv2_dev0.525 (target 0.60);templated0.916 meets its target. Retrieval is lexical, not semantic.The
fastgate covers 14 of 30 lab classes (46.7%), against a 70% target — use--gate full.99% of cards'
fixfield is a pointer, not guidance — a card reliably says what to check, rarely how to fix it.It does not scan anything, and an attestation proves what was claimed, not that it is true.
Security posture
This project holds itself to the standard it asks of you. Four documents, all short, all machine-checked where it matters:
Document | What it settles |
Assets, trust boundaries, assumptions, and 17 risks ( | |
Every accepted, deferred or open risk with its reason and review date — CI fails if an accepted risk has no reason, if a mitigation points at a test that doesn't exist, or if a review date lapses | |
The measured limits, checked against | |
How to report a problem here, and what to expect |
Licence & attribution
Content: CC BY-SA 4.0, where provenance and upstream terms permit; attribution and ShareAlike preserved. Unlicensed / reference-only sources are not redistributed.
Code: MIT.
Human legal review recommended. No OWASP endorsement is implied.
Contributing
See CONTRIBUTING.md. New cards require provenance: source repo, path, anchor, commit, licence.
Security
See SECURITY.md for private vulnerability reporting, and
docs/THREAT_MODEL.md for this project's own threat model — what it
protects, what it assumes, and which risks it knowingly accepts. The decisions behind it live in
risk-register.yaml, which CI checks: an "accepted" risk must carry a reason
and a review date, and a "mitigated" one must point at a test or CI job that actually exists.
Citation
See CITATION.cff.
Available Tools
7 toolsdetect_stackB
Fingerprint a codebase path and return ranked platforms + recommended profiles.
Inputs: path (required).
get_checkC
Fetch one full check card by id.
Inputs: id (required).
get_profileC
Return the ordered launch-gate checks for a platform profile.
Inputs: name (required), gate.
list_toolsC
List scanner tool adapters, optionally for a platform.
Inputs: platform.
search_checksC
Free-text search over check cards with structured filters.
Inputs: query (required), k, domain, platform, +1 more.
start_reportC
Create a security report skeleton for a target.
Inputs: target.
submit_resultC
Record one check result (pass/fail/n/a/unknown) with evidence.
Inputs: id (required), status (required), evidence.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct resource and action: fingerprinting (detect_stack), profile retrieval (get_profile), discovery (search_checks, list_tools), point fetch (get_check), and report lifecycle (start_report, submit_result). get_check vs search_checks and get_profile vs get_check are clearly distinguished by resource type and lookup mode. No two tools could be reasonably confused for one another.
All seven tools follow a strict snake_case verb_noun pattern (detect_stack, get_profile, search_checks, get_check, list_tools, start_report, submit_result). The convention is uniform with no camelCase or stylistic deviations, making intent predictable from names alone.
Seven tools is well-scoped for a security knowledge-base workflow that spans detection, lookup, and reporting. Each tool covers a necessary step with no redundant or filler entries.
The surface covers the full scan workflow: detect stack, resolve a profile, search/read checks, create a report, and submit results. However, there is no way to retrieve, finalize, or export the report after start_report, which is a minor lifecycle gap an agent must work around.
Maintenance
Related MCP Connectors
AI-security knowledge as MCP: standards-mapped tools (OWASP, NIST, MITRE) for AI agents.
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
Zero-install security baseline for AI coding agents — OWASP/CWE-cited rules over MCP.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP security toolkit that integrates Burp-style HTTP proxying, AI-driven vulnerability hunting, source code auditing, and reporting into AI coding agents, enabling authorized security testing of web applications and source code.24MIT
- AlicenseBqualityBmaintenanceEnables LLM clients to access DevSecOps tooling such as CI/CD pipeline status, vulnerability triage, log search, and dependency scanning through MCP, turning AI copilots into security-aware engineering partners.46MIT
- FlicenseBqualityCmaintenanceEnables AI agents to perform comprehensive, zero-infrastructure codebase analysis through 24 MCP tools, covering security, quality, architecture, type safety, git history, and dead code detection with high precision and local privacy.45-
- AlicenseAqualityCmaintenanceEnables AI coding agents to search a security corpus, scan Terraform plan JSON for cited findings, and list sources via MCP tools grounded in CIS AWS Foundations and OWASP Top 10 CI/CD risks.3Apache 2.0