Security checks for code your AI wrote.
Coding agents ship fast and repeat the same mistakes: SQL built from strings, request data in shell commands, imports of packages that don't exist. AegisCode traces untrusted input across your files, checks every package against the real registry, and writes fixes it re-verifies before you see them.
- 100% / 100%
- precision / recall on 87 labelled cases
- 126
- rules across 56 CWEs
- 12
- languages
- 0
- API keys needed for the core checks
Benchmark is hand-written; the first run on unseen cases scored 94.1% / 88.9%. Details
Catch it where the code is written, not after it ships.
Inside your coding agent
An MCP server the agent calls on its own changes before committing. It gets back each issue, the data-flow path and a verified fix it can apply.
$ claude mcp add aegiscode -- node ~/aegiscode/bin/aegis.mjs mcpBefore every commit
A pre-commit hook that scans only what's staged and blocks only issues the commit introduces, so years of existing debt never get in the way.
$ node bin/aegis.mjs hook installIn CI and right here
SARIF for GitHub Code Scanning, a --fail-on gate, Markdown for PR descriptions, and this web app for pasting a file or a whole repository.
$ aegis scan . --sarif aegis.sarif --fail-on highDeterministic first. AI second. Evidence always.
Models are good at judgement and bad at bookkeeping. So the bookkeeping (which value came from where, what a fix changes) is done by an analyser, and a model is only asked to weigh in on evidence that can be checked.
- 01
Read the change
A file, a repo, your staged changes or everything since main. Local modules the change imports are pulled in for context.
- 02
Trace across files
Taint analysis on the TypeScript compiler AST follows untrusted input through helpers, imports and re-exports, and knows when a check makes it safe.
- 03
Check every package
Each import is looked up on npm or PyPI: names that don't exist, lookalikes of popular packages, brand-new releases, install scripts.
- 04
Fix and re-verify
Common issues get a written fix. It only counts as verified if a re-scan shows the issue gone and nothing new.
- 05
Optional AI review
With a Gemini key, a Critic, Defender and Judge argue over the evidence. Claims that quote code that isn't there are thrown out.
Follows data across files
A route in one file passes request data to a helper in another, which builds SQL. AegisCode reports it at the real sink with every hop, and stays quiet when an allowlist or validation check is in the way.
- Sroutes/orders.ts:4HTTP request input
req.query.customer - ↓routes/orders.ts:4passed to findOrders()
findOrders(req.query.customer) - ↓db/orders.ts:3concatenated into string
"… WHERE customer = '" + id + "'" - !db/orders.ts:3reaches SQL injection sink
pool.query(…)
Packages AI made up
Assistants invent plausible package names; attackers register them. Every import is checked against the live npm / PyPI registry.
Fixes that check themselves
String-built SQL becomes a parameterised query, innerHTML becomes textContent, redirects are limited to this site. Each edit is re-scanned before it's offered, and aegis scan --fix applies only the verified ones.
New issues only
Scans of staged changes, a branch or a baseline file report what the change adds and what it fixes, matched by content rather than line numbers. That's what makes it usable as a gate on an agent's work.
Hallucination firewall
In the optional AI review, every claim must quote code that exists at the cited lines, or it's dropped before the debate starts.
Secrets, redacted
Provider key formats plus entropy scoring. Values are masked inside the analyser, so reports are safe to share.
Measured, not claimed
87 labelled cases (52 vulnerable, 35 safe look-alikes) run in CI. A drop below 95% precision or recall fails the build.
Not another “ask a chatbot to review it”
| AI code review | AegisCode | |
|---|---|---|
| Works with no API key | ||
| Same result every run | ||
| Line-accurate data-flow paths across files | ||
| Checks imported packages actually exist | ||
| Fixes re-verified before they're offered | ||
| Blocks only what a change introduces | ||
| Callable by coding agents over MCP | ||
| Published, reproducible accuracy numbers |