Skip to main content

Overview

The secrets scanner is ZenVeil’s most comprehensive detector. It runs on scan repo and scan github targets and covers two categories:
  1. Credential patterns — actual secrets that should never appear in source code
  2. Repository risk patterns — OWASP anti-patterns that create security debt

Credential patterns

These findings are always CRITICAL or HIGH severity. They indicate live credentials committed to source.

Example finding

Repository risk patterns

These findings surface OWASP anti-patterns that are common in AI-generated code. Severity ranges from MEDIUM to CRITICAL.

Authentication & session management

Authorization

Frontend exposure

Infrastructure

Dependencies

Environment file hygiene

The secrets scanner also checks:
  • .env file committed (HIGH, 97% confidence) — any .env, .env.local, .env.production, etc. found in the repo
  • .env not in .gitignore (MEDIUM, 93% confidence) — the .gitignore doesn’t contain an .env exclusion pattern

Files scanned

The scanner traverses all files in the repository except:
  • node_modules/, .venv/, __pycache__/, .git/
  • Binary files (images, archives, compiled artifacts)
  • Files > 1MB (unlikely to contain useful patterns)

Context-aware severity

Test, fixture, mock, and example files are scanned by default — because real credentials are routinely committed there. Instead of ignoring these files and creating blind spots, ZenVeil detects findings in all files but adjusts severity based on file context.

How it works

When a secret is found outside of production code, ZenVeil:
  1. Detects it with the same confidence as a production finding
  2. Downgrades the severity by one or two tiers
  3. Appends (test file), (fixture file), or (example file) to the title
  4. Labels the finding with a context badge in the output

Severity downgrade table

Context classification

Files are classified by their path:

Example

To skip non-production files entirely, use the --exclude-tests flag:
This is not recommended as the default — credentials in test history are still in your git history and still exploitable. See Context-aware scanning for the full rationale.

Avoiding false positives

All secret values in findings are redacted — ZenVeil never logs, stores, or transmits actual credential values. To suppress a confirmed false positive:
To record it for the feedback loop: