Modules

Plaintext Secrets module

Polyglot source code scanner that detects hardcoded secrets, API keys, and credentials across all your projects.

Plaintext Secrets module

The plaintext secrets module scans source code across all projects in your workspace to detect hardcoded secrets — API keys, database credentials, tokens, and private keys that should never be committed.

How it works

Point the scanner at one or more root directories (e.g. ~/Code). It walks every file that isn’t generated (skipping node_modules, target/, .venv, dist/, etc.), matches against 53 secret detection patterns, and optionally runs Shannon entropy analysis to catch novel credential formats.

Results are persisted in a dedicated SQLite database. Each finding tracks the file, line, column, pattern that matched, severity, and temporal metadata — when the secret was first detected, when it was last seen, and whether it’s still present.

Supported languages and bundlers

EcosystemScanned files
JavaScript.ts, .js, .tsx, .jsx, .env*, .npmrc
Rust.rs, .toml, Cargo.toml
Python.py, .cfg, .ini, .env*
Go.go, .yaml, .yml, .env*
Config.json, .yaml, .yml, .toml, .properties

Bundler-specific patterns detect tokens in .npmrc, bunfig.toml, Cargo registry config, PyPI tokens, and Docker registry credentials.

Pattern categories

Extraction modes

The standalone JSON index can be configured with three extraction modes:

ModeStoresUse case
key-onlyKey name onlyAuditing without exposure risk
key-obfuscatedKey name + masked valueTriage with partial visibility
key-rawKey name + full valueRemediation workflows

Cross-reference engine

When the same secret value appears in multiple files or projects, the scanner groups them by SHA-256 hash. The dashboard highlights shared secrets so you can see which projects share credentials and prioritize rotation.

Entropy detection

Beyond pattern matching, the scanner uses Shannon entropy analysis to flag high-entropy strings that may be novel credential formats. Configurable threshold (default: 4.5 bits), minimum length (20 chars), and automatic exclusion of UUIDs, URLs, commit hashes, and long base64 payloads.

API endpoints

EndpointMethodReturns
/api/modules/plaintext-secrets/findingsGETPaginated findings with filters
/api/modules/plaintext-secrets/findings/{id}GETSingle finding with cross-references
/api/modules/plaintext-secrets/findings/{id}POSTSuppress a finding
/api/modules/plaintext-secrets/scansGETScan history
/api/modules/plaintext-secrets/scanPOSTTrigger a new scan

Integration events

The module emits events via the shared ModuleEventBus: