Pre-Push Security & Config Rules (PC-001 to PC-025)
All 25 checks execute locally in an isolated browser Web Worker. Select any rule for its inline snippet tester, root-cause explanation, and production fix.
Detects hardcoded Stripe production secret keys (sk_live_) and live restricted keys (rk_live_) in source files, scripts, or configuration manifests before they enter Git history.
Identifies hardcoded Amazon Web Services IAM access key prefixes (AKIA, ASIA, AROA, and related 20-character identifiers) committed in source code, scripts, or infrastructure templates.
Catches leaked OpenAI project/legacy secret keys (sk-proj-, sk-) and Anthropic Claude API keys (sk-ant-api03-) before they cause runaway AI billing or unauthorized model usage.
Detects GitHub classic personal access tokens (ghp_), fine-grained PATs (github_pat_), and OAuth tokens (gho_) hardcoded in scripts, CI configs, or package manager files.
Flags PostgreSQL, MySQL, MongoDB, and Redis connection URIs that embed plaintext usernames and passwords directly inside source code, ORM configs, or migration scripts.
Detects embedded PEM-encoded cryptographic private keys (RSA, ECDSA, DSA, OpenSSH, and PKCS#8) pasted inside source files, environment configs, or test fixtures.
Flags hardcoded Google Cloud Platform, Google Maps, Gemini, YouTube, and Firebase API keys matching the 39-character AIza signature.
Detects hardcoded HMAC signing secrets assigned to JWT_SECRET, AUTH_SECRET, or SECRET_KEY variables in application code or configuration files.
Catches hardcoded Slack incoming webhook URLs (hooks.slack.com/services/...) and Discord webhook endpoints (discord.com/api/webhooks/...) committed in code or alert scripts.
Identifies hardcoded SendGrid API keys (SG.xxx.yyy) and Twilio API Key SIDs (SK + 32 hex characters) exposed in backend services, serverless functions, or scripts.
Verifies whether local .env, .env.local, or .env.production files in your project folder are actually excluded by your root .gitignore before git add . stages them.
Flags unignored Google Cloud and Firebase Admin SDK JSON credential files (*firebase-adminsdk*.json, service-account*.json) that embed raw RSA private keys.
Detects unignored private key and certificate archive files (.pem, .key, .p12, .pfx) in your project, including binary keystores.
Flags unignored local database files (.sqlite, .sqlite3, .db) and SQL dumps (.sql) that frequently contain real user records, session tokens, or production snapshots.
Flags CORS configurations that combine a wildcard origin (*) with credentials enabled (Access-Control-Allow-Credentials: true), causing silent browser rejection or dangerous framework origin reflection.
Detects server and proxy code that blindly echoes req.headers.origin, $http_origin, or Express cors({ origin: true }) without an allowlist check.
Flags hardcoded introspection: true, playground: true, or graphiql: true flags in GraphQL server configurations that expose your complete internal API schema in production.
Flags MySQL (3306), PostgreSQL (5432), Redis (6379), and MongoDB (27017) port mappings in Docker Compose files that bind to all host network interfaces (0.0.0.0) and bypass UFW firewalls.
Catches Docker Compose and Kubernetes manifests enabling privileged: true or bind-mounting /var/run/docker.sock, which grants instant root-equivalent host escape.
Checks Nginx server { ... } configuration blocks to verify that baseline clickjacking (X-Frame-Options) and MIME-sniffing (X-Content-Type-Options) defense headers are configured.
Detects autoindex on; directives in Nginx configuration files that expose browsable directory trees, backup archives, and unlinked files to public visitors and crawlers.
Catches APP_DEBUG=true in environment/deployment files and hardcoded debug => true defaults in Laravel config/app.php that expose full Ignition stack traces and environment variables.
Flags hardcoded DEBUG = True assignments in Django settings.py files that expose detailed technical 404/500 tracebacks, SQL logs, and settings values to external visitors.
Detects private API keys, database URLs, or service_role tokens accidentally prefixed with NEXT_PUBLIC_, VITE_, REACT_APP_, or PUBLIC_, which causes bundlers to inline them into public browser JavaScript.
Checks whether a multi-file project contains a root .gitignore file to prevent accidental staging of .env secrets, local databases, dependencies, and build artifacts.