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.

Open Folder Scanner →
PC-001
CRITICAL
all source files
Stripe Live Secret or Restricted Key Exposed

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.

PC-002
CRITICAL
all source files
AWS IAM Access Key ID Hardcoded

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.

PC-003
CRITICAL
all source files
OpenAI or Anthropic API Key Exposed

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.

PC-004
CRITICAL
all source files
GitHub Personal Access Token or Fine-Grained PAT

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.

PC-005
CRITICAL
all source files
Database Connection String with Embedded Password

Flags PostgreSQL, MySQL, MongoDB, and Redis connection URIs that embed plaintext usernames and passwords directly inside source code, ORM configs, or migration scripts.

PC-006
CRITICAL
all source files
PEM / RSA / EC Private Key Header in Source

Detects embedded PEM-encoded cryptographic private keys (RSA, ECDSA, DSA, OpenSSH, and PKCS#8) pasted inside source files, environment configs, or test fixtures.

PC-007
HIGH
all source files
Google Cloud / Firebase API Key Hardcoded

Flags hardcoded Google Cloud Platform, Google Maps, Gemini, YouTube, and Firebase API keys matching the 39-character AIza signature.

PC-008
HIGH
all source files
Hardcoded JWT Signing Secret

Detects hardcoded HMAC signing secrets assigned to JWT_SECRET, AUTH_SECRET, or SECRET_KEY variables in application code or configuration files.

PC-009
HIGH
all source files
Slack or Discord Incoming Webhook URL Exposed

Catches hardcoded Slack incoming webhook URLs (hooks.slack.com/services/...) and Discord webhook endpoints (discord.com/api/webhooks/...) committed in code or alert scripts.

PC-010
HIGH
all source files
Transactional Email or SMS API Key Exposed

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.

PC-011
CRITICAL
.env*
Unignored .env Environment File in Repository

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.

PC-012
CRITICAL
*firebase-adminsdk*.json
Unignored Firebase / GCP Service Account JSON

Flags unignored Google Cloud and Firebase Admin SDK JSON credential files (*firebase-adminsdk*.json, service-account*.json) that embed raw RSA private keys.

PC-013
CRITICAL
*.{pem,key,p12}
Unignored .pem, .key, or .p12 Certificate File

Detects unignored private key and certificate archive files (.pem, .key, .p12, .pfx) in your project, including binary keystores.

PC-014
HIGH
*.{sqlite,db,sql}
Unignored Local SQLite Database or SQL Dump

Flags unignored local database files (.sqlite, .sqlite3, .db) and SQL dumps (.sql) that frequently contain real user records, session tokens, or production snapshots.

PC-015
HIGH
config/cors.php, *.ts
Wildcard CORS Origin (*) Combined with Credentials

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.

PC-016
HIGH
*.ts, *.php, nginx.conf
Unvalidated Dynamic Origin Reflection in CORS Middleware

Detects server and proxy code that blindly echoes req.headers.origin, $http_origin, or Express cors({ origin: true }) without an allowlist check.

PC-017
MEDIUM
*.ts, *.js, *.env
GraphQL Introspection or Playground Enabled in Production Config

Flags hardcoded introspection: true, playground: true, or graphiql: true flags in GraphQL server configurations that expose your complete internal API schema in production.

PC-018
HIGH
docker-compose.yml
Database Port (3306, 5432, 6379, 27017) Bound to 0.0.0.0 in docker-compose.yml

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.

PC-019
CRITICAL
docker-compose.yml
Privileged Container or Mounted /var/run/docker.sock

Catches Docker Compose and Kubernetes manifests enabling privileged: true or bind-mounting /var/run/docker.sock, which grants instant root-equivalent host escape.

PC-020
MEDIUM
nginx.conf
Nginx Server Block Missing X-Frame-Options & X-Content-Type-Options

Checks Nginx server { ... } configuration blocks to verify that baseline clickjacking (X-Frame-Options) and MIME-sniffing (X-Content-Type-Options) defense headers are configured.

PC-021
HIGH
nginx.conf
Nginx autoindex on Exposing Directory Listings

Detects autoindex on; directives in Nginx configuration files that expose browsable directory trees, backup archives, and unlinked files to public visitors and crawlers.

PC-022
HIGH
.env*, config/app.php
Laravel APP_DEBUG=true Enabled in Environment Config

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.

PC-023
HIGH
settings.py
Django DEBUG = True Hardcoded in settings.py

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.

PC-024
CRITICAL
.env*, *.ts, *.js
Sensitive Secret Prefixed with NEXT_PUBLIC_ or VITE_

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.

PC-025
MEDIUM
.gitignore
Repository Missing a Root .gitignore File

Checks whether a multi-file project contains a root .gitignore file to prevent accidental staging of .env secrets, local databases, dependencies, and build artifacts.