Scan Modes
HZSec runs six parallel detection engines in a single scan. Each targets a distinct class of vulnerability. You can run all six together or target one mode at a time.
Secrets & Credentials
Finds API keys, tokens, connection strings, and passwords that have been committed to code — intentionally or by accident.
- ·40+ named patterns covering AWS, GCP, Azure, GitHub, Stripe, Twilio, SendGrid, and dozens of other services.
- ·Entropy analysis catches high-entropy strings that don't match a named pattern but are statistically likely to be secrets.
- ·Checks both current files and, if run in a git repo, commit history back to the initial commit.
AWS access key in .env.exampleGitHub PAT hardcoded in CI configDatabase password in source fileInsecure Configuration
Detects configuration values that are known to weaken security — regardless of what language or framework you're using.
- ·Debug mode enabled in production config (Django DEBUG=True, Flask debug=True, Rails config.log_level = :debug).
- ·HTTP endpoints where HTTPS should be used.
- ·Weak TLS versions (TLS 1.0, TLS 1.1) or insecure cipher suites.
- ·Missing security headers in web server configs (nginx, Apache, Caddy).
DEBUG=True in .envhttp:// callback URLSSLv3 in nginx.confVulnerable Code Patterns
Identifies code constructs that are commonly exploited in the OWASP Top 10 and CWE catalog.
- ·SQL injection via string concatenation or f-string formatting in query builders.
- ·Cross-site scripting (XSS) via unsanitized user input in template rendering.
- ·Path traversal in file read/write operations.
- ·Unsafe deserialization using pickle, YAML.load(), or eval().
- ·Command injection via subprocess with shell=True and user input.
f"SELECT * FROM users WHERE id={user_id}"pickle.loads(untrusted_data)subprocess.run(cmd, shell=True)Dependency CVEs
Checks every dependency in your lockfiles against current CVE databases — without sending your package list anywhere.
- ·Reads: package.json / package-lock.json, requirements.txt / Pipfile.lock, go.sum, Cargo.lock, Gemfile.lock, pom.xml.
- ·Cross-references CISA Known Exploited Vulnerabilities (KEV) catalog and NVD.
- ·CVE data is pulled to your machine daily. Scans run against the local copy — no package names leave your device.
- ·Findings include CVSS score, affected version range, patched version, and a link to the CVE advisory.
lodash < 4.17.21 (Prototype Pollution)log4j 2.x < 2.15.0 (Log4Shell)requests < 2.32.0 (SSRF)Web Exposure
Surfaces security gaps in how your web application presents itself to browsers and upstream proxies.
- ·Open or overly permissive CORS configurations (`Access-Control-Allow-Origin: *`).
- ·Missing or misconfigured Content Security Policy (CSP).
- ·Absent security headers: `X-Frame-Options`, `X-Content-Type-Options`, `Strict-Transport-Security`.
- ·Exposed admin routes or sensitive paths accessible without authentication middleware.
cors({ origin: "*" }) in ExpressNo CSP header in Next.js configAdmin route missing auth checkSystem Hardening
Reviews your project's infrastructure and deployment configuration for hardening gaps based on CIS benchmarks.
- ·Overly permissive file permissions (world-writable scripts, 0777 on sensitive config).
- ·Docker: running as root, no USER directive, privileged mode, sensitive mounts.
- ·CI/CD: secrets printed to logs, environment variables exposed in build artifacts.
- ·SSH config: PasswordAuthentication enabled, PermitRootLogin yes.
chmod 777 deploy.shDocker USER not setenv vars echoed in GitHub ActionsTargeting a specific mode
Pass a single mode name with --mode. Available modes: full (default), quick, secret, config, web, hardening, custom.
# Secrets only
hzsec scan --mode secret ./src
# Config files only
hzsec scan --mode config ./src
# All detectors (default)
hzsec scan --mode full ./srcQuick mode
Quick mode runs the code, config, and web detectors — skipping hardening and dependency checks. It completes faster and is well-suited for pre-commit use.
hzsec scan --mode quick ./src
# Use as a pre-commit hook — add to .git/hooks/pre-commit:
#!/bin/sh
hzsec scan --mode quick --fail-on critical ..gitignore
HZSec respects .gitignore by default. Build artifacts, node_modules, virtual environments, and compiled output are automatically excluded from every scan.