CodeInspectus

v4.1.0
io.github.Synvoya/codeinspectus Checked 21 minutes ago Published 15 days ago

Local-first MCP security scanner and CLI for AI-generated applications.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

codeinspectus_scan Scan code for security issues

Run a full local security scan of a path: managed engines (Opengrep SAST, Gitleaks secrets, Trivy SCA/IaC), CodeInspectus's offline native Pub SCA, plus AI-code-specific checks (client-side secret exposure, Supabase RLS/inverted-auth, prompt-injection sinks, API-boundary failures, and explicit runtime-control misconfiguration). Returns CWE-keyed findings with fix recommendations, detected repository technologies, explicit native-pack execution counts, compliance tags, and three-state repository evidence for supported runtime controls. Also returns the V3 repository-trust contract with determin…

ParameterTypeDescription
path *stringAbsolute path to the repository or directory to scan.
accept_gapsarrayCoverage gap ids to accept for CI (e.g. php-sast, deno-lock). Coverage still reads partial and the gaps stay listed; CI passes coverage only when every other cause is absent.
include_compliancebooleanInclude the per-framework compliance overview in the result (default: true).
include_licensesbooleanInclude Trivy licence findings (default: false; they are informational and not fixable). Listing license in scanners also requests them. A rescan follows the prior scan's setting.
max_findingsintegerCap the number of findings returned to protect agent context (default: 200).
scannersarrayLimit which scanner classes run: sast, secret, vuln, misconfig, license, ai. Default: all except license, which needs include_licenses or an explicit license entry.
severity_thresholdstringOnly return findings at or above this severity (default: info — all).

codeinspectus_setup Plan or install external security engines

Inspect external-engine health and exact platform download sizes, save declined choices, or install selected Opengrep/Gitleaks/Trivy/OSV-Scanner components after explicit confirmation. Pass path (the repository to scan) to plan or install only the OSV vulnerability databases for the ecosystems its lockfiles use (and GitHub Actions advisories when it has workflows); each is listed with an estimated size (integrity: TLS + recorded SHA-256, OSV publishes no signature), and osv_ecosystems pins the exact list the user approved. Plan is offline. Install writes only to ~/.codeinspectus, verifies immu…

ParameterTypeDescription
actionstringPlan is offline/read-only. Install downloads only after confirm_downloads=true. Decline saves the choice. Update answers a database_update yes: without confirm_downloads it returns the offline update…
componentsarrayComponents to install or decline. Default: all four external engines.
confirm_downloadsbooleanMust be true for an install that needs network downloads.
confirm_large_downloadsbooleanWith action=update: must also be true when the update plan lists a database over 100 MB (large_downloads). Pass it only after the user gave a separate yes for those downloads.
osv_ecosystemsarrayExact OSV ecosystem databases the user approved, e.g. ["npm", "PyPI"]. Overrides the detection from path. Omitted or empty (an empty list is no list): the databases path needs (none without path), plu…
pathstringAbsolute path to the repository the user wants to scan. Only the OSV vulnerability databases for ecosystems whose lockfiles are found there (read-only, by file name) are offered.
skip_large_downloadsbooleanWith action=update and confirm_downloads=true: refresh only the databases under 100 MB and leave out those the update plan lists in large_downloads (when the user declined them). The prompt then comes…
snoozestringWith action=snooze: not_now asks again in 24 hours, not_for_a_week in 7 days.

codeinspectus_rescan Re-scan and diff against a prior scan

Re-run a scan after fixes were applied and diff against a prior scan_id (or the most recent scan of the same path). Reports which findings are resolved, which remain, and which were newly introduced, plus fresh technology and native-pack execution coverage. Repository-trust artifacts are diffed separately with fail-closed resolved, remaining, introduced and not-rechecked states. Use this to verify approved fixes. Never writes to your code or repo.

ParameterTypeDescription
path *stringAbsolute path to the repository or directory to rescan.
max_findingsinteger
prior_scan_idstringscan_id of a previous scan to diff against. Defaults to the most recent scan of this path.
scannersarray
severity_thresholdstring

