rtexit-method 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/package.json +2 -5
  2. package/packaged-assets/.agents/skills/rt-active-recon/SKILL.md +767 -0
  3. package/packaged-assets/.agents/skills/rt-active-recon/workflow.md +68 -0
  4. package/packaged-assets/.agents/skills/rt-agent-breaker/SKILL.md +65 -0
  5. package/packaged-assets/.agents/skills/rt-agent-breaker/customize.toml +76 -0
  6. package/packaged-assets/.agents/skills/rt-agent-commander/SKILL.md +63 -0
  7. package/packaged-assets/.agents/skills/rt-agent-commander/customize.toml +67 -0
  8. package/packaged-assets/.agents/skills/rt-agent-ghost/SKILL.md +65 -0
  9. package/packaged-assets/.agents/skills/rt-agent-ghost/customize.toml +77 -0
  10. package/packaged-assets/.agents/skills/rt-agent-navigator/SKILL.md +62 -0
  11. package/packaged-assets/.agents/skills/rt-agent-navigator/customize.toml +61 -0
  12. package/packaged-assets/.agents/skills/rt-agent-phantom/SKILL.md +62 -0
  13. package/packaged-assets/.agents/skills/rt-agent-phantom/customize.toml +62 -0
  14. package/packaged-assets/.agents/skills/rt-agent-scout/SKILL.md +62 -0
  15. package/packaged-assets/.agents/skills/rt-agent-scout/customize.toml +61 -0
  16. package/packaged-assets/.agents/skills/rt-agent-scribe/SKILL.md +65 -0
  17. package/packaged-assets/.agents/skills/rt-agent-scribe/customize.toml +77 -0
  18. package/packaged-assets/.agents/skills/rt-attack-chain-builder/SKILL.md +476 -0
  19. package/packaged-assets/.agents/skills/rt-attack-chain-builder/workflow.md +68 -0
  20. package/packaged-assets/.agents/skills/rt-attack-surface-map/SKILL.md +1209 -0
  21. package/packaged-assets/.agents/skills/rt-attack-surface-map/template.md +62 -0
  22. package/packaged-assets/.agents/skills/rt-autodoc/SKILL.md +258 -0
  23. package/packaged-assets/.agents/skills/rt-c2-operations/SKILL.md +1072 -0
  24. package/packaged-assets/.agents/skills/rt-c2-operations/workflow.md +68 -0
  25. package/packaged-assets/.agents/skills/rt-compliance-mapper/SKILL.md +773 -0
  26. package/packaged-assets/.agents/skills/rt-create-sead/SKILL.md +74 -0
  27. package/packaged-assets/.agents/skills/rt-create-sead/template.md +89 -0
  28. package/packaged-assets/.agents/skills/rt-create-sead/workflow.md +68 -0
  29. package/packaged-assets/.agents/skills/rt-credential-access/SKILL.md +756 -0
  30. package/packaged-assets/.agents/skills/rt-credential-hunt/SKILL.md +856 -0
  31. package/packaged-assets/.agents/skills/rt-credential-hunt/workflow.md +68 -0
  32. package/packaged-assets/.agents/skills/rt-cvss-calculator/SKILL.md +542 -0
  33. package/packaged-assets/.agents/skills/rt-cvss-calculator/cvss4-matrix.csv +20 -0
  34. package/packaged-assets/.agents/skills/rt-data-exfiltration/SKILL.md +784 -0
  35. package/packaged-assets/.agents/skills/rt-defense-evasion/SKILL.md +987 -0
  36. package/packaged-assets/.agents/skills/rt-evidence-chain/SKILL.md +712 -0
  37. package/packaged-assets/.agents/skills/rt-evidence-chain/template.md +31 -0
  38. package/packaged-assets/.agents/skills/rt-executive-report/SKILL.md +718 -0
  39. package/packaged-assets/.agents/skills/rt-executive-report/template.md +38 -0
  40. package/packaged-assets/.agents/skills/rt-executive-report/workflow.md +68 -0
  41. package/packaged-assets/.agents/skills/rt-exploit-active-directory/SKILL.md +1078 -0
  42. package/packaged-assets/.agents/skills/rt-exploit-active-directory/ad-checklist.csv +12 -0
  43. package/packaged-assets/.agents/skills/rt-exploit-active-directory/workflow.md +68 -0
  44. package/packaged-assets/.agents/skills/rt-exploit-android/SKILL.md +1329 -0
  45. package/packaged-assets/.agents/skills/rt-exploit-android/masvs-checklist.csv +10 -0
  46. package/packaged-assets/.agents/skills/rt-exploit-android/workflow.md +68 -0
  47. package/packaged-assets/.agents/skills/rt-exploit-api/SKILL.md +1547 -0
  48. package/packaged-assets/.agents/skills/rt-exploit-api/workflow.md +68 -0
  49. package/packaged-assets/.agents/skills/rt-exploit-auth/SKILL.md +1949 -0
  50. package/packaged-assets/.agents/skills/rt-exploit-auth/workflow.md +68 -0
  51. package/packaged-assets/.agents/skills/rt-exploit-bec/SKILL.md +69 -0
  52. package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/SKILL.md +865 -0
  53. package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/workflow.md +68 -0
  54. package/packaged-assets/.agents/skills/rt-exploit-cloud-azure/SKILL.md +1258 -0
  55. package/packaged-assets/.agents/skills/rt-exploit-cloud-gcp/SKILL.md +981 -0
  56. package/packaged-assets/.agents/skills/rt-exploit-containers/SKILL.md +55 -0
  57. package/packaged-assets/.agents/skills/rt-exploit-databases/SKILL.md +1374 -0
  58. package/packaged-assets/.agents/skills/rt-exploit-desktop-mac/SKILL.md +834 -0
  59. package/packaged-assets/.agents/skills/rt-exploit-desktop-win/SKILL.md +903 -0
  60. package/packaged-assets/.agents/skills/rt-exploit-desktop-win/workflow.md +68 -0
  61. package/packaged-assets/.agents/skills/rt-exploit-dotnet/SKILL.md +945 -0
  62. package/packaged-assets/.agents/skills/rt-exploit-elasticsearch/SKILL.md +68 -0
  63. package/packaged-assets/.agents/skills/rt-exploit-electron/SKILL.md +1023 -0
  64. package/packaged-assets/.agents/skills/rt-exploit-electron/workflow.md +68 -0
  65. package/packaged-assets/.agents/skills/rt-exploit-file-upload/SKILL.md +1576 -0
  66. package/packaged-assets/.agents/skills/rt-exploit-file-upload/payloads/README.md +4 -0
  67. package/packaged-assets/.agents/skills/rt-exploit-file-upload/workflow.md +68 -0
  68. package/packaged-assets/.agents/skills/rt-exploit-firebase/SKILL.md +54 -0
  69. package/packaged-assets/.agents/skills/rt-exploit-frameworks/SKILL.md +967 -0
  70. package/packaged-assets/.agents/skills/rt-exploit-idor/SKILL.md +1693 -0
  71. package/packaged-assets/.agents/skills/rt-exploit-idor/workflow.md +68 -0
  72. package/packaged-assets/.agents/skills/rt-exploit-injection/SKILL.md +1860 -0
  73. package/packaged-assets/.agents/skills/rt-exploit-injection/payloads/sqlmap-tampers.txt +22 -0
  74. package/packaged-assets/.agents/skills/rt-exploit-injection/workflow.md +68 -0
  75. package/packaged-assets/.agents/skills/rt-exploit-ios/SKILL.md +1214 -0
  76. package/packaged-assets/.agents/skills/rt-exploit-ios/workflow.md +68 -0
  77. package/packaged-assets/.agents/skills/rt-exploit-iot/SKILL.md +91 -0
  78. package/packaged-assets/.agents/skills/rt-exploit-iot/workflow.md +68 -0
  79. package/packaged-assets/.agents/skills/rt-exploit-java/SKILL.md +1009 -0
  80. package/packaged-assets/.agents/skills/rt-exploit-jwt/SKILL.md +1327 -0
  81. package/packaged-assets/.agents/skills/rt-exploit-jwt/workflow.md +68 -0
  82. package/packaged-assets/.agents/skills/rt-exploit-mongodb/SKILL.md +67 -0
  83. package/packaged-assets/.agents/skills/rt-exploit-mssql/SKILL.md +52 -0
  84. package/packaged-assets/.agents/skills/rt-exploit-mysql/SKILL.md +53 -0
  85. package/packaged-assets/.agents/skills/rt-exploit-network/SKILL.md +118 -0
  86. package/packaged-assets/.agents/skills/rt-exploit-network/workflow.md +68 -0
  87. package/packaged-assets/.agents/skills/rt-exploit-nodejs/SKILL.md +852 -0
  88. package/packaged-assets/.agents/skills/rt-exploit-osticket/SKILL.md +63 -0
  89. package/packaged-assets/.agents/skills/rt-exploit-phishing/SKILL.md +173 -0
  90. package/packaged-assets/.agents/skills/rt-exploit-phishing/templates/README.md +4 -0
  91. package/packaged-assets/.agents/skills/rt-exploit-phishing/workflow.md +68 -0
  92. package/packaged-assets/.agents/skills/rt-exploit-php/SKILL.md +1119 -0
  93. package/packaged-assets/.agents/skills/rt-exploit-physical/SKILL.md +63 -0
  94. package/packaged-assets/.agents/skills/rt-exploit-physical/workflow.md +68 -0
  95. package/packaged-assets/.agents/skills/rt-exploit-postgresql/SKILL.md +67 -0
  96. package/packaged-assets/.agents/skills/rt-exploit-python/SKILL.md +986 -0
  97. package/packaged-assets/.agents/skills/rt-exploit-redis/SKILL.md +68 -0
  98. package/packaged-assets/.agents/skills/rt-exploit-ruby/SKILL.md +61 -0
  99. package/packaged-assets/.agents/skills/rt-exploit-scada/SKILL.md +1091 -0
  100. package/packaged-assets/.agents/skills/rt-exploit-ssrf/SKILL.md +1528 -0
  101. package/packaged-assets/.agents/skills/rt-exploit-ssrf/payloads.txt +23 -0
  102. package/packaged-assets/.agents/skills/rt-exploit-ssrf/workflow.md +68 -0
  103. package/packaged-assets/.agents/skills/rt-exploit-vishing/SKILL.md +121 -0
  104. package/packaged-assets/.agents/skills/rt-exploit-vishing/scripts.md +4 -0
  105. package/packaged-assets/.agents/skills/rt-exploit-web/SKILL.md +1902 -0
  106. package/packaged-assets/.agents/skills/rt-exploit-web/owasp-checklist.csv +14 -0
  107. package/packaged-assets/.agents/skills/rt-exploit-web/workflow.md +68 -0
  108. package/packaged-assets/.agents/skills/rt-exploit-wireless/SKILL.md +71 -0
  109. package/packaged-assets/.agents/skills/rt-exploit-wordpress/SKILL.md +1565 -0
  110. package/packaged-assets/.agents/skills/rt-exploit-wordpress/cves.csv +7 -0
  111. package/packaged-assets/.agents/skills/rt-exploit-wordpress/workflow.md +68 -0
  112. package/packaged-assets/.agents/skills/rt-exploit-xss/SKILL.md +1526 -0
  113. package/packaged-assets/.agents/skills/rt-exploit-xss/payloads.txt +18 -0
  114. package/packaged-assets/.agents/skills/rt-exploit-xss/workflow.md +68 -0
  115. package/packaged-assets/.agents/skills/rt-finding-document/SKILL.md +687 -0
  116. package/packaged-assets/.agents/skills/rt-finding-document/template.md +71 -0
  117. package/packaged-assets/.agents/skills/rt-finding-document/workflow.md +68 -0
  118. package/packaged-assets/.agents/skills/rt-finding-tracker/SKILL.md +216 -0
  119. package/packaged-assets/.agents/skills/rt-finding-tracker/workflow.md +68 -0
  120. package/packaged-assets/.agents/skills/rt-help/SKILL.md +292 -0
  121. package/packaged-assets/.agents/skills/rt-help/workflow.md +68 -0
  122. package/packaged-assets/.agents/skills/rt-js-analysis/SKILL.md +639 -0
  123. package/packaged-assets/.agents/skills/rt-js-analysis/patterns.txt +27 -0
  124. package/packaged-assets/.agents/skills/rt-js-analysis/workflow.md +68 -0
  125. package/packaged-assets/.agents/skills/rt-kill-chain-map/SKILL.md +393 -0
  126. package/packaged-assets/.agents/skills/rt-lateral-movement/SKILL.md +1032 -0
  127. package/packaged-assets/.agents/skills/rt-lateral-movement/workflow.md +68 -0
  128. package/packaged-assets/.agents/skills/rt-methodology-selector/SKILL.md +69 -0
  129. package/packaged-assets/.agents/skills/rt-methodology-selector/frameworks.csv +10 -0
  130. package/packaged-assets/.agents/skills/rt-methodology-selector/workflow.md +68 -0
  131. package/packaged-assets/.agents/skills/rt-mitre-map/SKILL.md +668 -0
  132. package/packaged-assets/.agents/skills/rt-mitre-map/tactics.csv +16 -0
  133. package/packaged-assets/.agents/skills/rt-mitre-map/workflow.md +68 -0
  134. package/packaged-assets/.agents/skills/rt-osint/SKILL.md +775 -0
  135. package/packaged-assets/.agents/skills/rt-osint/osint-sources.csv +12 -0
  136. package/packaged-assets/.agents/skills/rt-osint/workflow.md +68 -0
  137. package/packaged-assets/.agents/skills/rt-party-mode/SKILL.md +249 -0
  138. package/packaged-assets/.agents/skills/rt-party-mode/workflow.md +68 -0
  139. package/packaged-assets/.agents/skills/rt-persistence/SKILL.md +1146 -0
  140. package/packaged-assets/.agents/skills/rt-persistence/workflow.md +68 -0
  141. package/packaged-assets/.agents/skills/rt-poc-writer/SKILL.md +640 -0
  142. package/packaged-assets/.agents/skills/rt-post-exploitation/SKILL.md +998 -0
  143. package/packaged-assets/.agents/skills/rt-post-exploitation/linux-checklist.csv +10 -0
  144. package/packaged-assets/.agents/skills/rt-post-exploitation/windows-checklist.csv +10 -0
  145. package/packaged-assets/.agents/skills/rt-post-exploitation/workflow.md +68 -0
  146. package/packaged-assets/.agents/skills/rt-privilege-escalation/SKILL.md +1027 -0
  147. package/packaged-assets/.agents/skills/rt-privilege-escalation/linux-checklist.csv +10 -0
  148. package/packaged-assets/.agents/skills/rt-privilege-escalation/win-checklist.csv +10 -0
  149. package/packaged-assets/.agents/skills/rt-privilege-escalation/workflow.md +68 -0
  150. package/packaged-assets/.agents/skills/rt-remediation-roadmap/SKILL.md +665 -0
  151. package/packaged-assets/.agents/skills/rt-remediation-roadmap/template.md +28 -0
  152. package/packaged-assets/.agents/skills/rt-risk-matrix/SKILL.md +232 -0
  153. package/packaged-assets/.agents/skills/rt-rules-of-engagement/SKILL.md +62 -0
  154. package/packaged-assets/.agents/skills/rt-rules-of-engagement/workflow.md +68 -0
  155. package/packaged-assets/.agents/skills/rt-scenario-c001/SKILL.md +71 -0
  156. package/packaged-assets/.agents/skills/rt-scenario-c002/SKILL.md +69 -0
  157. package/packaged-assets/.agents/skills/rt-scenario-c003/SKILL.md +71 -0
  158. package/packaged-assets/.agents/skills/rt-scenario-c004/SKILL.md +71 -0
  159. package/packaged-assets/.agents/skills/rt-scenario-c005/SKILL.md +72 -0
  160. package/packaged-assets/.agents/skills/rt-scenario-d001/SKILL.md +378 -0
  161. package/packaged-assets/.agents/skills/rt-scenario-d002/SKILL.md +392 -0
  162. package/packaged-assets/.agents/skills/rt-scenario-d003/SKILL.md +522 -0
  163. package/packaged-assets/.agents/skills/rt-scenario-d004/SKILL.md +373 -0
  164. package/packaged-assets/.agents/skills/rt-scenario-d005/SKILL.md +458 -0
  165. package/packaged-assets/.agents/skills/rt-scenario-library/SKILL.md +292 -0
  166. package/packaged-assets/.agents/skills/rt-scenario-library/scenarios.csv +32 -0
  167. package/packaged-assets/.agents/skills/rt-scenario-m001/SKILL.md +796 -0
  168. package/packaged-assets/.agents/skills/rt-scenario-m002/SKILL.md +723 -0
  169. package/packaged-assets/.agents/skills/rt-scenario-m003/SKILL.md +463 -0
  170. package/packaged-assets/.agents/skills/rt-scenario-m004/SKILL.md +449 -0
  171. package/packaged-assets/.agents/skills/rt-scenario-m005/SKILL.md +505 -0
  172. package/packaged-assets/.agents/skills/rt-scenario-n001/SKILL.md +573 -0
  173. package/packaged-assets/.agents/skills/rt-scenario-n002/SKILL.md +112 -0
  174. package/packaged-assets/.agents/skills/rt-scenario-n003/SKILL.md +100 -0
  175. package/packaged-assets/.agents/skills/rt-scenario-n004/SKILL.md +90 -0
  176. package/packaged-assets/.agents/skills/rt-scenario-n005/SKILL.md +71 -0
  177. package/packaged-assets/.agents/skills/rt-scenario-w001/SKILL.md +635 -0
  178. package/packaged-assets/.agents/skills/rt-scenario-w002/SKILL.md +612 -0
  179. package/packaged-assets/.agents/skills/rt-scenario-w003/SKILL.md +449 -0
  180. package/packaged-assets/.agents/skills/rt-scenario-w004/SKILL.md +648 -0
  181. package/packaged-assets/.agents/skills/rt-scenario-w005/SKILL.md +479 -0
  182. package/packaged-assets/.agents/skills/rt-scenario-w006/SKILL.md +443 -0
  183. package/packaged-assets/.agents/skills/rt-scenario-w007/SKILL.md +494 -0
  184. package/packaged-assets/.agents/skills/rt-scenario-w008/SKILL.md +576 -0
  185. package/packaged-assets/.agents/skills/rt-scenario-w009/SKILL.md +518 -0
  186. package/packaged-assets/.agents/skills/rt-scenario-w010/SKILL.md +574 -0
  187. package/packaged-assets/.agents/skills/rt-scope-definition/SKILL.md +79 -0
  188. package/packaged-assets/.agents/skills/rt-scope-definition/workflow.md +68 -0
  189. package/packaged-assets/.agents/skills/rt-shodan-recon/SKILL.md +880 -0
  190. package/packaged-assets/.agents/skills/rt-status/SKILL.md +64 -0
  191. package/packaged-assets/.agents/skills/rt-subdomain-enum/SKILL.md +906 -0
  192. package/packaged-assets/.agents/skills/rt-subdomain-enum/workflow.md +68 -0
  193. package/packaged-assets/.agents/skills/rt-technical-report/SKILL.md +710 -0
  194. package/packaged-assets/.agents/skills/rt-technical-report/template.md +41 -0
  195. package/packaged-assets/.agents/skills/rt-technical-report/workflow.md +68 -0
  196. package/packaged-assets/.agents/skills/rt-threat-model/SKILL.md +59 -0
  197. package/packaged-assets/.agents/skills/rt-threat-model/template.md +32 -0
  198. package/packaged-assets/.agents/skills/rt-threat-model/workflow.md +68 -0
  199. package/packaged-assets/.agents/skills/rt-timeline/SKILL.md +338 -0
  200. package/packaged-assets/RTEXIT.md +127 -0
  201. package/tools/installer/lib/asset-manifest.js +10 -5
  202. package/tools/installer/lib/copy-assets.js +5 -2
  203. /package/{_rtexit → packaged-assets/_rtexit}/config.toml +0 -0
  204. /package/{_rtexit → packaged-assets/_rtexit}/config.user.toml +0 -0
  205. /package/{_rtexit → packaged-assets/_rtexit}/custom/config.toml +0 -0
  206. /package/{_rtexit → packaged-assets/_rtexit}/scripts/autodoc_engine.py +0 -0
  207. /package/{_rtexit → packaged-assets/_rtexit}/scripts/finding_tracker.py +0 -0
  208. /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_config.py +0 -0
  209. /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_customization.py +0 -0
  210. /package/{resources → packaged-assets/resources}/certifications.md +0 -0
  211. /package/{resources → packaged-assets/resources}/payloads.md +0 -0
  212. /package/{resources → packaged-assets/resources}/tools.md +0 -0
  213. /package/{resources → packaged-assets/resources}/wordlists.md +0 -0
  214. /package/{templates → packaged-assets/templates}/attack-chain-template.md +0 -0
  215. /package/{templates → packaged-assets/templates}/executive-report-template.md +0 -0
  216. /package/{templates → packaged-assets/templates}/executive-report.md +0 -0
  217. /package/{templates → packaged-assets/templates}/finding-template.md +0 -0
  218. /package/{templates → packaged-assets/templates}/remediation-roadmap.md +0 -0
  219. /package/{templates → packaged-assets/templates}/sead-template.md +0 -0
  220. /package/{templates → packaged-assets/templates}/technical-report.md +0 -0
