detection rules

What RepoGuard checks for

Every detection rule that runs against your repo. Open source, with CWE mapping and a plain-language description on each. Use the layer grouping below to see how each finding gets to your dashboard.

172 rules total77 critical71 high+ dependency CVE lookup via npm + OSV (not listed; dynamic)

SARIF export → upload findings to GitHub Code Scanning

AST28 rules

TypeScript Compiler API walkers. Detect user input flowing into dangerous sinks across hops the regex layer can't see.

Code regex34 rules

High-confidence single-line regex rules — fast, language-tagged, tied to a CWE. Bias toward few false positives over coverage.

Secret pattern80 rules

Curated patterns for common credential formats: cloud keys, OAuth tokens, payment provider keys, database URIs. Plus an entropy fallback for env-shaped values.

Sensitive file18 rules

Files that should never be committed (.pem, .env, .pfx, .keystore, database dumps). Detected by path / extension / content header, not regex over content.

Dockerfile8 rules

Dockerfile hygiene checks: USER root, latest tags, ADD instead of COPY, unsafe shell escapes.

GitHub Actions4 rules

GitHub Actions workflow checks: pull_request_target with PR checkout, third-party actions pinned by tag instead of SHA, secrets in expressions.

Want a rule we don't have? Open an issue on GitHub.