CODE GUARD

Scan AI-generated code before it ships.

More than half of new code is AI-assisted now, and a meaningful share of it carries the classic security bugs: injection, hardcoded secrets, disabled TLS checks, unsafe deserialization. Code Guard is the check a coding agent runs on its own code or diff before committing. A deterministic rule engine, so it can't be talked out of a finding, and it answers in milliseconds.

FreeDeterministic, no LLMJS/TS + Python + generic rulesHTTP + MCP

Try it

verdict appears here…

The endpoints

EndpointWhat it does
POST /api/scan-codeThe guard. Scan a snippet → findings {rule, category, severity, line, remediation} + verdict pass / review / block
POST /api/scan-diffScan only the added lines of a unified diff, with correct new-file line numbers — for commit loops
GET /api/rulesThe full rule catalog: every rule id, category, severity and language, so you can see what it checks and what it doesn't

Use it from an agent (MCP)

{ "mcpServers": { "code-guard": { "command": "npx", "args": ["-y", "@mlawsonking/code-guard-mcp"] } } }

Or call the HTTP endpoints directly — JSON in, JSON out, CORS open. OpenAPI spec.

What it catches

Command, code, and SQL injection · SSRF · hardcoded secrets and API keys · weak crypto (MD5/SHA1, ECB, insecure RNG) · unsafe deserialization (pickle, yaml, marshal) · disabled TLS verification · XSS and template injection · common misconfigurations. Also personal data left in source: email addresses, US SSNs, card numbers.

What it doesn't do

31 regex rules, matched one line at a time. No parser, no data flow, no taint tracking, so it isn't static analysis in the sense a SAST vendor means it. It reads text. The hardcoded-* patterns are the exception: those run over the whole source, so a multi-line private-key block is still caught.

That cuts both ways. db.query("SELECT ... " + id) is caught on one line and missed the moment you split it across two. The word DES on a line trips weak-cipher, comment or variable name included.

Languages are JS/TS and Python. 11 rules are JS/TS, 14 are Python, 6 are language-agnostic. There is no Go, Ruby, PHP, Java or Rust ruleset. An unrecognised language is ignored and the language is sniffed from the source instead, which returns JS/TS, Python or unknown depending on which tokens the file contains. Unknown runs all 31 rules against every line.

A fast first pass for the agent's inner loop, not a replacement for a security review. A clean result means none of the 31 rules matched, not that the code is safe. The response says so too.