@@ -0,0 +1,773 @@
1
+ ---
2
+ name: rt-compliance-mapper
3
+ description: "Map security findings to compliance frameworks: PCI-DSS v4.0, GDPR, ISO 27001:2022, HIPAA, SOC 2 Type II, NIST CSF 2.0, CIS Controls v8. Creates compliance impact table per finding showing which controls are violated and regulatory implications. Estimates financial penalty exposure for GDPR/PCI violations."
4
+ ---
5
+
6
+ # rt-compliance-mapper
7
+
8
+ ## 1. Overview
9
+
10
+ The compliance mapper skill bridges the gap between raw technical security findings and the regulatory and contractual obligations of the client organisation. A SQL injection finding means one thing to an engineer; it means EUR 20 million or 4 % of global turnover to a CISO presenting to a board under GDPR, and it means a failed PCI QSA assessment to a CFO running a card-present payment environment.
11
+
12
+ This skill is invoked at the reporting phase of an engagement — after findings are confirmed and logged in `findings-master.csv` — to produce per-finding compliance tables and a consolidated regulatory exposure summary. Output feeds directly into the executive report generated by `rt-agent-scribe`.
13
+
14
+ ### When to Run This Skill
15
+
16
+ - After all exploitation phases are complete and findings are stable in the tracker.
17
+ - Before executive report generation so compliance tables are ready to embed.
18
+ - When a client explicitly asks "which regulations does this finding affect?" during a debrief.
19
+ - When estimating maximum financial penalty exposure to justify remediation investment.
20
+
21
+ ### Frameworks Covered
22
+
23
+ | Framework | Version | Scope |
24
+ |---|---|---|
25
+ | PCI-DSS | v4.0 (March 2024) | Payment card data environments |
26
+ | GDPR | 2016/679 | EU personal data processing |
27
+ | ISO 27001 | 2022 revision | Information security management systems |
28
+ | HIPAA | 2013 Omnibus Rule | US healthcare data (PHI) |
29
+ | SOC 2 | Type II (Trust Services Criteria 2017) | SaaS/cloud service providers |
30
+ | NIST CSF | 2.0 (February 2024) | Voluntary cybersecurity framework |
31
+ | CIS Controls | v8 (2021) | Prioritised security controls |
32
+
33
+ ---
34
+
35
+ ## 2. Engagement Lifecycle Position
36
+
37
+ ```
38
+ RECON → EXPLOITATION → POST-EXPLOITATION
39
+
40
+ findings-master.csv
41
+
42
+ [rt-compliance-mapper] ← YOU ARE HERE
43
+
44
+ compliance-impact.md
45
+ penalty-exposure.md
46
+
47
+ [rt-agent-scribe → executive report]
48
+ ```
49
+
50
+ The skill reads from the finding tracker CSV, maps each finding to relevant control violations across all applicable frameworks, and writes two output documents that Layla (rt-agent-scribe) imports into the final deliverable.
51
+
52
+ ---
53
+
54
+ ## 3. Step-by-Step Workflow
55
+
56
+ ### Step 1 — Load Findings from Tracker
57
+
58
+ Export current findings in JSON format for processing:
59
+
60
+ ```bash
61
+ python3 {project-root}/_rtexit/scripts/finding_tracker.py export --format json > /tmp/findings_export.json
62
+ ```
63
+
64
+ Verify export contains expected findings:
65
+
66
+ ```bash
67
+ python3 {project-root}/_rtexit/scripts/finding_tracker.py stats
68
+ ```
69
+
70
+ Expected output example:
71
+ ```
72
+ === Finding Statistics ===
73
+ 🔴 CRITICAL : 2 ██
74
+ 🟠 HIGH : 5 █████
75
+ 🟡 MEDIUM : 4 ████
76
+ 🔵 LOW : 3 ███
77
+ ⚪ INFO : 1 █
78
+
79
+ TOTAL : 15
80
+ ```
81
+
82
+ Log the compliance mapping activity to the engagement timeline:
83
+
84
+ ```bash
85
+ python3 {project-root}/_rtexit/scripts/autodoc_engine.py log \
86
+ --skill rt-compliance-mapper \
87
+ --phase reporting \
88
+ --note "Compliance mapping initiated — 15 findings queued" \
89
+ --operator "analyst-01"
90
+ ```
91
+
92
+ ### Step 2 — Identify Applicable Frameworks
93
+
94
+ Before mapping, confirm with the client brief which frameworks apply. Ask:
95
+
96
+ 1. Does the client process payment cards? → PCI-DSS v4.0
97
+ 2. Does the client process EU personal data? → GDPR
98
+ 3. Is the client ISO 27001 certified or pursuing certification? → ISO 27001:2022
99
+ 4. Does the client handle US healthcare data (PHI/ePHI)? → HIPAA
100
+ 5. Is the client a SaaS/cloud provider with enterprise customers? → SOC 2
101
+ 6. Does the client follow NIST CSF as a baseline? → NIST CSF 2.0
102
+ 7. Has the client adopted CIS Controls as their security baseline? → CIS Controls v8
103
+
104
+ For a typical fintech client: PCI-DSS, GDPR, ISO 27001, SOC 2, NIST CSF, CIS Controls.
105
+ For a healthcare SaaS: HIPAA, GDPR (if EU patients), SOC 2, NIST CSF, ISO 27001.
106
+
107
+ ### Step 3 — Map Each Finding to Control Violations
108
+
109
+ For each finding in the tracker, produce a compliance impact table using the mapping reference in Section 4. The table format is:
110
+
111
+ ```
112
+ | Framework | Control ID | Control Name | Violation Type | Severity Impact |
113
+ |---------------|---------------------|---------------------------------------|----------------|-----------------|
114
+ | PCI-DSS v4.0 | Req 6.3.3 | All software is protected from known | Direct | Critical |
115
+ | | | vulnerabilities | | |
116
+ | GDPR | Art. 32(1)(b) | Appropriate technical security | Direct | High |
117
+ | | | measures for processing | | |
118
+ | ISO 27001 | A.8.8 | Management of technical | Direct | High |
119
+ | | | vulnerabilities | | |
120
+ ```
121
+
122
+ Violation types:
123
+ - **Direct** — The finding is itself the violation (e.g., unencrypted card data = PCI Req 3.5 violation).
124
+ - **Indicative** — The finding indicates a process failure that implies a control violation (e.g., missing patching = failure of vulnerability management programme).
125
+ - **Potential** — The finding could lead to a control violation if exploited (e.g., SSRF that might reach internal data stores).
126
+
127
+ ### Step 4 — Estimate Financial Penalty Exposure
128
+
129
+ Only applicable for GDPR and PCI-DSS. Calculate both frameworks where relevant.
130
+
131
+ #### GDPR Penalty Estimation
132
+
133
+ GDPR Article 83 defines two penalty tiers:
134
+
135
+ - **Tier 1 (Art. 83(4)):** Up to EUR 10 million or 2% of global annual turnover (whichever is higher). Applies to: processor agreements, consent mechanisms, data breach notification (Art. 33/34), privacy by design (Art. 25), DPO obligations.
136
+ - **Tier 2 (Art. 83(5)):** Up to EUR 20 million or 4% of global annual turnover (whichever is higher). Applies to: lawful basis violations (Art. 6), data subject rights violations (Art. 17/18/20), international transfer violations (Art. 44).
137
+
138
+ Formula used:
139
+ ```
140
+ Max_Penalty = MAX(EUR_cap, annual_turnover × percentage)
141
+ Expected_Penalty = Max_Penalty × likelihood_factor × severity_factor
142
+
143
+ likelihood_factor: 0.1 (low) / 0.3 (medium) / 0.6 (high) / 0.9 (near-certain)
144
+ severity_factor: 0.1–1.0 based on number of data subjects affected and sensitivity
145
+ ```
146
+
147
+ #### PCI-DSS Penalty Estimation
148
+
149
+ Card network fines for QSA assessment failures:
150
+ - **Level 1 Merchant (>6M transactions/year):** USD 5,000–100,000/month during non-compliance period.
151
+ - **Level 2 Merchant (1M–6M transactions/year):** USD 5,000–25,000/month.
152
+ - **Service Provider Level 1:** USD 10,000–100,000/month.
153
+
154
+ Additionally: forensic investigation costs (USD 12,000–100,000), card replacement liability, and potential card scheme termination.
155
+
156
+ ### Step 5 — Write Output Documents
157
+
158
+ Create two files per engagement:
159
+
160
+ **File 1:** `{output-dir}/docs/reports/compliance-impact.md`
161
+ Per-finding compliance mapping tables (Section 6 shows full example).
162
+
163
+ **File 2:** `{output-dir}/docs/reports/penalty-exposure.md`
164
+ Consolidated financial penalty estimate (Section 6 shows full example).
165
+
166
+ Log evidence of both documents:
167
+
168
+ ```bash
169
+ python3 {project-root}/_rtexit/scripts/autodoc_engine.py custody \
170
+ --finding "COMPLIANCE-SUMMARY" \
171
+ --evidence "{output-dir}/docs/reports/compliance-impact.md" \
172
+ --operator "analyst-01"
173
+
174
+ python3 {project-root}/_rtexit/scripts/autodoc_engine.py custody \
175
+ --finding "COMPLIANCE-SUMMARY" \
176
+ --evidence "{output-dir}/docs/reports/penalty-exposure.md" \
177
+ --operator "analyst-01"
178
+ ```
179
+
180
+ Log completion:
181
+
182
+ ```bash
183
+ python3 {project-root}/_rtexit/scripts/autodoc_engine.py log \
184
+ --skill rt-compliance-mapper \
185
+ --phase reporting \
186
+ --note "Compliance mapping complete — compliance-impact.md and penalty-exposure.md written" \
187
+ --operator "analyst-01"
188
+ ```
189
+
190
+ ---
191
+
192
+ ## 4. Framework Control Mapping Reference
193
+
194
+ ### 4.1 Finding Type → Control Violation Cross-Reference
195
+
196
+ Use this table to rapidly map a finding to the correct controls. Find the finding category in the left column, then read across for each framework.
197
+
198
+ #### SQL Injection / Command Injection
199
+
200
+ | Framework | Control(s) Violated |
201
+ |---|---|
202
+ | PCI-DSS v4.0 | Req 6.2.4 (secure development), Req 6.3.3 (protect against known vulnerabilities), Req 11.3.1 (internal vulnerability scans) |
203
+ | GDPR | Art. 25 (data protection by design), Art. 32(1)(b) (appropriate technical measures) |
204
+ | ISO 27001:2022 | A.8.25 (secure development life cycle), A.8.28 (secure coding), A.8.8 (technical vulnerability management) |
205
+ | HIPAA | 164.312(a)(2)(iv) (encryption/decryption), 164.312(e)(2)(ii) (encryption in transit), 164.306(a)(1) (confidentiality safeguards) |
206
+ | SOC 2 | CC7.1 (system components protected from vulnerabilities), CC8.1 (change management controls) |
207
+ | NIST CSF 2.0 | PR.DS-2 (data-in-transit protected), DE.CM-8 (vulnerability scans), ID.RA-1 (asset vulnerabilities identified) |
208
+ | CIS Controls v8 | CIS 16 (application software security), CIS 7.5 (perform automated vulnerability scans) |
209
+
210
+ #### Broken Authentication / Weak Credentials
211
+
212
+ | Framework | Control(s) Violated |
213
+ |---|---|
214
+ | PCI-DSS v4.0 | Req 8.2.1 (unique IDs), Req 8.3.6 (password complexity), Req 8.4.2 (MFA for non-console admin), Req 8.6.1 (system/application accounts) |
215
+ | GDPR | Art. 32(1)(b) (appropriate technical measures — authentication) |
216
+ | ISO 27001:2022 | A.5.17 (authentication information), A.8.5 (secure authentication) |
217
+ | HIPAA | 164.312(d) (person/entity authentication), 164.312(a)(2)(i) (unique user identification) |
218
+ | SOC 2 | CC6.1 (logical access security), CC6.2 (prior to access being granted, register and authorise users) |
219
+ | NIST CSF 2.0 | PR.AA-1 (identities and credentials managed), PR.AA-3 (users authenticated) |
220
+ | CIS Controls v8 | CIS 5 (account management), CIS 6 (access control management) |
221
+
222
+ #### Sensitive Data Exposure / Unencrypted Data
223
+
224
+ | Framework | Control(s) Violated |
225
+ |---|---|
226
+ | PCI-DSS v4.0 | Req 3.4.1 (PAN rendered unreadable), Req 3.5.1 (encryption keys protected), Req 4.2.1 (strong cryptography in transit) |
227
+ | GDPR | Art. 5(1)(f) (integrity and confidentiality), Art. 32(1)(a) (pseudonymisation and encryption) |
228
+ | ISO 27001:2022 | A.8.24 (use of cryptography), A.8.20 (networks security) |
229
+ | HIPAA | 164.312(a)(2)(iv) (encryption/decryption — addressable), 164.312(e)(2)(ii) (encryption in transit — addressable) |
230
+ | SOC 2 | CC6.7 (data transmission restrictions), CC6.8 (physical media protected) |
231
+ | NIST CSF 2.0 | PR.DS-1 (data at rest protected), PR.DS-2 (data in transit protected) |
232
+ | CIS Controls v8 | CIS 3.10 (encrypt sensitive data in transit), CIS 3.11 (encrypt sensitive data at rest) |
233
+
234
+ #### IDOR / Broken Access Control
235
+
236
+ | Framework | Control(s) Violated |
237
+ |---|---|
238
+ | PCI-DSS v4.0 | Req 7.2.1 (access control system established), Req 7.3.1 (access granted on least privilege), Req 8.2.5 (inactive accounts removed) |
239
+ | GDPR | Art. 5(1)(f) (integrity and confidentiality), Art. 25 (data protection by design — access minimisation), Art. 32(1)(b) |
240
+ | ISO 27001:2022 | A.5.15 (access control), A.5.18 (access rights), A.8.3 (information access restriction) |
241
+ | HIPAA | 164.312(a)(1) (access control standard), 164.312(a)(2)(i) (unique user identification), 164.308(a)(4) (information access management) |
242
+ | SOC 2 | CC6.1 (logical access security software), CC6.3 (role-based access) |
243
+ | NIST CSF 2.0 | PR.AA-5 (access permissions managed), PR.AA-6 (physical access managed) |
244
+ | CIS Controls v8 | CIS 6.1 (establish an access granting process), CIS 6.3 (require MFA for externally-exposed applications) |
245
+
246
+ #### Missing Patches / Outdated Software
247
+
248
+ | Framework | Control(s) Violated |
249
+ |---|---|
250
+ | PCI-DSS v4.0 | Req 6.3.3 (all software protected from known vulnerabilities), Req 12.3.2 (targeted risk analysis for each requirement) |
251
+ | GDPR | Art. 32(1)(b) (appropriate technical measures), Art. 32(1)(d) (regular testing and evaluation) |
252
+ | ISO 27001:2022 | A.8.8 (management of technical vulnerabilities) |
253
+ | HIPAA | 164.308(a)(1)(ii)(B) (risk management — implement security measures) |
254
+ | SOC 2 | CC7.1 (monitor system components for vulnerabilities) |
255
+ | NIST CSF 2.0 | ID.RA-1 (asset vulnerabilities identified and documented), RS.MI-3 (newly identified vulnerabilities mitigated) |
256
+ | CIS Controls v8 | CIS 7 (continuous vulnerability management) |
257
+
258
+ #### Exposed Credentials / API Keys in Source Code
259
+
260
+ | Framework | Control(s) Violated |
261
+ |---|---|
262
+ | PCI-DSS v4.0 | Req 3.7.1 (key management procedures), Req 6.2.4 (prevent common vulnerabilities in bespoke software), Req 8.6.2 (passwords for application/system accounts not hard-coded) |
263
+ | GDPR | Art. 32(1)(b) (appropriate technical measures), Art. 25 (data protection by design) |
264
+ | ISO 27001:2022 | A.8.28 (secure coding — secrets management), A.5.17 (authentication information — no hard-coded credentials) |
265
+ | HIPAA | 164.312(a)(2)(i) (unique user identification), 164.308(a)(1)(ii)(D) (information system activity review) |
266
+ | SOC 2 | CC6.1 (access security software/infrastructure), CC6.6 (logical access from outside the system boundary) |
267
+ | NIST CSF 2.0 | PR.AA-1 (identities and credentials managed), PR.PS-1 (configuration management) |
268
+ | CIS Controls v8 | CIS 4.10 (use unique passwords), CIS 5.4 (restrict administrator privileges to dedicated accounts) |
269
+
270
+ #### Missing Security Headers / TLS Misconfiguration
271
+
272
+ | Framework | Control(s) Violated |
273
+ |---|---|
274
+ | PCI-DSS v4.0 | Req 4.2.1 (strong cryptography in transit), Req 6.3.3 (protect against known vulnerabilities) |
275
+ | GDPR | Art. 32(1)(a) (pseudonymisation and encryption), Art. 32(1)(b) (appropriate technical measures) |
276
+ | ISO 27001:2022 | A.8.20 (networks security), A.8.24 (use of cryptography) |
277
+ | HIPAA | 164.312(e)(1) (transmission security standard), 164.312(e)(2)(ii) (encryption in transit) |
278
+ | SOC 2 | CC6.7 (data transmitted using encryption or other controls) |
279
+ | NIST CSF 2.0 | PR.DS-2 (data in transit protected) |
280
+ | CIS Controls v8 | CIS 3.10 (encrypt sensitive data in transit) |
281
+
282
+ ---
283
+
284
+ ## 5. Templates
285
+
286
+ ### Template A — Per-Finding Compliance Impact Table
287
+
288
+ Copy this template for each finding in the tracker. Replace values accordingly.
289
+
290
+ ```markdown
291
+ ### Compliance Impact: F-003 — SQL Injection in /api/v1/login
292
+
293
+ **Finding Summary:** Unauthenticated SQL injection vulnerability in the login endpoint
294
+ allows an attacker to bypass authentication, extract the full user database, and
295
+ potentially execute operating system commands via xp_cmdshell (MSSQL).
296
+
297
+ **CVSS Score:** 9.8 (Critical) | **CWE:** CWE-89 | **Asset:** api.acmepay.com/api/v1/login
298
+
299
+ #### Compliance Impact Table
300
+
301
+ | Framework | Control ID | Control Name | Violation Type | Regulatory Severity |
302
+ |---|---|---|---|---|
303
+ | PCI-DSS v4.0 | Req 6.2.4 | Prevent common vulnerabilities in bespoke software | Direct | Critical |
304
+ | PCI-DSS v4.0 | Req 6.3.3 | All software protected from known vulnerabilities | Direct | Critical |
305
+ | PCI-DSS v4.0 | Req 3.4.1 | PAN rendered unreadable anywhere it is stored | Direct | Critical |
306
+ | PCI-DSS v4.0 | Req 11.3.1 | Internal vulnerability scans performed periodically | Indicative | High |
307
+ | GDPR | Art. 25 | Data protection by design and by default | Direct | High |
308
+ | GDPR | Art. 32(1)(b) | Appropriate technical measures for processing security | Direct | High |
309
+ | GDPR | Art. 33 | Notification of personal data breach to supervisory authority | Potential | Critical |
310
+ | ISO 27001:2022 | A.8.25 | Secure development life cycle | Direct | High |
311
+ | ISO 27001:2022 | A.8.28 | Secure coding | Direct | High |
312
+ | ISO 27001:2022 | A.8.8 | Management of technical vulnerabilities | Indicative | High |
313
+ | SOC 2 | CC7.1 | System components protected from vulnerabilities | Direct | High |
314
+ | SOC 2 | CC8.1 | Change management controls to prevent unauthorised changes | Indicative | Medium |
315
+ | NIST CSF 2.0 | PR.DS-2 | Data in transit protected | Potential | High |
316
+ | NIST CSF 2.0 | DE.CM-8 | Vulnerability scans performed | Indicative | Medium |
317
+ | CIS Controls v8 | CIS 16 | Application software security | Direct | High |
318
+ | CIS Controls v8 | CIS 7.5 | Perform automated vulnerability scans | Indicative | Medium |
319
+
320
+ #### Regulatory Implications
321
+
322
+ **PCI-DSS:** This finding alone is sufficient to fail a PCI DSS assessment. Requirement 6.2.4
323
+ mandates that all bespoke software be protected against injection attacks. A QSA discovering
324
+ this vulnerability during an assessment would classify the environment as non-compliant,
325
+ triggering card network fines until remediation is validated.
326
+
327
+ **GDPR:** SQL injection affecting a user database containing EU personal data constitutes a
328
+ likely personal data breach under Article 4(12) GDPR. If exploited, the controller must notify
329
+ the supervisory authority within 72 hours (Art. 33) and, if high risk to individuals, notify
330
+ affected data subjects (Art. 34). Failure to implement input validation violates Art. 32 and
331
+ Art. 25.
332
+
333
+ **ISO 27001:2022:** Annex A.8.25 and A.8.28 require that secure development practices include
334
+ input validation and protection against injection vulnerabilities. This finding indicates the
335
+ control is not implemented or not effective.
336
+
337
+ #### Remediation Priority for Compliance
338
+
339
+ - **PCI-DSS remediation deadline:** Immediate — 24–72 hours (card network SLA for Critical findings)
340
+ - **GDPR breach assessment deadline:** Immediate — determine if exploitation has occurred; if yes, 72-hour notification clock starts
341
+ - **ISO 27001 corrective action:** 30 days (documented in ISMS corrective action register)
342
+ ```
343
+
344
+ ### Template B — Consolidated Penalty Exposure Report
345
+
346
+ ```markdown
347
+ # Regulatory Penalty Exposure Summary
348
+ **Engagement:** RT-2026-031 | **Client:** AcmePay Ltd | **Date:** 2026-05-31
349
+ **Analyst:** analyst-01 | **Frameworks:** PCI-DSS v4.0, GDPR, ISO 27001:2022, SOC 2
350
+
351
+ ## Executive Summary
352
+
353
+ Based on 15 confirmed findings across the engagement, the organisation faces material
354
+ regulatory exposure under PCI-DSS v4.0 and GDPR. The total maximum estimated financial
355
+ exposure is **EUR 24.3 million** in regulatory fines plus **USD 1.2–3.6 million** in
356
+ PCI-DSS non-compliance penalties. This does not include litigation, breach notification
357
+ costs, or reputational damage.
358
+
359
+ ## GDPR Penalty Exposure
360
+
361
+ **Applicable Tier:** Article 83(5) — Tier 2 (4% of global annual turnover)
362
+ **Client Annual Turnover (est.):** EUR 85 million
363
+ **4% of Turnover:** EUR 3.4 million
364
+ **Statutory Maximum (higher of turnover % or EUR cap):** EUR 20 million
365
+
366
+ | Finding | GDPR Articles Violated | Tier | Max Exposure |
367
+ |---|---|---|---|
368
+ | F-003: SQL Injection in Login API | Art. 25, 32(1)(b), 33 | Tier 2 | EUR 20M |
369
+ | F-007: Unencrypted PII in S3 Buckets | Art. 5(1)(f), 32(1)(a) | Tier 2 | EUR 20M |
370
+ | F-011: IDOR Exposing 43,000 User Records | Art. 25, 32(1)(b), 5(1)(f) | Tier 2 | EUR 20M |
371
+ | F-012: Missing Breach Detection Logging | Art. 32(1)(d) | Tier 1 | EUR 10M |
372
+ | F-015: Third-Party API Key Exposed in Git | Art. 32(1)(b), 28 | Tier 1 | EUR 10M |
373
+
374
+ **Realistic Penalty Estimate (GDPR):**
375
+
376
+ ICO and CNIL historical penalty data shows actual fines at 10–40% of maximum for
377
+ first-time violations with good remediation cooperation. Estimated realistic penalty:
378
+
379
+ ```
380
+ Base: EUR 20M (Tier 2 maximum, highest applicable)
381
+ × Likelihood factor: 0.35 (prior good standing, cooperative remediation)
382
+ × Severity factor: 0.55 (43,000 data subjects affected, sensitive financial data)
383
+ = EUR 3.85 million estimated realistic GDPR fine
384
+ ```
385
+
386
+ ## PCI-DSS Penalty Exposure
387
+
388
+ **Merchant Level:** Level 1 (>6M card transactions/year)
389
+ **Issuing Card Scheme:** Visa / Mastercard
390
+
391
+ | Period | Monthly Fine Range | Source |
392
+ |---|---|---|
393
+ | Month 1 (non-compliance confirmed) | USD 5,000–10,000 | Card scheme non-compliance tier 1 |
394
+ | Month 2–3 (unresolved) | USD 25,000–50,000/month | Escalated tier |
395
+ | Month 4+ (persistent) | USD 50,000–100,000/month | Maximum tier |
396
+
397
+ **Findings triggering PCI non-compliance:**
398
+
399
+ | Finding | PCI-DSS Requirement Violated | Non-Compliance Category |
400
+ |---|---|---|
401
+ | F-003: SQL Injection | Req 6.2.4, 6.3.3 | Bespoke software security |
402
+ | F-005: Stored Card Numbers Unencrypted | Req 3.4.1 | Protect stored account data |
403
+ | F-008: Weak TLS 1.0 on Payment API | Req 4.2.1 | Strong cryptography in transit |
404
+ | F-009: Shared Admin Credentials | Req 8.2.1, 8.3.6 | Unique user IDs, password policy |
405
+ | F-013: No Quarterly ASV Scans | Req 11.3.2 | External vulnerability scans |
406
+
407
+ **Estimated PCI Penalties (12-month non-compliance scenario):**
408
+ - Month 1–3: USD 5,000 + 50,000 + 50,000 = USD 105,000
409
+ - Month 4–12: USD 100,000 × 9 = USD 900,000
410
+ - Forensic investigation (if breach confirmed): USD 80,000–150,000
411
+ - Card replacement liability (estimated): USD 200,000–1,500,000
412
+
413
+ **Total PCI Exposure (12-month): USD 1.28–2.66 million**
414
+
415
+ ## Remediation Investment Justification
416
+
417
+ | Remediation Investment | vs GDPR Exposure | vs PCI Exposure | ROI |
418
+ |---|---|---|---|
419
+ | USD 80,000 (immediate critical fixes) | Reduces EUR 3.85M risk by ~60% | Stops monthly fines immediately | 2,700% |
420
+ | USD 200,000 (full remediation programme) | Eliminates GDPR exposure | Full PCI compliance restored | 950% |
421
+
422
+ ## ISO 27001:2022 / SOC 2 Implications
423
+
424
+ ISO 27001 and SOC 2 do not carry direct financial penalties but have material commercial impact:
425
+
426
+ - **ISO 27001:** 8 control violations found across A.8.x domain. Continued certification
427
+ requires a corrective action plan submitted to certifying body within 30 days of
428
+ internal audit findings. Certification suspension risk if findings remain unresolved at
429
+ next surveillance audit.
430
+ - **SOC 2 Type II:** 5 Trust Services Criteria gaps identified (CC6.1, CC6.3, CC7.1, CC7.2, CC8.1).
431
+ Current SOC 2 report would likely receive a qualified opinion or adverse opinion if these
432
+ findings were in scope during the reporting period. Enterprise customers may invoke
433
+ vendor risk review clauses.
434
+ ```
435
+
436
+ ---
437
+
438
+ ## 6. Integration with finding_tracker.py and autodoc_engine.py
439
+
440
+ ### Reading Findings from the Tracker
441
+
442
+ The compliance mapper reads the `findings-master.csv` directly. Each row contains:
443
+
444
+ ```
445
+ id, title, severity, cvss, status, asset, cwe, cve, mitre, phase, date, operator, notes
446
+ ```
447
+
448
+ Example row (as it appears in the CSV):
449
+ ```
450
+ F-003,SQL Injection in Login API,CRITICAL,9.8,CONFIRMED,api.acmepay.com/api/v1/login,CWE-89,,T1190,exploitation,2026-05-28,analyst-01,unauthenticated; full db dump confirmed
451
+ ```
452
+
453
+ To process all Critical and High findings for compliance mapping:
454
+
455
+ ```bash
456
+ # Export filtered findings for mapping
457
+ python3 {project-root}/_rtexit/scripts/finding_tracker.py export --format json \
458
+ | python3 -c "
459
+ import json, sys
460
+ findings = json.load(sys.stdin)
461
+ priority = [f for f in findings if f['severity'] in ('CRITICAL','HIGH')]
462
+ print(json.dumps(priority, indent=2))
463
+ " > /tmp/priority_findings.json
464
+
465
+ echo "Priority findings for compliance mapping:"
466
+ cat /tmp/priority_findings.json | python3 -c "
467
+ import json, sys
468
+ findings = json.load(sys.stdin)
469
+ for f in findings:
470
+ print(f\" {f['id']} [{f['severity']}] CVSS {f['cvss']}: {f['title']}\")
471
+ "
472
+ ```
473
+
474
+ ### Writing the Compliance Output to the autodoc Directory
475
+
476
+ The compliance output documents live in the standard autodoc output structure:
477
+
478
+ ```
479
+ {RTEXIT_OUTPUT}/
480
+ └── docs/
481
+ └── reports/
482
+ ├── compliance-impact.md ← per-finding compliance tables
483
+ └── penalty-exposure.md ← financial penalty summary
484
+ ```
485
+
486
+ Reference these paths in the autodoc log so Layla can locate them:
487
+
488
+ ```bash
489
+ # After writing compliance-impact.md, register it
490
+ python3 {project-root}/_rtexit/scripts/autodoc_engine.py log \
491
+ --skill rt-compliance-mapper \
492
+ --phase reporting \
493
+ --cmd "write compliance-impact.md" \
494
+ --output "compliance-impact.md written — 15 findings mapped across 7 frameworks" \
495
+ --finding "COMPLIANCE-SUMMARY" \
496
+ --operator "analyst-01"
497
+
498
+ # Log penalty exposure document
499
+ python3 {project-root}/_rtexit/scripts/autodoc_engine.py log \
500
+ --skill rt-compliance-mapper \
501
+ --phase reporting \
502
+ --cmd "write penalty-exposure.md" \
503
+ --output "GDPR exposure: EUR 3.85M estimated. PCI exposure: USD 1.28-2.66M over 12 months." \
504
+ --finding "COMPLIANCE-SUMMARY" \
505
+ --operator "analyst-01"
506
+
507
+ # Register both as evidence with hash
508
+ python3 {project-root}/_rtexit/scripts/autodoc_engine.py custody \
509
+ --finding "COMPLIANCE-SUMMARY" \
510
+ --evidence "_rtexit-output/docs/reports/compliance-impact.md" \
511
+ --operator "analyst-01"
512
+
513
+ python3 {project-root}/_rtexit/scripts/autodoc_engine.py custody \
514
+ --finding "COMPLIANCE-SUMMARY" \
515
+ --evidence "_rtexit-output/docs/reports/penalty-exposure.md" \
516
+ --operator "analyst-01"
517
+ ```
518
+
519
+ ### Annotating Individual Findings with Compliance Data
520
+
521
+ After mapping, add compliance notes back to individual finding tracker entries. The tracker does not have a dedicated compliance field, but the `notes` field can carry a compliance reference tag:
522
+
523
+ ```bash
524
+ # The finding_tracker.py 'add' command creates the finding; notes can be updated
525
+ # by editing the finding MD file directly:
526
+
527
+ FINDING_MD="_rtexit-output/docs/findings/F-003.md"
528
+
529
+ # Append compliance mapping reference to the finding file
530
+ cat >> "$FINDING_MD" << 'EOF'
531
+
532
+ ## Compliance Impact
533
+
534
+ **Frameworks Affected:** PCI-DSS v4.0, GDPR, ISO 27001:2022, SOC 2, NIST CSF 2.0, CIS Controls v8
535
+
536
+ **Key Violations:**
537
+ - PCI-DSS Req 6.2.4, 6.3.3 — Direct violation, triggers non-compliance
538
+ - GDPR Art. 32(1)(b), Art. 25 — Direct violation, potential Art. 33 breach notification
539
+ - ISO 27001:2022 A.8.28 — Direct violation
540
+
541
+ **Penalty Exposure:** EUR 20M max GDPR (Tier 2); USD 100K/month PCI non-compliance
542
+
543
+ See: `_rtexit-output/docs/reports/compliance-impact.md#F-003`
544
+ See: `_rtexit-output/docs/reports/penalty-exposure.md`
545
+ EOF
546
+ ```
547
+
548
+ ---
549
+
550
+ ## 7. Example Output — Finished Compliance Impact Report
551
+
552
+ This is what `compliance-impact.md` looks like when complete for a real engagement.
553
+
554
+ ```markdown
555
+ # Compliance Impact Report
556
+ **Engagement:** RT-2026-031 — AcmePay Ltd External Penetration Test
557
+ **Date:** 2026-05-31 | **Classification:** CONFIDENTIAL — CLIENT EYES ONLY
558
+ **Prepared by:** RTExit Red Team Operations
559
+
560
+ ---
561
+
562
+ ## Applicable Frameworks
563
+
564
+ | Framework | Version | Applicable | Rationale |
565
+ |---|---|---|---|
566
+ | PCI-DSS | v4.0 | YES | Client processes Visa/MC card payments (>6M tx/year) |
567
+ | GDPR | 2016/679 | YES | Client processes EU resident personal data |
568
+ | ISO 27001 | 2022 | YES | Client holds ISO 27001:2022 certification (cert. expires 2027-03) |
569
+ | HIPAA | Omnibus 2013 | NO | Client does not process US healthcare data |
570
+ | SOC 2 | Type II | YES | Client is SaaS provider; enterprise customers require SOC 2 report |
571
+ | NIST CSF | 2.0 | YES | Client stated NIST CSF as security baseline in engagement briefing |
572
+ | CIS Controls | v8 | YES | Client uses CIS Controls v8 as implementation roadmap |
573
+
574
+ ---
575
+
576
+ ## F-001 — Unauthenticated Remote Code Execution via File Upload
577
+
578
+ **Severity:** CRITICAL | **CVSS:** 10.0 | **Asset:** portal.acmepay.com/upload
579
+
580
+ | Framework | Control ID | Control Name | Violation Type | Regulatory Severity |
581
+ |---|---|---|---|---|
582
+ | PCI-DSS v4.0 | Req 6.2.4 | Prevent common vulnerabilities in bespoke software | Direct | Critical |
583
+ | PCI-DSS v4.0 | Req 6.3.3 | All software protected from known vulnerabilities | Direct | Critical |
584
+ | PCI-DSS v4.0 | Req 11.4.1 | Penetration testing performed at least once every 12 months | Indicative | High |
585
+ | GDPR | Art. 25 | Data protection by design and by default | Direct | Critical |
586
+ | GDPR | Art. 32(1)(b) | Appropriate technical measures | Direct | Critical |
587
+ | GDPR | Art. 33 | Breach notification within 72 hours | Potential | Critical |
588
+ | ISO 27001:2022 | A.8.25 | Secure development life cycle | Direct | Critical |
589
+ | ISO 27001:2022 | A.8.28 | Secure coding | Direct | Critical |
590
+ | ISO 27001:2022 | A.8.8 | Management of technical vulnerabilities | Direct | Critical |
591
+ | SOC 2 | CC7.1 | System components protected from vulnerabilities | Direct | Critical |
592
+ | SOC 2 | CC9.2 | Business disruption and use of recovery | Potential | High |
593
+ | NIST CSF 2.0 | PR.DS-2 | Data in transit protected | Potential | High |
594
+ | NIST CSF 2.0 | RS.MI-2 | Incidents mitigated | Potential | High |
595
+ | CIS Controls v8 | CIS 16.11 | Use vetted libraries and frameworks | Direct | Critical |
596
+ | CIS Controls v8 | CIS 7.6 | Remediate detected vulnerabilities | Indicative | High |
597
+
598
+ **Regulatory Implications:** Full system compromise via unauthenticated RCE is a worst-case
599
+ scenario for every applicable framework. PCI DSS would classify the CDE as fully compromised,
600
+ requiring an emergency forensic investigation. GDPR breach notification obligations are
601
+ triggered if any personal data was accessed. ISO 27001 certification may be suspended pending
602
+ corrective action. SOC 2 report integrity is undermined.
603
+
604
+ ---
605
+
606
+ ## F-003 — SQL Injection in Authentication Endpoint
607
+
608
+ **Severity:** CRITICAL | **CVSS:** 9.8 | **Asset:** api.acmepay.com/api/v1/login
609
+
610
+ | Framework | Control ID | Control Name | Violation Type | Regulatory Severity |
611
+ |---|---|---|---|---|
612
+ | PCI-DSS v4.0 | Req 6.2.4 | Prevent common vulnerabilities in bespoke software | Direct | Critical |
613
+ | PCI-DSS v4.0 | Req 6.3.3 | All software protected from known vulnerabilities | Direct | Critical |
614
+ | PCI-DSS v4.0 | Req 3.4.1 | PAN rendered unreadable anywhere it is stored | Potential | Critical |
615
+ | GDPR | Art. 25 | Data protection by design | Direct | High |
616
+ | GDPR | Art. 32(1)(b) | Appropriate technical measures | Direct | High |
617
+ | ISO 27001:2022 | A.8.28 | Secure coding | Direct | High |
618
+ | ISO 27001:2022 | A.8.8 | Technical vulnerability management | Indicative | High |
619
+ | SOC 2 | CC7.1 | System components protected from vulnerabilities | Direct | High |
620
+ | NIST CSF 2.0 | ID.RA-1 | Asset vulnerabilities identified | Indicative | High |
621
+ | CIS Controls v8 | CIS 16 | Application software security | Direct | High |
622
+
623
+ **Regulatory Implications:** Authentication bypass via SQL injection exposes PAN data stored
624
+ in the same database, triggering PCI DSS non-compliance across Requirements 3, 6, and 11.
625
+ GDPR Art. 32 requires appropriate measures which must include input validation. Given the
626
+ authentication context, any exploitation would constitute a notifiable breach.
627
+
628
+ ---
629
+
630
+ ## F-007 — AWS S3 Bucket Containing PII Publicly Accessible
631
+
632
+ **Severity:** HIGH | **CVSS:** 8.2 | **Asset:** s3://acmepay-user-exports (eu-west-1)
633
+
634
+ | Framework | Control ID | Control Name | Violation Type | Regulatory Severity |
635
+ |---|---|---|---|---|
636
+ | PCI-DSS v4.0 | Req 3.5.1 | Primary account numbers protected with strong cryptography | Direct | High |
637
+ | PCI-DSS v4.0 | Req 12.3.4 | Hardware and software reviewed for security vulnerabilities | Indicative | Medium |
638
+ | GDPR | Art. 5(1)(f) | Integrity and confidentiality principle | Direct | Critical |
639
+ | GDPR | Art. 32(1)(a) | Pseudonymisation and encryption | Direct | Critical |
640
+ | GDPR | Art. 33 | Breach notification to supervisory authority | Potential | Critical |
641
+ | GDPR | Art. 34 | Communication to affected data subjects | Potential | High |
642
+ | ISO 27001:2022 | A.5.10 | Acceptable use of information and other assets | Direct | High |
643
+ | ISO 27001:2022 | A.8.20 | Networks security | Indicative | High |
644
+ | SOC 2 | CC6.7 | Data transmitted using encryption or other controls | Direct | High |
645
+ | NIST CSF 2.0 | PR.DS-1 | Data at rest protected | Direct | Critical |
646
+ | CIS Controls v8 | CIS 3.3 | Configure data access control lists | Direct | High |
647
+ | CIS Controls v8 | CIS 3.11 | Encrypt sensitive data at rest | Direct | High |
648
+
649
+ **Regulatory Implications:** An S3 bucket containing first name, last name, email address,
650
+ and partial card numbers of 43,000 users being publicly accessible is a confirmed personal
651
+ data breach under GDPR Article 4(12). The 72-hour supervisory authority notification clock
652
+ under Article 33 starts from when the controller becomes aware — which is the date of this
653
+ report. Individuals whose data was exposed must be notified under Article 34 if the breach
654
+ is likely to result in high risk to their rights and freedoms. The ICO will consider the
655
+ duration of exposure, volume of data subjects, and sensitivity of data categories when
656
+ determining any fine.
657
+
658
+ ---
659
+
660
+ ## Summary Table — All Findings
661
+
662
+ | Finding | Severity | CVSS | PCI-DSS | GDPR | ISO 27001 | SOC 2 | NIST CSF | CIS |
663
+ |---|---|---|---|---|---|---|---|---|
664
+ | F-001 RCE via File Upload | CRITICAL | 10.0 | Req 6.2.4, 6.3.3 | Art. 25, 32, 33 | A.8.25, A.8.28 | CC7.1 | PR.DS-2 | CIS 16 |
665
+ | F-002 SSRF Internal Access | CRITICAL | 9.6 | Req 6.2.4 | Art. 32 | A.8.28 | CC7.1 | PR.DS-5 | CIS 16 |
666
+ | F-003 SQL Injection Login | CRITICAL | 9.8 | Req 6.2.4, 3.4.1 | Art. 25, 32, 33 | A.8.28, A.8.8 | CC7.1 | ID.RA-1 | CIS 16 |
667
+ | F-004 JWT None Algorithm | HIGH | 8.8 | Req 8.2.1 | Art. 32 | A.5.17, A.8.5 | CC6.1 | PR.AA-3 | CIS 5 |
668
+ | F-005 Stored Cards Plaintext | HIGH | 8.5 | Req 3.4.1, 3.5.1 | Art. 5(f), 32(a) | A.8.24 | CC6.7 | PR.DS-1 | CIS 3.11 |
669
+ | F-006 Admin Default Password | HIGH | 8.8 | Req 8.3.6 | Art. 32 | A.5.17 | CC6.1 | PR.AA-1 | CIS 5 |
670
+ | F-007 Public S3 PII Bucket | HIGH | 8.2 | Req 3.5.1 | Art. 5(f), 32(a), 33 | A.5.10, A.8.20 | CC6.7 | PR.DS-1 | CIS 3.3 |
671
+ | F-008 TLS 1.0 Payment API | HIGH | 7.4 | Req 4.2.1 | Art. 32(a) | A.8.24 | CC6.7 | PR.DS-2 | CIS 3.10 |
672
+ | F-009 Shared Admin Account | HIGH | 7.8 | Req 8.2.1 | Art. 32 | A.5.17 | CC6.2 | PR.AA-1 | CIS 5.4 |
673
+ | F-010 IDOR User Profiles | MEDIUM | 6.5 | Req 7.2.1 | Art. 25, 32 | A.5.15, A.8.3 | CC6.1 | PR.AA-5 | CIS 6.1 |
674
+ | F-011 IDOR Invoice Data | MEDIUM | 7.1 | Req 7.2.1, 7.3.1 | Art. 25, 32 | A.5.15 | CC6.3 | PR.AA-5 | CIS 6 |
675
+ | F-012 No Audit Logging | MEDIUM | 5.3 | Req 10.2.1 | Art. 32(1)(d) | A.8.15 | CC7.2 | DE.CM-3 | CIS 8 |
676
+ | F-013 No Quarterly ASV Scans | MEDIUM | 5.5 | Req 11.3.2 | Art. 32(1)(d) | A.8.8 | CC7.1 | ID.RA-1 | CIS 7 |
677
+ | F-014 Weak Password Policy | LOW | 4.3 | Req 8.3.6 | Art. 32 | A.5.17 | CC6.1 | PR.AA-1 | CIS 5 |
678
+ | F-015 API Key in Git History | HIGH | 7.5 | Req 8.6.2 | Art. 32, 28 | A.8.28, A.5.17 | CC6.6 | PR.AA-1 | CIS 4.10 |
679
+ ```
680
+
681
+ ---
682
+
683
+ ## 8. Quality Checklist
684
+
685
+ Use this checklist before delivering the compliance mapping output. Every item must be checked.
686
+
687
+ ### Completeness
688
+
689
+ - [ ] Every finding in `findings-master.csv` with status CONFIRMED or EXPLOITED has been mapped
690
+ - [ ] Every applicable framework has been assessed for each finding (not just the obvious ones)
691
+ - [ ] Violation type (Direct / Indicative / Potential) is assigned for every row in every table
692
+ - [ ] Regulatory severity column is filled (Critical / High / Medium) for every row
693
+ - [ ] The "Regulatory Implications" narrative paragraph is written for every Critical and High finding
694
+ - [ ] The consolidated summary table covers all findings
695
+
696
+ ### Accuracy
697
+
698
+ - [ ] PCI-DSS requirement numbers are from v4.0 (not v3.2.1 — note: v4.0 renumbered some requirements)
699
+ - [ ] GDPR article numbers are from the full Regulation 2016/679, not GDPR recitals
700
+ - [ ] ISO 27001:2022 control codes use the new A.5–A.8 numbering (not the old A.5–A.18 from 2013)
701
+ - [ ] HIPAA citations reference the Security Rule (164.3xx) not the Privacy Rule (164.5xx) for technical findings
702
+ - [ ] SOC 2 citations use Trust Services Criteria (CC prefixes), not old SAS 70 criteria
703
+ - [ ] NIST CSF 2.0 citations use the new six-function structure (Govern/Identify/Protect/Detect/Respond/Recover)
704
+ - [ ] CIS Controls citations reference v8 control numbers (CIS 1–18), not v7 (CIS 1–20)
705
+
706
+ ### Financial Calculations
707
+
708
+ - [ ] GDPR penalty tier (Tier 1 vs Tier 2) is correctly identified for each violating article
709
+ - [ ] Client annual turnover figure is sourced (from engagement brief, Companies House, or client-provided)
710
+ - [ ] Both EUR cap and turnover percentage are calculated; the higher value is used
711
+ - [ ] Likelihood factor is justified in a comment (not just stated as a number)
712
+ - [ ] Severity factor accounts for: number of data subjects, data sensitivity, duration of exposure
713
+ - [ ] PCI-DSS merchant level is confirmed (Level 1/2/3/4) — this affects fine amounts
714
+ - [ ] PCI forensic investigation cost range is included in total exposure
715
+
716
+ ### Format and Presentation
717
+
718
+ - [ ] Documents are saved to `{RTEXIT_OUTPUT}/docs/reports/compliance-impact.md` and `penalty-exposure.md`
719
+ - [ ] Both documents are registered in the autodoc engine via `custody` command with SHA-256 hash
720
+ - [ ] Timeline entry logged via `autodoc_engine.py log` for compliance mapping activity
721
+ - [ ] Classification header is present on all output documents (CONFIDENTIAL — CLIENT EYES ONLY)
722
+ - [ ] Engagement reference number appears on all output documents
723
+
724
+ ---
725
+
726
+ ## 9. Common Mistakes to Avoid
727
+
728
+ ### Using Outdated Control Numbers
729
+
730
+ **Wrong:** Citing ISO 27001:2013 Annex A controls (e.g., "A.12.6.1 — Management of technical vulnerabilities").
731
+ **Right:** ISO 27001:2022 renumbered controls significantly. Technical vulnerability management is now A.8.8. Always use 2022 revision control IDs.
732
+
733
+ **Wrong:** Citing NIST CSF 1.1 subcategory codes (e.g., "PR.IP-12 — Vulnerability management plan").
734
+ **Right:** NIST CSF 2.0 (February 2024) reorganised subcategories and added a new "Govern" function. Use 2.0 codes (e.g., ID.RA-1 for vulnerability identification).
735
+
736
+ ### Conflating Violation Types
737
+
738
+ **Wrong:** Marking a "Missing patch on internal server" finding as a Direct GDPR Art. 33 violation (breach notification).
739
+ **Right:** Art. 33 violation is Potential — it only becomes direct if the unpatched system was actually breached and personal data was accessed. Mark it as Potential until breach is confirmed.
740
+
741
+ ### Over-claiming GDPR Penalties
742
+
743
+ **Wrong:** Stating "This finding results in a EUR 20 million fine."
744
+ **Right:** EUR 20M is the statutory maximum. Realistic fines are calculated on a case-by-case basis by the supervisory authority. Always present the maximum alongside a calibrated realistic estimate and state clearly these are estimates.
745
+
746
+ ### Forgetting Framework Applicability
747
+
748
+ **Wrong:** Mapping every finding to HIPAA for a UK fintech client.
749
+ **Right:** Confirm applicability before mapping. HIPAA only applies to US-based covered entities and their business associates handling PHI. For a UK payments company with no US healthcare relationships, HIPAA is not applicable.
750
+
751
+ ### Missing the "Regulatory Implications" Narrative
752
+
753
+ **Wrong:** A table with control violation ticks but no explanation of what it means.
754
+ **Right:** Every Critical and High finding needs a prose paragraph explaining what the violation means in plain language — specifically: what the regulator would say, what notification obligations are triggered, and what the practical consequence is for the client's certification or compliance programme.
755
+
756
+ ### Ignoring the Timeline on Breach Notification
757
+
758
+ **Wrong:** Writing "GDPR breach notification may be required" with no timeframe.
759
+ **Right:** GDPR Art. 33 sets a hard 72-hour deadline from when the controller becomes "aware" of a breach. The date of the penetration test report delivery is the point at which the controller becomes aware. State this explicitly and name the specific date the 72-hour clock starts.
760
+
761
+ ### Calculating PCI Fines Without Merchant Level
762
+
763
+ **Wrong:** Stating "PCI fines apply" without specifying the amount range.
764
+ **Right:** PCI-DSS fine amounts differ by merchant level (Level 1 through 4) and service provider level. Confirm with the client their transaction volumes before quoting specific monthly fine ranges. A Level 1 merchant faces USD 50,000–100,000/month in the sustained non-compliance tier; a Level 3 merchant faces USD 5,000–10,000/month.
765
+
766
+ ### Mapping Only Critical/High Findings
767
+
768
+ **Wrong:** Only producing compliance tables for CRITICAL findings.
769
+ **Right:** Medium and Low findings often map to important indicative violations — particularly for process controls like vulnerability management (PCI Req 11.3.2, ISO 27001 A.8.8) and logging (PCI Req 10.2.1). A missing quarterly ASV scan is a Medium/Low technical finding but a direct PCI-DSS Requirement 11 violation. Missing audit logging is a Medium finding but violates GDPR Art. 32(1)(d) (regular testing and evaluation). Map all confirmed findings.
770
+
771
+ ---
772
+
773
+ *Skill maintained by RTExit Red Team Operations. Output documents feed into rt-agent-scribe for executive and technical report generation.*