feat: Payment Compliance Pack — Semgrep + CodeQL + State Machine + Schema
Ausfuehrbares Pruefpaket fuer Payment-Terminal-Systeme: 1. Semgrep-Regeln (25 Regeln in 5 Dateien): - Logging: Sensitive Daten, Tokens, Debug-Flags - Crypto: MD5/SHA1/DES/ECB, Hardcoded Secrets, Weak Random, TLS - API: Debug-Routes, Exception Leaks, IDOR, Input Validation - Config: Test-Endpoints, CORS, Cookies, Retry - Data: Telemetrie, Cache, Export, Queue, Testdaten 2. CodeQL Query-Specs (5 Briefings): - Sensitive Data → Logs - Sensitive Data → HTTP Response - Tenant Context Loss - Sensitive Data → Telemetry - Cache/Export Leak 3. State-Machine-Tests (10 Testfaelle): - 11 Zustaende, 15 Events, 8 Invarianten - Duplicate Response, Timeout+Late Success, Decline - Invalid Reversal, Cancel, Backend Timeout - Parallel Reversal, Unknown Response, Reconnect - Late Response after Cancel 4. Finding Schema (JSON Schema): - Einheitliches Format fuer alle Engines - control_id, engine, status, confidence, evidence, verdict_text Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# CodeQL Query: Sensitive Data to HTTP Response
|
||||
|
||||
## Ziel
|
||||
Finde Fluesse sensibler Daten in HTTP-/API-Responses oder Exception-Bodies.
|
||||
|
||||
## Sources
|
||||
- Sensible Payment-Felder: pan, cvv, track2, cardNumber, pin, expiry
|
||||
- Interne Payment DTOs mit sensitiven Attributen
|
||||
|
||||
## Sinks
|
||||
- JSON serializer / response builder
|
||||
- Exception payload / error handler response
|
||||
- Template rendering output
|
||||
|
||||
## Mapped Controls
|
||||
- `API-009`: API-Antworten minimieren sensible Daten
|
||||
- `API-015`: Interne Fehler ohne sensitive Daten an Client
|
||||
- `ERROR-005`: Ausnahmebehandlung gibt keine sensitiven Rohdaten zurueck
|
||||
- `REPORT-006`: Reports offenbaren nur rollenerforderliche Daten
|
||||
Reference in New Issue
Block a user