AI writes code fast. But fast doesn't mean safe. CodeTrust runs every line through 7 verification layers — catching hallucinated packages, broken configs, anti-patterns, and SQL issues before they hit production. Built by one engineer. Backed by 590 tests.
$ pip install codetrust
copied
Copilot generates a package import. It looks right. It compiles.
But the package doesn't exist — it was hallucinated. Your Docker image
references a tag that was never published. Your SQL migration uses
FLOAT for money and drops FK constraints without a safety net.
Every linter checks syntax. Nobody checks trust.
AI invents package names that sound real but don't exist on PyPI, npm, or crates.io — your build breaks in CI, or worse, you install a typosquatted package
Base images with non-existent tags — you find out when the Dockerfile fails to build at 2AM on deploy night
eval(), hardcoded secrets, mutable defaults, bare excepts — code that passes linting but fails in production
DELETE without WHERE, FLOAT for monetary values, GRANT ALL on production — AI doesn't understand consequences
Actual deep scan API response — hallucinated package caught, anti-patterns flagged, verdict delivered
Code enters at Layer 1. If it survives all 7, it ships. If not — you know exactly why
Regex engine. 28+ rules. Catches secrets, eval, injection, debug statements.
13 dedicated rules for .sql files. SELECT *, DELETE without WHERE, FLOAT for money, GRANT ALL.
Tree-sitter structural parsing. Complexity, nesting depth, unused variables, unreachable code.
Live registry checks. Every import verified against PyPI, npm, crates.io, Go proxy.
Validates base images and tags exist on Docker Hub and GHCR before you build.
Repo structure audit. README, LICENSE, tests, .gitignore, CI config.
All layers orchestrated in a single pass. One endpoint. Complete verdict.
BLOCK stops the pipeline — WARN flags risk — INFO improves
Real-time scanning. Works with Copilot.
ext install SaidBorna.codetrust
View on Marketplace →
590 tests, 7 verification layers, 28+ rules. Zero tolerance for hallucinated packages — built and maintained by one engineer who refuses to ship unchecked code