codeinspectus_plan_cleanup Plan verified repository cleanup

Create a fresh, read-only V3.3 cleanup plan for exact verified repository-trust artifact IDs. The plan reproduces current evidence, rejects protected, ambiguous, or unsupported records, hashes every preimage, and discloses exact text edits or copy-only media metadata transformations. It never changes the repository.

ParameterTypeDescription
artifact_ids *arrayExact verified repository-trust artifact IDs from a fresh scan.
path *stringAbsolute path to the repository directory to clean.
acknowledge_metadata_container_removalbooleanAcknowledge that supported media adapters remove complete metadata containers and create a new asset copy.
acknowledge_provenance_copybooleanAcknowledge that selected C2PA/content provenance will be absent from the cleaned copy while the original is preserved.

codeinspectus_apply_cleanup Apply approved repository cleanup

Apply one exact ready V3.3 cleanup plan after explicit approval. Requires an exact artifact-ID match and confirmation, creates managed content backups, uses atomic bounded edits, creates new media copies, reruns the same repository-trust validators, and writes a content-free audit log. This modifies selected source files and/or creates named cleaned copies.

ParameterTypeDescription
approved_artifact_ids *arrayExact artifact IDs approved by the user; must equal the plan scope.
confirm_cleanup *booleanMust be true after the user reviews and approves the exact plan.
plan_id *string
confirm_rights_to_modifybooleanRequired when removing explicit attribution or provenance; confirms the user is authorized to create the proposed change.

codeinspectus_rollback_cleanup Roll back repository cleanup

Restore an applied V3.3 cleanup from its managed checkpoint after explicit confirmation. Rollback refuses to overwrite files or cleaned copies that changed after cleanup.

ParameterTypeDescription
cleanup_id *string
confirm_rollback *booleanMust be true after reviewing the exact cleanup record to restore.

codeinspectus_compliance_report Code-level compliance coverage report

Produce a per-framework code-level control-coverage view for a prior scan (NIST CSF 2.0, ISO 27001:2022, SOC 2, CIS v8.1, Essential Eight, OWASP Web/LLM). Reports 'X of N code-visible controls have findings' with the code-visible subset as the explicit denominator. This is NOT a compliance audit, certification, or attestation — code-level evidence only.

ParameterTypeDescription
scan_id *stringscan_id returned by a prior codeinspectus_scan call.
frameworkstringRestrict the report to one framework. Default: all frameworks.

codeinspectus_explain_finding Explain a finding in depth

Return a deep explanation and full remediation plan for a single finding id from a prior scan: what the weakness is, why it matters, concrete fix steps, and references.

ParameterTypeDescription
finding_id *stringThe finding id from that scan's results (e.g. CI-4b53368c3f; scans stored before 4.1 use positional ids such as CI-0007).
scan_id *stringscan_id the finding belongs to.

codeinspectus_generate_sbom Generate a software bill of materials

Generate a CycloneDX or SPDX SBOM for the target project using Trivy plus the first-party offline Pub lockfile inventory, with native Pub fallback when Trivy is unavailable. Writes the SBOM file to the chosen output path and returns its location and component count. Offline.

ParameterTypeDescription
path *stringAbsolute path to the project to generate an SBOM for.
formatstringSBOM format (default: cyclonedx).
output_pathstringAbsolute .json path for the SBOM. An existing file is replaced only if it is already a CycloneDX/SPDX SBOM. Default: ~/.codeinspectus/sbom/<project>.<fmt>.json.

codeinspectus_list_rules List active rules and detector versions

List the active detectors and engine versions, the CodeInspectus detection-database version and date, Trivy vulnerability-DB freshness, bundled Pub advisory-database provenance/freshness, and the custom CodeInspectus AI-code rules and native detector packs currently shipped.

ParameterTypeDescription
enginestringFilter to one engine's rules/detectors.