Repository navigation
Scanner Rules
Every check the scanners run, with the severity and PCI DSS requirement it reports. Requirement IDs are listed without their text; use get_requirement_details to read a requirement from your local copy.
Severities: critical means exposed cardholder data or keys, high a directly exploitable weakness, medium a hardening gap, low informational.
| Check | Severity | Requirement |
|---|---|---|
| Card number (Luhn-valid, major card prefix) in code, data or a comment | critical | 3.5.1 (related 3.4.1) |
| Well-known public test card number (e.g. 4111 1111 1111 1111) | low | 3.5.1 |
| Magnetic-stripe track data pattern | critical | 3.3.1 |
| CVV/PIN/track variable written to a log or storage | critical | 3.3.1 |
| CVV/PIN/track variable handled (not logged) | medium | 3.3.2 (related 3.3.1) |
Card-number variable (card_number, cardNumber, pan, ccNum, ...) written to a log or console without masking, truncation, tokenization or hashing |
high | 3.5.1 (related 3.4.1) |
| MD5, SHA-1, DES, Triple DES, RC4 or ECB mode | high | 3.5.1 (related 3.5.1.1 for MD5/SHA-1); 4.2.1 when the line is about TLS/SSL |
Cryptographic key in source (private_key, aes_key, secret_key, ...) |
critical | 3.6.1 |
Private key block (-----BEGIN ... PRIVATE KEY-----) |
critical | 3.6.1 |
| Hardcoded password, token or API key | high | 8.6.2 |
| AWS, GitHub, Stripe live, Slack or Google API key format | high | 8.6.2 |
Password inside a connection string (scheme://user:password@host) |
high | 8.6.2 |
Default or well-known password (admin, changeme, password, ...) |
high | 2.2.2 (related 8.6.2) |
SQL statement built with concatenation, f-strings, .format, %, template literals, C# interpolated strings, String.Format or sprintf
|
high | 6.2.4 |
Values loaded from the environment or written as placeholders (${VAR}, <your-token>, xxx) are not reported.
| Check | Severity | Requirement |
|---|---|---|
No USER in the final build stage (runs as root) |
high | 2.2.1 |
Final USER is root |
high | 2.2.1 |
EXPOSE of a remote-admin or plaintext port (FTP 21, SSH 22, Telnet 23, RDP 3389, Docker API 2375) |
high | 2.2.4 (related 2.2.5 for FTP, Telnet and Docker API) |
EXPOSE of a database or cache port |
medium | 1.3.1 |
| Check | Severity | Requirement |
|---|---|---|
privileged: true |
high | 2.2.1 |
network_mode: host |
high | 1.2.1 |
user: root |
high | 2.2.1 |
No user set |
medium | 2.2.1 |
cap_add with ALL or SYS_ADMIN
|
high | 2.2.1 |
| Docker socket mounted | high | 2.2.1 |
| Database, cache or admin port published on all interfaces (ports bound to 127.0.0.1 are fine) | high (admin) / medium (database) | 2.2.4 / 1.3.1 |
| Check | Severity | Requirement |
|---|---|---|
hostNetwork: true |
high | 1.2.1 |
hostPID or hostIPC
|
medium | 2.2.1 |
| Privileged container | high | 2.2.1 |
runAsUser: 0 |
high | 2.2.1 |
runAsNonRoot not enforced |
medium | 2.2.1 |
Capabilities ALL or SYS_ADMIN added |
high | 2.2.1 |
Docker socket mounted via hostPath
|
high | 2.2.1 |
Database or admin port exposed by a LoadBalancer / NodePort Service or a hostPort
|
high (LoadBalancer, admin ports) / medium | 1.3.1 / 2.2.4 |
| Check | Severity | Requirement |
|---|---|---|
ssl_protocols allows SSLv2, SSLv3, TLSv1 or TLSv1.1 |
high | 4.2.1 |
ssl_ciphers allows ALL, or RC4, DES/3DES, MD5, NULL, EXPORT, LOW or anonymous suites |
high | 4.2.1 |
TLS in use but no Strict-Transport-Security header |
medium | 4.2.1 |
| Port 80 listener without a redirect to HTTPS | medium | 4.2.1 |
server_tokens on, or not set to off
|
low | 2.2.6 |
autoindex on |
medium | 2.2.6 |
No Content-Security-Policy header |
medium | 6.2.4 (related 6.4.3) |
No X-Content-Type-Options or X-Frame-Options header |
low | 6.2.4 |
| Check | Severity | Requirement |
|---|---|---|
Bucket ACL public-read, public-read-write or authenticated-read
|
high | 1.4.4 (related 7.2.1) |
| S3 public access block setting turned off | high | 1.4.4 |
Resource policy allowing any principal (*) |
high | 1.4.4 (related 7.2.1) |
| Storage without encryption at rest (EBS, RDS, EFS, Redshift, ElastiCache) | high | 3.5.1 |
Database with publicly_accessible = true
|
high | 1.4.4 |
Security-group ingress from 0.0.0.0/0 or ::/0 to a database or admin port, or to all ports |
high | 1.3.1 (related 1.2.1) |
CloudTrail enable_logging = false
|
high | 10.2.1 |
enable_log_file_validation = false (log changes would go undetected) |
medium | 10.3.4 (related 10.2.1) |
Other audit-logging settings (logging_enabled, enable_audit_logging, audit_logging) set to false
|
medium | 10.2.1 |
| Check | Severity | Requirement |
|---|---|---|
| External script without Subresource Integrity | high | 6.4.3 |
| Script loaded over plain HTTP | high | 6.4.3 (related 4.2.1) |
| Integrity hash other than sha256/384/512 | medium | 6.4.3 |
SRI present but no crossorigin attribute |
low | 6.4.3 |
| No Content-Security-Policy | high | 6.4.3 (related 11.6.1) |
| Report-only CSP only | medium | 6.4.3 |
CSP without script-src or default-src
|
high | 6.4.3 |
script-src allows 'unsafe-inline' (low when a nonce or hash is also present) |
high | 6.4.3 |
script-src allows 'unsafe-eval'
|
high | 6.4.3 |
script-src allows *, http:, https:, data: or blob:
|
high | 6.4.3 |
No report-uri / report-to
|
low | 11.6.1 |
audit_directory sends each file to the matching scanner:
| Files | Scanner |
|---|---|
Dockerfile*, *.dockerfile
|
Dockerfile |
docker-compose.yml, compose.yaml and variants such as docker-compose.prod.yml (.yml or .yaml) |
docker-compose |
*.tf |
Terraform |
nginx.conf, *.nginx, *.conf containing a server { ... listen } block |
nginx |
*.yaml / *.yml with apiVersion: and kind:
|
Kubernetes |
*.html, *.htm, *.jsx, *.tsx, *.vue
|
Payment page (only analyzes a CSP the file declares) and code |
*.py, *.js, *.mjs, *.cjs, *.ts, *.go, *.java, *.kt, *.php, *.rb, *.cs, *.json, other YAML, *.properties, *.ini, .env*
|
Code |
The code and infrastructure scanners also report card numbers and hardcoded secrets in any file they read. audit_payment_page_html on its own does not, but inside audit_directory HTML and frontend files also go through the code scanner, so they are checked too.
- At most
max_filesfiles are scanned (default 100, maximum 1,000). Files beyond that are counted asmax_files_reached, and the result says"truncated": true. - Skipped files are counted by reason: over 500 KB (
too_large), binary, meaning a NUL byte in the first 8 KB (binary),empty,unreadable, other file types (unsupported_type), and symlinked files (symlink, orsymlink_outside_rootwhen the link points outside the folder). - Never entered: symlinked folders,
.git,.hg,.svn,node_modules,.venv,venv,__pycache__,dist,build,.mypy_cache,.pytest_cache,.ruff_cache,.tox,.terraform,.idea, anddata/rawat the top of the scanned folder. - Refused: the filesystem root, your home folder itself, the exact paths
/etc,/usr,/var,/bin,/sbin,/lib,/lib64,/boot,/root,/home,/opt,/srv,/mntand/media, anything under/proc,/sys,/devor/run, and Windows system folders. Subfolders such as/var/wwwcan be scanned. - Findings are grouped by severity, requirement and description, with up to 10 occurrences per group. The groups do not include
related_requirement_ids.
- Card numbers are masked to first 6 / last 4 digits. Secret values found by the scanners are replaced with
****; well-known key formats (AWS, GitHub, Stripe, Slack, Google) keep their first 4 characters, such asAKIA****. - Text quoted from your input (code lines, config values, URLs, file names) is wrapped in
<scanned_artifact>tags wherever it appears:evidence,location,file,errors[].file, and the payment page'sscript_inventory[].srcandcsp.script_src. Descriptions and remediation steps are fixed text.
These are pattern-based heuristics: they miss issues and report false positives, so review every finding. To propose a new rule, open a feature request.
Independent community project, not affiliated with or endorsed by PCI Security Standards Council. A readiness aid, not a PCI DSS assessment. Code licensed under Apache-2.0.
PCI DSS Compliance Assistant
- Home
- Installation
- Connecting Clients
- Tools Reference
- Scanner Rules
- How It Works
- Troubleshooting and FAQ
- Roadmap
- Contributing
Links