Public beta · v0.9.0

The AI security knowledge base.
Give an agent a codebase — get the checks that matter.

secure-kb merges 67 tracked sources into 2,052 atomic check cards (from 15 repositories + 5 official-doc sources). Each card traces to a real file, anchor and commit — so an agent can go from “I have this codebase” to “here are the 15–25 checks that matter” in seconds.

2,052check cards
67tracked sources
13platforms covered
99.3%programmatic extraction
0.70held-out recall@5 (beta)
~0.3swarm query latency

What it is — and what it is not

A knowledge base of security checks, packaged for retrieval by AI agents. It contains no running service and executes nothing against your code.

It is

A retrieval layer

Distilled, normalised, atomic cards with provenance, a router, a fast gate, and a SQLite FTS5 index.

It is

A merged corpus

OWASP ASVS 5.0, MASVS/MASTG, WSTG, Top 10, API Top 10, LLM Top 10, 137 cheat sheets, web3, IoT and more.

It is not

A scanner

It tells an agent what to verify. Tool adapters describe how to call scanners; they don’t run them for you.

It is not

A substitute for an audit

It does not replace a professional security review. Card text is defensive guidance, never exploit payloads.

Install in 60 seconds

Zero required dependencies — standard-library Python only. index/ and 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/your/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 md
Zero-dependency fallback: the index ships as shards, so plain tooling works with no build — cat index/checks/*.jsonl | jq -c 'select(.severity=="critical")'

The five-step agent workflow

Detect → profile → fast gate → drill down → report.

Detect the stack

Fingerprint files and signals to rank platforms: web, api, mobile, telegram, cloud, web3, llm, vibe, browser-ext, desktop.

Pick a profile

Each platform maps to an ordered gate. Multiple profiles merge (e.g. Cloudflare Worker + Telegram bot + LLM).

Run the fast gate

The top checks by priority, domain-balanced, in a tiny token budget.

Drill into cards

Fetch one card by id with get, or resolve by CWE / ASVS / MASVS / OWASP ref.

Report

Record pass / fail / n-a / unknown with evidence; no “pass” without evidence.

Coverage

Cards by platform. Every declared platform has cards; no platform is empty.

PlatformSource examplesStatus
Web / APIASVS, WSTG, Top 10, API Top 10, Cheat Sheetscovered
Mobile (Android / iOS)MASVS, MASTGcovered
LLM / AI appsOWASP LLM Top 10, RAG & prompt-injection cheat sheetscovered
Cloud / DevOps / IoTOWASP ISTG, Docker, Kubernetes, CI/CD cheat sheetscovered
Smart contractskadenzipfel, cryticcovered
Vibe-coded appsvibe-security-skill, secure-coding-baselinecovered
Telegram bots / browser-ext / desktopAuthored cards (official-doc verified)authored

Measured benchmarks — reported honestly

Held-out sets, frozen. Lower numbers are shown as they are; this is a beta.

Setnrecall@5TargetStatus
Held-out (all)1540.70≥ 0.70below
Curated v1590.25—reference
Curated v2 (standards-derived)590.48≥ 0.60below
v2_dev (developer vocabulary)400.53≥ 0.60below
Templated950.92≥ 0.90met
Lab coverage (strict)3073.3%—partial
Fast-gate recall (strict)3046.7%≥ 0.70below
Why it’s a beta: retrieval targets are not met, so this is published as v0.9.0, not v1.0.0. The build itself is deterministic and shuffle-stable (content hash 0c921baa291a4af4).

Verifiable Security Attestation

An agent's "I checked it and it's fine" is normally unfalsifiable prose. Here it's a signed, offline-verifiable proof of what was checked, against which KB build, on which exact code.

Bound to the code

A SHA-256 fingerprint over the target's sorted file hashes. Change one byte and verification fails.

Bound to the KB

The attestation carries the KB's deterministic content_hash, so two claims are only comparable on the same corpus.

Tamper-evident

attestation_id = SHA-256(canonical(payload)), optionally HMAC-signed. Any edit breaks it.

Offline & stdlib-only

Verify with no network and no trust in the agent: secure-kb verify-attestation → VALID / INVALID.

secure-kb attest ./my-app --gate fast --key "$KEY" --out attestation.json
secure-kb verify-attestation attestation.json --key "$KEY" --path ./my-app
# -> {"status":"VALID","kb_match":true,"checks":25}   exit 0

Known limitations

Stated plainly, so you can judge fit.

Retrieval below target

Free-text paraphrase recall is the weakest area. Corpus growth added distractors; dedupe and re-rank experiments did not recover it.

First-call index build

Building kb.sqlite on first use takes ~19s on a cold checkout; later queries are sub-second.

Not-yet-implemented

kind: check/guidance, deterministic fix_refs, official-source CWE enrichment, and real-lab end-to-end runs.

Unverified items

8 of 12 tool adapters; the Telegram secret_token claim; two project-declared licences.

License & attribution

Content — CC BY-SA 4.0

Derived largely from OWASP material; attribution and ShareAlike preserved. Sources that are unlicensed or reference-only are not redistributed.

Code — MIT

The CLI, MCP server and build scripts. No GPL/AGPL tool code is vendored.

Human legal review recommended. This knowledge base does not replace a professional security audit, and implies no OWASP endorsement.