cert-review
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CERT_REVIEW_HOME | No | Points the package to an alternative location for the `data/` and `profiles/` directories. Defaults to the checkout directory. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
SEI CERT C/C++ secure-coding review for local source trees. Every tool only reads local files and bundled data and runs local analyzers (clang-tidy, clang, cppcheck); nothing is written, uploaded or posted. Rule lookup: list_rules (structured filters), search_rules (keywords), get_rule (one rule's full text), get_rule_coverage (what checkers can detect). Review flow:
check_diff for a change, or check_files for whole files or directories.
build_review_packet for rules no checker decides; judge each hunk and write findings that cite a candidate rule_id and quote that rule's text verbatim.
validate_findings to drop ungrounded findings.
format_findings to draft markdown, GitHub or GitLab review payloads, SARIF or GitLab reports. Use absolute paths and profile "ceph" for Ceph trees. A tool status "partial" or non-empty warnings means some files did not compile or timed out, so a clean result is not proof. Never post review comments without the user approving the exact text.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_rulesA | List SEI CERT C/C++ rules and recommendations from the bundled database (388 entries), filtered by language, category, kind, risk level, CERT detectability or checker coverage. Use to enumerate rules by structured criteria, e.g. all L1 C++ rules no checker detects. Do not use for free-text lookup (use search_rules) or for one rule's text and examples (use get_rule). Reads bundled data only; fast, no analyzers run. Returns summaries without rule text; |
| search_rulesA | Rank SEI CERT C/C++ rules by keyword relevance to a free-text query: API names (strcpy, malloc, pthread_mutex_lock), concepts (integer overflow) or a rule ID. Use when you know what the code does but not which rule applies. Do not use for structured filters (use list_rules) or to read a rule (use get_rule). Matching is case-insensitive term counting over titles, rule text and examples, not semantic search; 1-character tokens are ignored and a query with no usable token returns an empty list. Reads bundled data only; fast. |
| get_ruleA | Return the full record of one SEI CERT rule: text, noncompliant and compliant code examples, exceptions, CERT risk assessment, CWE IDs, the checkers that detect it, and how the chosen profile adjusts or disables it. Use before judging or explaining a finding, or to copy the verbatim |
| get_rule_coverageA | Count SEI CERT rules per detection tier: deterministic (a rule-specific checker exists), partial (only general checkers map) and llm-only (no checker; manual review needed), both for all upstream checker mappings and for the pinned reference toolchain (clang-tidy and Clang Static Analyzer 19.1.7, cppcheck 2.17.1). Use to judge how much of a review static analysis can carry. Computed from bundled data; it does not probe the analyzers installed here (check_files reports those in tools[]). For one rule use get_rule; to list a tier's rules with titles use list_rules with |
| check_filesA | Run clang-tidy, the Clang Static Analyzer and cppcheck on a C/C++ file or a directory (recursive) and return every finding mapped to SEI CERT rule IDs. Use for whole-file or whole-tree audits; for a change set use check_diff, which keeps only changed lines. Runs the analyzers as local subprocesses (4 in parallel, 300 s timeout per file and tool) and writes no files. Takes under a second per small file but minutes for large trees. Pass |
| check_diffA | Run the check_files analyzers on the C/C++ files of a change and keep only findings on added or modified lines. The change is |
| build_review_packetA | Build a packet for reviewing code against SEI CERT rules that analyzers cannot decide: code hunks, each with up to max_rules_per_hunk candidate rules (picked by token/API heuristics and profile idioms, rules fully covered by a specific checker left out) and their text excerpts. Diff mode ( |
| validate_findingsA | Accept or reject findings written from a build_review_packet review, with reasons. A finding passes only if its rule_id exists (C++ rules are rejected on .c files), its quote is a passage of 20+ characters found in that rule's text or examples (case, whitespace, curly quotes and markdown are normalised), it has a file, a line >= 1 and a message, and the profile does not disable the rule. With |
| format_findingsA | Render findings as a report or review payload without sending it. style: markdown (string); github (object for POST /repos/{owner}/{repo}/pulls/{n}/reviews, event COMMENT, one comment per finding); gitlab (array of merge-request discussion bodies; position SHAs are placeholders to fill from diff_refs); sarif (SARIF 2.1.0 object); codequality (GitLab Code Quality array); gitlab-sast (GitLab SAST report object). Use as the last step, then show drafted comments to the user before anyone posts them. Pass findings unchanged from check_files/check_diff |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| cert_review | Review code against SEI CERT C/C++. |
| ceph_review | Review Ceph code against SEI CERT with Ceph idioms taken into account. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Each tool has a well-delimited job: check_files (whole tree) vs check_diff (changed lines) vs build_review_packet (LLM-judged hunks) are explicitly steered apart in their descriptions, and list_rules/search_rules/get_rule are differentiated by structured filters vs free text vs single record. The only soft overlap is get_rule_coverage counting tiers versus list_rules filtering by `coverage`, which descriptions partially resolve but could still cause a mispick.
All nine tools are snake_case verb_noun or verb_noun_noun (check_diff, check_files, validate_findings, build_review_packet, format_findings, get_rule, get_rule_coverage, list_rules, search_rules). The get_/list_/search_/check_/build_/format_/validate_ prefixes map predictably to read, enumerate, query, analyze, construct, render and verify actions.
Nine tools is well within the ideal 3-15 band and every one earns its place across the three phases of rule lookup, static analysis and manual review drafting. Nothing looks like a thin wrapper or an accidental duplicate.
The surface covers the full reviewed workflow: discover rules, run analyzers, build hunks, validate manual findings, and render to markdown/GitHub/GitLab/SARIF/Code Quality outputs. Minor gaps remain: profiles are referenced throughout (disabling rules, idioms) but no tool lists or inspects an available profile, and posting to a forge is deliberately left to the caller.