Pci dss

From tinh2/skills-hub-registry · View interactive version

Pci dss is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. PCI DSS v4.0 compliance audit for payment-handling codebases. Scans for PAN patterns (Visa, Mastercard, Amex, Discover), CVV storage violations, and track data retention. Triggers: building or auditing payment flows, Stripe/Braintree/Adyen integrations.

How to use this skill

Skill file

You are in AUTONOMOUS MODE. Do NOT ask questions. Audit every applicable PCI DSS requirement systematically.

TARGET:

$ARGUMENTS

If no arguments provided, audit the entire project in the current working directory against all PCI DSS v4.0 requirements.

============================================================

PHASE 0: SCOPE DETERMINATION

============================================================

Determine the Cardholder Data Environment (CDE) scope:

TECH STACK DETECTION:

CDE BOUNDARY MAPPING:

CARDHOLDER DATA PATTERNS — scan for these regex patterns:

Produce a CDE scope map before proceeding.

============================================================

PHASE 1: REQUIREMENTS 1-2 — NETWORK SECURITY

============================================================

Audit network security controls:

REQUIREMENT 1 — NETWORK SECURITY CONTROLS:

REQUIREMENT 2 — SECURE CONFIGURATIONS:

For each finding: requirement ID, file path, severity, description, remediation.

============================================================

PHASE 2: REQUIREMENT 3 — STORED CARDHOLDER DATA

============================================================

Audit protection of stored cardholder data:

DATA RETENTION:

ENCRYPTION AT REST:

MASKING AND TRUNCATION:

TOKENIZATION:

============================================================

PHASE 3: REQUIREMENT 4 — TRANSMISSION ENCRYPTION

============================================================

Audit encryption of cardholder data in transit:

TLS CONFIGURATION:

INTERNAL TRANSMISSION:

END-USER TRANSMISSION:

============================================================

PHASE 4: REQUIREMENTS 5-6 — VULNERABILITY MANAGEMENT

============================================================

Audit secure development and vulnerability management:

REQUIREMENT 5 — MALWARE PROTECTION:

REQUIREMENT 6 — SECURE DEVELOPMENT:

PCI DSS v4.0 ADDITIONS:

============================================================

PHASE 5: REQUIREMENTS 7-8 — ACCESS CONTROL

============================================================

Audit access control mechanisms:

REQUIREMENT 7 — RESTRICT ACCESS BY BUSINESS NEED:

REQUIREMENT 8 — IDENTIFY AND AUTHENTICATE:

PCI DSS v4.0 ADDITIONS:

============================================================

PHASE 6: REQUIREMENT 9 — PHYSICAL ACCESS

============================================================

NOTE: Requirement 9 covers physical access controls. This is largely out of scope

for code analysis. However, check for:

Flag as: "Req 9 — Physical Access: Primarily non-code. [N findings in IaC if any]"

============================================================

PHASE 7: REQUIREMENT 10 — LOGGING AND MONITORING

============================================================

Audit logging and monitoring for CDE:

AUDIT TRAIL:

LOG PROTECTION:

MONITORING AND ALERTING:

============================================================

PHASE 8: REQUIREMENT 11 — SECURITY TESTING

============================================================

Audit security testing practices in code and CI/CD:

VULNERABILITY SCANNING:

PENETRATION TESTING:

CHANGE DETECTION:

PCI DSS v4.0 ADDITIONS:

============================================================

PHASE 9: REQUIREMENT 12 — POLICY REFERENCES

============================================================

Check for security policy artifacts in the codebase:

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing the security analysis, validate thoroughness:

  1. Verify every category in the audit was actually checked (not skipped).
  2. Verify every finding has a specific file:line location.
  3. Verify severity ratings are justified by impact assessment.
  4. Verify no false positives by re-reading flagged code in context.

IF VALIDATION FAILS:

============================================================

OUTPUT

============================================================

PCI DSS v4.0 Compliance Audit Report

Project: [name]

Stack: [detected technologies]

CDE Scope: [scope description]

SAQ Type (estimated): [A / A-EP / D / N/A]

Summary

| Req | Category | Status | Findings | Critical |

|-----|----------|--------|----------|----------|

| 1 | Network Security Controls | [PASS/WARN/FAIL] | N | N |

| 2 | Secure Configurations | [PASS/WARN/FAIL] | N | N |

| 3 | Stored Cardholder Data | [PASS/WARN/FAIL] | N | N |

| 4 | Transmission Encryption | [PASS/WARN/FAIL] | N | N |

| 5 | Malware Protection | [PASS/WARN/FAIL] | N | N |

| 6 | Secure Development | [PASS/WARN/FAIL] | N | N |

| 7 | Access Restriction | [PASS/WARN/FAIL] | N | N |

| 8 | Identification/Auth | [PASS/WARN/FAIL] | N | N |

| 9 | Physical Access | [OUT-OF-SCOPE] | N | N |

| 10 | Logging/Monitoring | [PASS/WARN/FAIL] | N | N |

| 11 | Security Testing | [PASS/WARN/FAIL] | N | N |

| 12 | Policy | [PASS/WARN/FAIL] | N | N |

CDE Data Flow Map

[Description of cardholder data flow through the system]

Cardholder Data Discovery

| Location | Data Type | Protected | Action Required |

|----------|-----------|-----------|-----------------|

Detailed Findings

For each requirement with WARN or FAIL:

Requirement [N] — [Name]

| # | Severity | Sub-Req | File | Line | Description | Remediation |

|---|----------|---------|------|------|-------------|-------------|

Risk Assessment

Remediation Priority

[Ordered list: data exposure issues first, then access control, then logging, then configuration]

============================================================

NEXT STEPS

============================================================

After reviewing the audit:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /pci-dss — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

============================================================

DO NOT

============================================================

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.