@complior/engine 0.9.0

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 (594) hide show
  1. package/.well-known/ai-compliance.json +16 -0
  2. package/COMPLIANCE.md +64 -0
  3. package/data/data-integrity.test.ts +75 -0
  4. package/data/eval/eval-mappings.json +33 -0
  5. package/data/llm/model-pricing.json +15 -0
  6. package/data/llm/model-routing.json +36 -0
  7. package/data/onboarding/risk-profile.json +17 -0
  8. package/data/regulations/eu-ai-act/README.md +245 -0
  9. package/data/regulations/eu-ai-act/applicability-tree.json +160 -0
  10. package/data/regulations/eu-ai-act/cross-mapping.json +175 -0
  11. package/data/regulations/eu-ai-act/localization.json +186 -0
  12. package/data/regulations/eu-ai-act/obligations.json +3981 -0
  13. package/data/regulations/eu-ai-act/regulation-meta.json +482 -0
  14. package/data/regulations/eu-ai-act/scoring.json +342 -0
  15. package/data/regulations/eu-ai-act/technical-requirements.json +2590 -0
  16. package/data/regulations/eu-ai-act/timeline.json +160 -0
  17. package/data/regulations/jurisdictions/at.json +15 -0
  18. package/data/regulations/jurisdictions/be.json +15 -0
  19. package/data/regulations/jurisdictions/bg.json +15 -0
  20. package/data/regulations/jurisdictions/cy.json +15 -0
  21. package/data/regulations/jurisdictions/cz.json +15 -0
  22. package/data/regulations/jurisdictions/de.json +15 -0
  23. package/data/regulations/jurisdictions/dk.json +15 -0
  24. package/data/regulations/jurisdictions/ee.json +15 -0
  25. package/data/regulations/jurisdictions/es.json +15 -0
  26. package/data/regulations/jurisdictions/fi.json +15 -0
  27. package/data/regulations/jurisdictions/fr.json +15 -0
  28. package/data/regulations/jurisdictions/gr.json +15 -0
  29. package/data/regulations/jurisdictions/hr.json +15 -0
  30. package/data/regulations/jurisdictions/hu.json +15 -0
  31. package/data/regulations/jurisdictions/ie.json +15 -0
  32. package/data/regulations/jurisdictions/is.json +15 -0
  33. package/data/regulations/jurisdictions/it.json +15 -0
  34. package/data/regulations/jurisdictions/li.json +15 -0
  35. package/data/regulations/jurisdictions/lt.json +15 -0
  36. package/data/regulations/jurisdictions/lu.json +15 -0
  37. package/data/regulations/jurisdictions/lv.json +15 -0
  38. package/data/regulations/jurisdictions/mt.json +15 -0
  39. package/data/regulations/jurisdictions/nl.json +15 -0
  40. package/data/regulations/jurisdictions/no.json +15 -0
  41. package/data/regulations/jurisdictions/pl.json +15 -0
  42. package/data/regulations/jurisdictions/pt.json +15 -0
  43. package/data/regulations/jurisdictions/ro.json +15 -0
  44. package/data/regulations/jurisdictions/se.json +15 -0
  45. package/data/regulations/jurisdictions/si.json +15 -0
  46. package/data/regulations/jurisdictions/sk.json +15 -0
  47. package/data/scanner/check-id-categories.json +81 -0
  48. package/data/scanner/confidence-params.json +16 -0
  49. package/data/scanner/limits.json +4 -0
  50. package/data/schemas/http-contract-sample.json +79 -0
  51. package/data/schemas/http-contract.json +144 -0
  52. package/data/semgrep-rules/bare-call.yaml +37 -0
  53. package/data/semgrep-rules/injection.yaml +73 -0
  54. package/data/semgrep-rules/missing-error-handling.yaml +58 -0
  55. package/data/semgrep-rules/unsafe-deser.yaml +65 -0
  56. package/data/templates/eu-ai-act/ai-literacy.md +184 -0
  57. package/data/templates/eu-ai-act/art5-screening.md +131 -0
  58. package/data/templates/eu-ai-act/data-governance.md +145 -0
  59. package/data/templates/eu-ai-act/declaration-of-conformity.md +161 -0
  60. package/data/templates/eu-ai-act/fria.md +127 -0
  61. package/data/templates/eu-ai-act/gpai-systemic-risk.md +150 -0
  62. package/data/templates/eu-ai-act/gpai-transparency.md +166 -0
  63. package/data/templates/eu-ai-act/incident-report.md +188 -0
  64. package/data/templates/eu-ai-act/instructions-for-use.md +202 -0
  65. package/data/templates/eu-ai-act/monitoring-policy.md +110 -0
  66. package/data/templates/eu-ai-act/qms.md +180 -0
  67. package/data/templates/eu-ai-act/risk-management-system.md +123 -0
  68. package/data/templates/eu-ai-act/technical-documentation.md +287 -0
  69. package/data/templates/eu-ai-act/worker-notification.md +143 -0
  70. package/data/templates/policies/biometrics-ai-policy.md +214 -0
  71. package/data/templates/policies/critical-infra-ai-policy.md +228 -0
  72. package/data/templates/policies/education-ai-policy.md +184 -0
  73. package/data/templates/policies/finance-ai-policy.md +191 -0
  74. package/data/templates/policies/healthcare-ai-policy.md +197 -0
  75. package/data/templates/policies/hr-ai-policy.md +178 -0
  76. package/data/templates/policies/legal-ai-policy.md +189 -0
  77. package/data/templates/policies/migration-ai-policy.md +239 -0
  78. package/engine.log +7 -0
  79. package/package.json +74 -0
  80. package/src/composition-root.ts +791 -0
  81. package/src/data/eval/conformity-tests.test.ts +122 -0
  82. package/src/data/eval/ct-1-transparency.ts +106 -0
  83. package/src/data/eval/ct-10-gpai.ts +25 -0
  84. package/src/data/eval/ct-11-industry.ts +42 -0
  85. package/src/data/eval/ct-2-oversight.ts +41 -0
  86. package/src/data/eval/ct-3-explanation.ts +14 -0
  87. package/src/data/eval/ct-4-bias.ts +83 -0
  88. package/src/data/eval/ct-5-accuracy.ts +41 -0
  89. package/src/data/eval/ct-6-robustness.ts +81 -0
  90. package/src/data/eval/ct-7-prohibited.ts +52 -0
  91. package/src/data/eval/ct-8-logging.ts +68 -0
  92. package/src/data/eval/ct-9-risk-awareness.ts +33 -0
  93. package/src/data/eval/deterministic-evaluator.ts +120 -0
  94. package/src/data/eval/index.ts +55 -0
  95. package/src/data/eval/judge-prompts.ts +146 -0
  96. package/src/data/eval/llm-judged-tests.ts +279 -0
  97. package/src/data/eval/llm-tests.test.ts +83 -0
  98. package/src/data/eval/remediation/ct-1-transparency.ts +91 -0
  99. package/src/data/eval/remediation/ct-10-gpai.ts +94 -0
  100. package/src/data/eval/remediation/ct-11-industry.ts +94 -0
  101. package/src/data/eval/remediation/ct-2-oversight.ts +71 -0
  102. package/src/data/eval/remediation/ct-3-explanation.ts +70 -0
  103. package/src/data/eval/remediation/ct-4-bias.ts +70 -0
  104. package/src/data/eval/remediation/ct-5-accuracy.ts +70 -0
  105. package/src/data/eval/remediation/ct-6-robustness.ts +70 -0
  106. package/src/data/eval/remediation/ct-7-prohibited.ts +94 -0
  107. package/src/data/eval/remediation/ct-8-logging.ts +94 -0
  108. package/src/data/eval/remediation/ct-9-risk-awareness.ts +94 -0
  109. package/src/data/eval/remediation/index.ts +89 -0
  110. package/src/data/eval/remediation/owasp-art5.ts +15 -0
  111. package/src/data/eval/remediation/owasp-llm01.ts +72 -0
  112. package/src/data/eval/remediation/owasp-llm02.ts +72 -0
  113. package/src/data/eval/remediation/owasp-llm03.ts +15 -0
  114. package/src/data/eval/remediation/owasp-llm04.ts +15 -0
  115. package/src/data/eval/remediation/owasp-llm05.ts +15 -0
  116. package/src/data/eval/remediation/owasp-llm06.ts +15 -0
  117. package/src/data/eval/remediation/owasp-llm07.ts +15 -0
  118. package/src/data/eval/remediation/owasp-llm08.ts +15 -0
  119. package/src/data/eval/remediation/owasp-llm09.ts +15 -0
  120. package/src/data/eval/remediation/owasp-llm10.ts +15 -0
  121. package/src/data/eval/remediation/remediation.test.ts +229 -0
  122. package/src/data/eval/remediation/test-mapping.ts +290 -0
  123. package/src/data/eval/security-rubrics.ts +381 -0
  124. package/src/data/finding-explanations.json +453 -0
  125. package/src/data/industry-patterns.ts +161 -0
  126. package/src/data/registry-cards.ts +368 -0
  127. package/src/data/regulation/index.ts +5 -0
  128. package/src/data/regulation/jurisdiction-data.test.ts +73 -0
  129. package/src/data/regulation/jurisdiction-data.ts +65 -0
  130. package/src/data/regulation/regulation-data.ts +19 -0
  131. package/src/data/regulation/regulation-loader.test.ts +107 -0
  132. package/src/data/regulation/regulation-loader.ts +56 -0
  133. package/src/data/scanner-constants.ts +46 -0
  134. package/src/data/schemas/schemas-core.ts +140 -0
  135. package/src/data/schemas/schemas-supplementary.ts +211 -0
  136. package/src/data/schemas/schemas.ts +28 -0
  137. package/src/data/security/attack-probes.test.ts +62 -0
  138. package/src/data/security/attack-probes.ts +496 -0
  139. package/src/data/security/eu-ai-act-security.ts +40 -0
  140. package/src/data/security/index.ts +19 -0
  141. package/src/data/security/mitre-atlas.test.ts +43 -0
  142. package/src/data/security/mitre-atlas.ts +93 -0
  143. package/src/data/security/nist-ai-rmf.ts +43 -0
  144. package/src/data/security/owasp-llm-top10.test.ts +60 -0
  145. package/src/data/security/owasp-llm-top10.ts +138 -0
  146. package/src/data/template-registry.ts +53 -0
  147. package/src/data/tool-versions.json +22 -0
  148. package/src/domain/audit/audit-package.test.ts +152 -0
  149. package/src/domain/audit/audit-package.ts +166 -0
  150. package/src/domain/audit/audit-trail.test.ts +121 -0
  151. package/src/domain/audit/audit-trail.ts +174 -0
  152. package/src/domain/audit/index.ts +8 -0
  153. package/src/domain/audit/permissions-matrix.test.ts +136 -0
  154. package/src/domain/audit/permissions-matrix.ts +121 -0
  155. package/src/domain/certification/adversarial/bias-tests.ts +95 -0
  156. package/src/domain/certification/adversarial/evaluators.ts +304 -0
  157. package/src/domain/certification/adversarial/index.ts +11 -0
  158. package/src/domain/certification/adversarial/prompt-injection.ts +103 -0
  159. package/src/domain/certification/adversarial/safety-boundary.ts +132 -0
  160. package/src/domain/certification/aiuc1-readiness.test.ts +236 -0
  161. package/src/domain/certification/aiuc1-readiness.ts +298 -0
  162. package/src/domain/certification/aiuc1-requirements.ts +235 -0
  163. package/src/domain/certification/index.ts +10 -0
  164. package/src/domain/certification/redteam-runner.test.ts +97 -0
  165. package/src/domain/certification/redteam-runner.ts +205 -0
  166. package/src/domain/certification/test-runner.test.ts +232 -0
  167. package/src/domain/certification/test-runner.ts +289 -0
  168. package/src/domain/cost/cost-estimator.test.ts +187 -0
  169. package/src/domain/cost/cost-estimator.ts +133 -0
  170. package/src/domain/disclaimer.test.ts +52 -0
  171. package/src/domain/disclaimer.ts +39 -0
  172. package/src/domain/documents/ai-enricher.test.ts +120 -0
  173. package/src/domain/documents/ai-enricher.ts +159 -0
  174. package/src/domain/documents/document-generator.test.ts +318 -0
  175. package/src/domain/documents/document-generator.ts +239 -0
  176. package/src/domain/documents/index.ts +9 -0
  177. package/src/domain/documents/passport-helpers.ts +25 -0
  178. package/src/domain/documents/policy-generator.test.ts +252 -0
  179. package/src/domain/documents/policy-generator.ts +94 -0
  180. package/src/domain/documents/worker-notification-generator.test.ts +162 -0
  181. package/src/domain/documents/worker-notification-generator.ts +141 -0
  182. package/src/domain/eval/adapters/adapter-port.ts +94 -0
  183. package/src/domain/eval/adapters/adapters.test.ts +303 -0
  184. package/src/domain/eval/adapters/anthropic-adapter.ts +57 -0
  185. package/src/domain/eval/adapters/auto-detect.ts +104 -0
  186. package/src/domain/eval/adapters/create-chat-adapter.ts +106 -0
  187. package/src/domain/eval/adapters/custom-adapter.ts +74 -0
  188. package/src/domain/eval/adapters/http-adapter.ts +66 -0
  189. package/src/domain/eval/adapters/index.ts +7 -0
  190. package/src/domain/eval/adapters/ollama-adapter.ts +48 -0
  191. package/src/domain/eval/adapters/openai-adapter.ts +58 -0
  192. package/src/domain/eval/adapters/with-timeout.ts +25 -0
  193. package/src/domain/eval/conformity-score.test.ts +161 -0
  194. package/src/domain/eval/conformity-score.ts +135 -0
  195. package/src/domain/eval/eval-constants.ts +55 -0
  196. package/src/domain/eval/eval-evidence.test.ts +85 -0
  197. package/src/domain/eval/eval-evidence.ts +103 -0
  198. package/src/domain/eval/eval-fix-generator.test.ts +421 -0
  199. package/src/domain/eval/eval-fix-generator.ts +205 -0
  200. package/src/domain/eval/eval-passport.test.ts +82 -0
  201. package/src/domain/eval/eval-passport.ts +89 -0
  202. package/src/domain/eval/eval-remediation-report.test.ts +682 -0
  203. package/src/domain/eval/eval-remediation-report.ts +170 -0
  204. package/src/domain/eval/eval-report.ts +108 -0
  205. package/src/domain/eval/eval-runner.test.ts +609 -0
  206. package/src/domain/eval/eval-runner.ts +593 -0
  207. package/src/domain/eval/eval-to-findings.test.ts +293 -0
  208. package/src/domain/eval/eval-to-findings.ts +83 -0
  209. package/src/domain/eval/index.ts +31 -0
  210. package/src/domain/eval/llm-judge.test.ts +139 -0
  211. package/src/domain/eval/llm-judge.ts +168 -0
  212. package/src/domain/eval/remediation-types.ts +90 -0
  213. package/src/domain/eval/security-integration.test.ts +196 -0
  214. package/src/domain/eval/security-integration.ts +136 -0
  215. package/src/domain/eval/types.test.ts +173 -0
  216. package/src/domain/eval/types.ts +244 -0
  217. package/src/domain/eval/verdict-utils.ts +45 -0
  218. package/src/domain/fixer/create-fixer.ts +101 -0
  219. package/src/domain/fixer/diff.ts +70 -0
  220. package/src/domain/fixer/fix-history.ts +23 -0
  221. package/src/domain/fixer/fixer.test.ts +306 -0
  222. package/src/domain/fixer/index.ts +9 -0
  223. package/src/domain/fixer/strategies/bandit-fix.ts +61 -0
  224. package/src/domain/fixer/strategies/bias-testing.ts +49 -0
  225. package/src/domain/fixer/strategies/ci-compliance.ts +57 -0
  226. package/src/domain/fixer/strategies/content-marking.ts +45 -0
  227. package/src/domain/fixer/strategies/cve-upgrade.ts +66 -0
  228. package/src/domain/fixer/strategies/data-governance.ts +65 -0
  229. package/src/domain/fixer/strategies/disclosure.ts +69 -0
  230. package/src/domain/fixer/strategies/doc-code-sync.ts +53 -0
  231. package/src/domain/fixer/strategies/documentation.ts +59 -0
  232. package/src/domain/fixer/strategies/error-handler.ts +63 -0
  233. package/src/domain/fixer/strategies/hitl-gate.ts +67 -0
  234. package/src/domain/fixer/strategies/index.ts +61 -0
  235. package/src/domain/fixer/strategies/kill-switch-test.ts +85 -0
  236. package/src/domain/fixer/strategies/kill-switch.ts +53 -0
  237. package/src/domain/fixer/strategies/license-fix.ts +57 -0
  238. package/src/domain/fixer/strategies/log-retention.ts +40 -0
  239. package/src/domain/fixer/strategies/logging.ts +59 -0
  240. package/src/domain/fixer/strategies/metadata.ts +45 -0
  241. package/src/domain/fixer/strategies/permission-guard.ts +84 -0
  242. package/src/domain/fixer/strategies/record-keeping.ts +69 -0
  243. package/src/domain/fixer/strategies/secret-rotation.ts +52 -0
  244. package/src/domain/fixer/strategies.test.ts +341 -0
  245. package/src/domain/fixer/template-engine.test.ts +64 -0
  246. package/src/domain/fixer/template-engine.ts +38 -0
  247. package/src/domain/fixer/types.ts +88 -0
  248. package/src/domain/frameworks/aiuc1-framework.test.ts +159 -0
  249. package/src/domain/frameworks/aiuc1-framework.ts +126 -0
  250. package/src/domain/frameworks/collect-foundation-metrics.test.ts +96 -0
  251. package/src/domain/frameworks/collect-foundation-metrics.ts +34 -0
  252. package/src/domain/frameworks/eu-ai-act-framework.test.ts +117 -0
  253. package/src/domain/frameworks/eu-ai-act-framework.ts +100 -0
  254. package/src/domain/frameworks/framework-registry.test.ts +91 -0
  255. package/src/domain/frameworks/framework-registry.ts +38 -0
  256. package/src/domain/frameworks/index.ts +8 -0
  257. package/src/domain/frameworks/mitre-atlas-framework.test.ts +53 -0
  258. package/src/domain/frameworks/mitre-atlas-framework.ts +53 -0
  259. package/src/domain/frameworks/owasp-llm-framework.test.ts +77 -0
  260. package/src/domain/frameworks/owasp-llm-framework.ts +54 -0
  261. package/src/domain/frameworks/score-plugin-framework.ts +117 -0
  262. package/src/domain/fria/fria-generator.test.ts +273 -0
  263. package/src/domain/fria/fria-generator.ts +366 -0
  264. package/src/domain/import/promptfoo-importer.test.ts +103 -0
  265. package/src/domain/import/promptfoo-importer.ts +151 -0
  266. package/src/domain/onboarding/guided-onboarding.test.ts +144 -0
  267. package/src/domain/onboarding/guided-onboarding.ts +135 -0
  268. package/src/domain/passport/builder/domain-mapper.ts +9 -0
  269. package/src/domain/passport/builder/manifest-builder.test.ts +546 -0
  270. package/src/domain/passport/builder/manifest-builder.ts +535 -0
  271. package/src/domain/passport/builder/manifest-diff.test.ts +105 -0
  272. package/src/domain/passport/builder/manifest-diff.ts +89 -0
  273. package/src/domain/passport/builder/manifest-files.ts +17 -0
  274. package/src/domain/passport/crypto-signer.test.ts +93 -0
  275. package/src/domain/passport/crypto-signer.ts +157 -0
  276. package/src/domain/passport/discovery/agent-discovery.test.ts +296 -0
  277. package/src/domain/passport/discovery/agent-discovery.ts +325 -0
  278. package/src/domain/passport/discovery/autonomy-analyzer.test.ts +141 -0
  279. package/src/domain/passport/discovery/autonomy-analyzer.ts +113 -0
  280. package/src/domain/passport/discovery/permission-scanner.test.ts +191 -0
  281. package/src/domain/passport/discovery/permission-scanner.ts +414 -0
  282. package/src/domain/passport/export/a2a-mapper.ts +75 -0
  283. package/src/domain/passport/export/aiuc1-mapper.ts +126 -0
  284. package/src/domain/passport/export/export.test.ts +207 -0
  285. package/src/domain/passport/export/index.ts +41 -0
  286. package/src/domain/passport/export/nist-mapper.ts +227 -0
  287. package/src/domain/passport/import/a2a-importer.test.ts +133 -0
  288. package/src/domain/passport/import/a2a-importer.ts +156 -0
  289. package/src/domain/passport/import/index.ts +2 -0
  290. package/src/domain/passport/index.ts +32 -0
  291. package/src/domain/passport/obligation-field-map.test.ts +113 -0
  292. package/src/domain/passport/obligation-field-map.ts +117 -0
  293. package/src/domain/passport/passport-validator.test.ts +156 -0
  294. package/src/domain/passport/passport-validator.ts +126 -0
  295. package/src/domain/passport/scan-to-compliance.test.ts +336 -0
  296. package/src/domain/passport/scan-to-compliance.ts +166 -0
  297. package/src/domain/passport/test-generator.test.ts +93 -0
  298. package/src/domain/passport/test-generator.ts +136 -0
  299. package/src/domain/proxy/index.ts +11 -0
  300. package/src/domain/proxy/json-rpc.test.ts +72 -0
  301. package/src/domain/proxy/json-rpc.ts +53 -0
  302. package/src/domain/proxy/policy-engine.test.ts +259 -0
  303. package/src/domain/proxy/policy-engine.ts +137 -0
  304. package/src/domain/proxy/proxy-bridge.ts +125 -0
  305. package/src/domain/proxy/proxy-interceptor.test.ts +184 -0
  306. package/src/domain/proxy/proxy-interceptor.ts +120 -0
  307. package/src/domain/proxy/proxy-types.ts +35 -0
  308. package/src/domain/registry/compute-agent-score.test.ts +279 -0
  309. package/src/domain/registry/compute-agent-score.ts +162 -0
  310. package/src/domain/reporter/audit-report.test.ts +87 -0
  311. package/src/domain/reporter/audit-report.ts +116 -0
  312. package/src/domain/reporter/badge-generator.test.ts +54 -0
  313. package/src/domain/reporter/badge-generator.ts +40 -0
  314. package/src/domain/reporter/compliance-md.ts +45 -0
  315. package/src/domain/reporter/index.ts +7 -0
  316. package/src/domain/reporter/pdf-renderer.ts +282 -0
  317. package/src/domain/reporter/share.test.ts +92 -0
  318. package/src/domain/reporter/share.ts +80 -0
  319. package/src/domain/scanner/ast/swc-analyzer.test.ts +49 -0
  320. package/src/domain/scanner/ast/swc-analyzer.ts +124 -0
  321. package/src/domain/scanner/attestations.ts +97 -0
  322. package/src/domain/scanner/checks/ai-disclosure.test.ts +90 -0
  323. package/src/domain/scanner/checks/ai-disclosure.ts +54 -0
  324. package/src/domain/scanner/checks/ai-literacy.ts +163 -0
  325. package/src/domain/scanner/checks/behavioral-constraints.test.ts +167 -0
  326. package/src/domain/scanner/checks/behavioral-constraints.ts +86 -0
  327. package/src/domain/scanner/checks/compliance-metadata.ts +63 -0
  328. package/src/domain/scanner/checks/content-marking.ts +74 -0
  329. package/src/domain/scanner/checks/dep-deep-scan.test.ts +318 -0
  330. package/src/domain/scanner/checks/dep-deep-scan.ts +137 -0
  331. package/src/domain/scanner/checks/documentation.test.ts +88 -0
  332. package/src/domain/scanner/checks/documentation.ts +79 -0
  333. package/src/domain/scanner/checks/git-history.test.ts +120 -0
  334. package/src/domain/scanner/checks/git-history.ts +163 -0
  335. package/src/domain/scanner/checks/gpai-systemic-risk.test.ts +84 -0
  336. package/src/domain/scanner/checks/gpai-systemic-risk.ts +98 -0
  337. package/src/domain/scanner/checks/gpai-transparency.ts +94 -0
  338. package/src/domain/scanner/checks/index.ts +28 -0
  339. package/src/domain/scanner/checks/industry/index.ts +40 -0
  340. package/src/domain/scanner/checks/industry/industry.test.ts +287 -0
  341. package/src/domain/scanner/checks/interaction-logging.test.ts +113 -0
  342. package/src/domain/scanner/checks/interaction-logging.ts +142 -0
  343. package/src/domain/scanner/checks/nhi-scanner.test.ts +158 -0
  344. package/src/domain/scanner/checks/nhi-scanner.ts +78 -0
  345. package/src/domain/scanner/checks/passport-completeness.test.ts +127 -0
  346. package/src/domain/scanner/checks/passport-completeness.ts +82 -0
  347. package/src/domain/scanner/checks/passport-presence.test.ts +56 -0
  348. package/src/domain/scanner/checks/passport-presence.ts +78 -0
  349. package/src/domain/scanner/checks/pattern-check-factory.ts +70 -0
  350. package/src/domain/scanner/checks/permission-scanner.test.ts +279 -0
  351. package/src/domain/scanner/checks/permission-scanner.ts +90 -0
  352. package/src/domain/scanner/checks/presence-check-factory.test.ts +124 -0
  353. package/src/domain/scanner/checks/presence-check-factory.ts +275 -0
  354. package/src/domain/scanner/compliance-diff.test.ts +165 -0
  355. package/src/domain/scanner/compliance-diff.ts +138 -0
  356. package/src/domain/scanner/confidence.test.ts +235 -0
  357. package/src/domain/scanner/confidence.ts +156 -0
  358. package/src/domain/scanner/constants.ts +13 -0
  359. package/src/domain/scanner/create-scanner.ts +573 -0
  360. package/src/domain/scanner/cross-layer.test.ts +372 -0
  361. package/src/domain/scanner/cross-layer.ts +232 -0
  362. package/src/domain/scanner/data/ai-packages.ts +82 -0
  363. package/src/domain/scanner/debt-calculator.test.ts +89 -0
  364. package/src/domain/scanner/debt-calculator.ts +111 -0
  365. package/src/domain/scanner/drift.test.ts +191 -0
  366. package/src/domain/scanner/drift.ts +73 -0
  367. package/src/domain/scanner/evidence-store.test.ts +207 -0
  368. package/src/domain/scanner/evidence-store.ts +195 -0
  369. package/src/domain/scanner/evidence.test.ts +104 -0
  370. package/src/domain/scanner/evidence.ts +71 -0
  371. package/src/domain/scanner/external/bandit-runner.test.ts +45 -0
  372. package/src/domain/scanner/external/bandit-runner.ts +90 -0
  373. package/src/domain/scanner/external/checks.ts +321 -0
  374. package/src/domain/scanner/external/dedup.test.ts +79 -0
  375. package/src/domain/scanner/external/dedup.ts +94 -0
  376. package/src/domain/scanner/external/detect-secrets-runner.test.ts +58 -0
  377. package/src/domain/scanner/external/detect-secrets-runner.ts +81 -0
  378. package/src/domain/scanner/external/external-scanner.test.ts +221 -0
  379. package/src/domain/scanner/external/external-scanner.ts +36 -0
  380. package/src/domain/scanner/external/finding-mapper.test.ts +95 -0
  381. package/src/domain/scanner/external/finding-mapper.ts +138 -0
  382. package/src/domain/scanner/external/index.ts +15 -0
  383. package/src/domain/scanner/external/mappings.ts +93 -0
  384. package/src/domain/scanner/external/modelscan-runner.test.ts +35 -0
  385. package/src/domain/scanner/external/modelscan-runner.ts +101 -0
  386. package/src/domain/scanner/external/path-utils.ts +8 -0
  387. package/src/domain/scanner/external/runner-port.ts +45 -0
  388. package/src/domain/scanner/external/semgrep-runner.test.ts +52 -0
  389. package/src/domain/scanner/external/semgrep-runner.ts +94 -0
  390. package/src/domain/scanner/external/types.ts +32 -0
  391. package/src/domain/scanner/finding-attribution.test.ts +444 -0
  392. package/src/domain/scanner/finding-attribution.ts +195 -0
  393. package/src/domain/scanner/finding-explainer.test.ts +157 -0
  394. package/src/domain/scanner/finding-explainer.ts +73 -0
  395. package/src/domain/scanner/fix-diff-builder.test.ts +272 -0
  396. package/src/domain/scanner/fix-diff-builder.ts +477 -0
  397. package/src/domain/scanner/import-graph.test.ts +162 -0
  398. package/src/domain/scanner/import-graph.ts +198 -0
  399. package/src/domain/scanner/languages/adapter.test.ts +105 -0
  400. package/src/domain/scanner/languages/adapter.ts +239 -0
  401. package/src/domain/scanner/layers/index.ts +24 -0
  402. package/src/domain/scanner/layers/layer1-files.ts +54 -0
  403. package/src/domain/scanner/layers/layer2-docs.test.ts +1207 -0
  404. package/src/domain/scanner/layers/layer2-docs.ts +297 -0
  405. package/src/domain/scanner/layers/layer2-parsing.ts +217 -0
  406. package/src/domain/scanner/layers/layer3-config.test.ts +187 -0
  407. package/src/domain/scanner/layers/layer3-config.ts +279 -0
  408. package/src/domain/scanner/layers/layer3-parsers.ts +73 -0
  409. package/src/domain/scanner/layers/layer4-patterns.test.ts +397 -0
  410. package/src/domain/scanner/layers/layer4-patterns.ts +216 -0
  411. package/src/domain/scanner/layers/layer5-docs.test.ts +99 -0
  412. package/src/domain/scanner/layers/layer5-docs.ts +250 -0
  413. package/src/domain/scanner/layers/layer5-llm.test.ts +146 -0
  414. package/src/domain/scanner/layers/layer5-llm.ts +262 -0
  415. package/src/domain/scanner/layers/layer5-targeted.test.ts +93 -0
  416. package/src/domain/scanner/layers/layer5-targeted.ts +233 -0
  417. package/src/domain/scanner/layers/lockfile-parsers.test.ts +320 -0
  418. package/src/domain/scanner/layers/lockfile-parsers.ts +184 -0
  419. package/src/domain/scanner/regulation-version.test.ts +54 -0
  420. package/src/domain/scanner/regulation-version.ts +23 -0
  421. package/src/domain/scanner/role-filter.test.ts +116 -0
  422. package/src/domain/scanner/role-filter.ts +51 -0
  423. package/src/domain/scanner/rules/banned-packages-data.ts +553 -0
  424. package/src/domain/scanner/rules/banned-packages-sdk.ts +65 -0
  425. package/src/domain/scanner/rules/banned-packages.test.ts +249 -0
  426. package/src/domain/scanner/rules/banned-packages.ts +55 -0
  427. package/src/domain/scanner/rules/comment-filter.test.ts +115 -0
  428. package/src/domain/scanner/rules/comment-filter.ts +297 -0
  429. package/src/domain/scanner/rules/index.ts +9 -0
  430. package/src/domain/scanner/rules/nhi-patterns.test.ts +128 -0
  431. package/src/domain/scanner/rules/nhi-patterns.ts +60 -0
  432. package/src/domain/scanner/rules/pattern-rules.ts +1152 -0
  433. package/src/domain/scanner/sbom.test.ts +136 -0
  434. package/src/domain/scanner/sbom.ts +103 -0
  435. package/src/domain/scanner/scan-cache.test.ts +136 -0
  436. package/src/domain/scanner/scan-cache.ts +115 -0
  437. package/src/domain/scanner/scanner.test.ts +125 -0
  438. package/src/domain/scanner/score-calculator.test.ts +363 -0
  439. package/src/domain/scanner/score-calculator.ts +189 -0
  440. package/src/domain/scanner/security-score.test.ts +107 -0
  441. package/src/domain/scanner/security-score.ts +116 -0
  442. package/src/domain/scanner/source-filter.ts +24 -0
  443. package/src/domain/scanner/validators.ts +223 -0
  444. package/src/domain/shared/compliance-constants.ts +48 -0
  445. package/src/domain/shared/disclosure-patterns.ts +16 -0
  446. package/src/domain/shared/index.ts +6 -0
  447. package/src/domain/shared/parse-dependencies.ts +21 -0
  448. package/src/domain/supply-chain/dependency-analyzer.ts +138 -0
  449. package/src/domain/supply-chain/index.ts +3 -0
  450. package/src/domain/supply-chain/supply-chain.test.ts +211 -0
  451. package/src/domain/supply-chain/types.ts +32 -0
  452. package/src/domain/whatif/config-fixer.ts +187 -0
  453. package/src/domain/whatif/index.ts +6 -0
  454. package/src/domain/whatif/scenario-engine.ts +121 -0
  455. package/src/domain/whatif/simulate-actions.test.ts +161 -0
  456. package/src/domain/whatif/simulate-actions.ts +114 -0
  457. package/src/domain/whatif/whatif.test.ts +135 -0
  458. package/src/e2e/gaps-e2e.test.ts +259 -0
  459. package/src/e2e/smoke.test.ts +101 -0
  460. package/src/hooks/hooks-export.test.ts +81 -0
  461. package/src/hooks/installer.ts +113 -0
  462. package/src/http/cors.test.ts +38 -0
  463. package/src/http/create-router.ts +259 -0
  464. package/src/http/routes/agent.route.ts +380 -0
  465. package/src/http/routes/audit.route.ts +66 -0
  466. package/src/http/routes/badge.route.ts +23 -0
  467. package/src/http/routes/cert.route.ts +66 -0
  468. package/src/http/routes/chat.route.ts +228 -0
  469. package/src/http/routes/cost.route.ts +33 -0
  470. package/src/http/routes/debt.route.ts +29 -0
  471. package/src/http/routes/disclaimer.route.ts +64 -0
  472. package/src/http/routes/eval.route.ts +161 -0
  473. package/src/http/routes/events.route.test.ts +108 -0
  474. package/src/http/routes/events.route.ts +71 -0
  475. package/src/http/routes/external-scan.route.ts +24 -0
  476. package/src/http/routes/file.route.ts +54 -0
  477. package/src/http/routes/fix.route.ts +219 -0
  478. package/src/http/routes/frameworks.route.test.ts +66 -0
  479. package/src/http/routes/frameworks.route.ts +36 -0
  480. package/src/http/routes/git.route.ts +27 -0
  481. package/src/http/routes/guided-onboarding.route.ts +65 -0
  482. package/src/http/routes/import.route.ts +64 -0
  483. package/src/http/routes/jurisdiction.route.ts +22 -0
  484. package/src/http/routes/obligations.route.test.ts +122 -0
  485. package/src/http/routes/obligations.route.ts +110 -0
  486. package/src/http/routes/onboarding.route.ts +53 -0
  487. package/src/http/routes/provider.route.ts +42 -0
  488. package/src/http/routes/proxy.route.ts +40 -0
  489. package/src/http/routes/redteam.route.ts +84 -0
  490. package/src/http/routes/report.route.ts +29 -0
  491. package/src/http/routes/scan.route.ts +104 -0
  492. package/src/http/routes/share.route.ts +44 -0
  493. package/src/http/routes/shell.route.ts +27 -0
  494. package/src/http/routes/status.route.ts +66 -0
  495. package/src/http/routes/supply-chain.route.ts +121 -0
  496. package/src/http/routes/sync.route.ts +328 -0
  497. package/src/http/routes/tools.route.ts +29 -0
  498. package/src/http/routes/whatif.route.ts +96 -0
  499. package/src/http/utils/validation.ts +31 -0
  500. package/src/index.ts +1 -0
  501. package/src/infra/bundle-fetcher.ts +77 -0
  502. package/src/infra/cache-storage.ts +34 -0
  503. package/src/infra/event-bus.ts +31 -0
  504. package/src/infra/file-collector.ts +61 -0
  505. package/src/infra/file-ops-adapter.ts +95 -0
  506. package/src/infra/file-watcher.test.ts +90 -0
  507. package/src/infra/file-watcher.ts +106 -0
  508. package/src/infra/git-adapter.ts +93 -0
  509. package/src/infra/git-history-adapter.ts +41 -0
  510. package/src/infra/headless-browser.ts +178 -0
  511. package/src/infra/llm-adapter.test.ts +83 -0
  512. package/src/infra/llm-adapter.ts +86 -0
  513. package/src/infra/logger.ts +27 -0
  514. package/src/infra/project-config.test.ts +74 -0
  515. package/src/infra/project-config.ts +35 -0
  516. package/src/infra/rate-limiter.test.ts +36 -0
  517. package/src/infra/rate-limiter.ts +34 -0
  518. package/src/infra/retry.ts +46 -0
  519. package/src/infra/saas-client.ts +123 -0
  520. package/src/infra/search-adapter.ts +113 -0
  521. package/src/infra/shell-adapter.ts +68 -0
  522. package/src/infra/tool-manager.test.ts +99 -0
  523. package/src/infra/tool-manager.ts +197 -0
  524. package/src/llm/agents/agent-modes.test.ts +44 -0
  525. package/src/llm/agents/modes.ts +68 -0
  526. package/src/llm/routing/cost-routing.test.ts +37 -0
  527. package/src/llm/routing/cost-tracker.ts +74 -0
  528. package/src/llm/routing/model-routing.test.ts +79 -0
  529. package/src/llm/routing/model-routing.ts +38 -0
  530. package/src/llm/routing/pricing.ts +19 -0
  531. package/src/llm/sse-protocol.ts +77 -0
  532. package/src/llm/tool-definitions.ts +83 -0
  533. package/src/llm/tool-executors.ts +80 -0
  534. package/src/llm/tools/types.ts +13 -0
  535. package/src/mcp/create-mcp-stack.ts +82 -0
  536. package/src/mcp/handlers.ts +245 -0
  537. package/src/mcp/index.ts +28 -0
  538. package/src/mcp/mcp-server.test.ts +80 -0
  539. package/src/mcp/server.ts +79 -0
  540. package/src/mcp/tools.ts +48 -0
  541. package/src/onboarding/auto-detect.ts +164 -0
  542. package/src/onboarding/onboarding.test.ts +89 -0
  543. package/src/onboarding/profile.ts +169 -0
  544. package/src/onboarding/questions.ts +112 -0
  545. package/src/onboarding/wizard.ts +66 -0
  546. package/src/output/github-issue.ts +32 -0
  547. package/src/output/json-output.ts +67 -0
  548. package/src/ports/browser.port.ts +23 -0
  549. package/src/ports/events.port.ts +28 -0
  550. package/src/ports/llm.port.ts +23 -0
  551. package/src/ports/logger.port.ts +6 -0
  552. package/src/ports/process.port.ts +6 -0
  553. package/src/ports/scanner.port.ts +15 -0
  554. package/src/server.ts +134 -0
  555. package/src/services/badge-service.ts +67 -0
  556. package/src/services/chat-service.test.ts +162 -0
  557. package/src/services/chat-service.ts +152 -0
  558. package/src/services/cost-service.ts +52 -0
  559. package/src/services/debt-service.ts +65 -0
  560. package/src/services/eval-integration.test.ts +132 -0
  561. package/src/services/eval-service.test.ts +373 -0
  562. package/src/services/eval-service.ts +463 -0
  563. package/src/services/external-scan-service.ts +60 -0
  564. package/src/services/file-service.ts +37 -0
  565. package/src/services/fix-service.test.ts +470 -0
  566. package/src/services/fix-service.ts +648 -0
  567. package/src/services/framework-service.test.ts +159 -0
  568. package/src/services/framework-service.ts +67 -0
  569. package/src/services/onboarding-service.ts +165 -0
  570. package/src/services/passport-audit.ts +244 -0
  571. package/src/services/passport-documents.ts +258 -0
  572. package/src/services/passport-service-utils.ts +72 -0
  573. package/src/services/passport-service.test.ts +251 -0
  574. package/src/services/passport-service.ts +339 -0
  575. package/src/services/proxy-service.ts +81 -0
  576. package/src/services/report-service.ts +72 -0
  577. package/src/services/scan-service.test.ts +470 -0
  578. package/src/services/scan-service.ts +335 -0
  579. package/src/services/share-service.ts +108 -0
  580. package/src/services/shared/backup.ts +23 -0
  581. package/src/services/status-service.ts +38 -0
  582. package/src/services/undo-service.test.ts +190 -0
  583. package/src/services/undo-service.ts +144 -0
  584. package/src/test-helpers/factories.ts +116 -0
  585. package/src/types/common.schemas.ts +147 -0
  586. package/src/types/common.types.ts +292 -0
  587. package/src/types/contract.test.ts +217 -0
  588. package/src/types/errors.ts +52 -0
  589. package/src/types/framework.types.ts +87 -0
  590. package/src/types/passport-schemas.ts +241 -0
  591. package/src/types/passport.types.ts +296 -0
  592. package/src/version.ts +1 -0
  593. package/tsconfig.json +20 -0
  594. package/vitest.config.ts +9 -0
@@ -0,0 +1,2590 @@
1
+ {
2
+ "_version": "2.0",
3
+ "_note": "Expanded from v1 (6 specs) to v2 (14 specs). Covers all CLI-checkable and SDK-required obligations.",
4
+ "technical_requirements": [
5
+ {
6
+ "obligation_id": "eu-ai-act-OBL-006",
7
+ "feature_type": "logging",
8
+ "sdk_implementation": {
9
+ "description": "Middleware intercepts all AI interactions and logs them to compliant storage with integrity protection.",
10
+ "middleware_behavior": "On every AI API call: capture timestamp, session_id, user_ref (anonymized), input_hash, full output, model_version, confidence, latency, human_oversight_flags.",
11
+ "data_to_log": [
12
+ "timestamp",
13
+ "session_id",
14
+ "user_ref_anonymized",
15
+ "input_data_hash",
16
+ "output_data",
17
+ "model_id_version",
18
+ "confidence_score",
19
+ "processing_time_ms",
20
+ "human_oversight_flag",
21
+ "human_override_action",
22
+ "error_code"
23
+ ],
24
+ "configuration_options": {
25
+ "log_retention_days": "Min 180. Default: 365.",
26
+ "storage_backend": "local_encrypted | cloud_eu | complior_managed",
27
+ "input_data_retention": "hash_only | full_input | redacted_input",
28
+ "integrity_protection": "hmac | immutable_storage"
29
+ },
30
+ "code_example": "```python\nfrom complior import ComplianceMiddleware\nmiddleware = ComplianceMiddleware(regulation='eu-ai-act', risk_level='high')\n\n@middleware.log_interaction\ndef call_ai(prompt, user_id):\n return openai.chat.completions.create(model='gpt-4', messages=[{'role':'user','content':prompt}])\n```"
31
+ },
32
+ "cli_check": {
33
+ "what_to_scan": "AI interaction endpoints",
34
+ "positive_signals": [
35
+ "Structured logging wrapping AI calls",
36
+ "Log entries with timestamp+session+input+output",
37
+ "Retention config >= 180 days",
38
+ "HMAC/immutable log storage"
39
+ ],
40
+ "negative_signals": [
41
+ "AI API calls without logging",
42
+ "console.log only",
43
+ "No retention policy",
44
+ "Mutable logs without integrity"
45
+ ],
46
+ "warning_message": "WARNING [OBL-006]: High-risk AI interactions without compliant logging. Article 12 requires automatic event recording.",
47
+ "fix_suggestion": "Add ComplianceMiddleware.log_interaction() to AI endpoints. Set retention >= 180 days.",
48
+ "severity": "error"
49
+ }
50
+ },
51
+ {
52
+ "obligation_id": "eu-ai-act-OBL-006a",
53
+ "feature_type": "logging",
54
+ "cli_check": {
55
+ "what_to_scan": "Log storage and retention configuration",
56
+ "positive_signals": [
57
+ "retention_days >= 180 in config",
58
+ "Log rotation preserves minimum period",
59
+ "Log archive/backup configured"
60
+ ],
61
+ "negative_signals": [
62
+ "retention_days < 180",
63
+ "Log purge cron running daily without retention guard",
64
+ "No retention configuration found"
65
+ ],
66
+ "warning_message": "WARNING [OBL-006a]: Log retention configured below 6-month minimum. Article 19/26(6) requires minimum 6-month log retention.",
67
+ "fix_suggestion": "Set log_retention_days >= 180 in logging configuration. Disable any purge jobs that would delete logs before 6 months.",
68
+ "severity": "error"
69
+ }
70
+ },
71
+ {
72
+ "obligation_id": "eu-ai-act-OBL-015",
73
+ "feature_type": "disclosure",
74
+ "sdk_implementation": {
75
+ "description": "Auto-inject AI disclosure notices into chatbot/assistant interfaces before first message.",
76
+ "middleware_behavior": "Before first AI message: inject disclosure in user's language. Track disclosure shown event.",
77
+ "configuration_options": {
78
+ "disclosure_text": "Default: 'You are interacting with an AI system.'",
79
+ "disclosure_position": "pre_conversation_banner | first_message_prefix | persistent_header",
80
+ "disclosure_languages": "Auto-detect or explicit. Default: all EU langs.",
81
+ "require_acknowledgment": "false (not legally required)"
82
+ },
83
+ "code_example": "```javascript\nimport { AIDisclosure } from '@complior/sdk';\nconst disclosure = new AIDisclosure({ text: 'You are chatting with an AI assistant.' });\napp.post('/chat', disclosure.middleware(), chatHandler);\n```"
84
+ },
85
+ "cli_check": {
86
+ "what_to_scan": "Chat/conversation UI code and API endpoints",
87
+ "positive_signals": [
88
+ "AI disclosure component in chat UI",
89
+ "Disclosure middleware on conversation endpoints",
90
+ "Text containing 'AI', 'artificial intelligence', 'automated'"
91
+ ],
92
+ "negative_signals": [
93
+ "Chat endpoints without disclosure",
94
+ "Chatbot UI with no AI label",
95
+ "Disclosure only in ToS (insufficient)"
96
+ ],
97
+ "warning_message": "WARNING [OBL-015]: Chat endpoint without AI disclosure. Article 50(1) requires informing users of AI interaction.",
98
+ "fix_suggestion": "Add AIDisclosure.middleware() to conversation endpoints.",
99
+ "severity": "error"
100
+ }
101
+ },
102
+ {
103
+ "obligation_id": "eu-ai-act-OBL-015a",
104
+ "feature_type": "disclosure",
105
+ "cli_check": {
106
+ "what_to_scan": "Voice/telephony AI code",
107
+ "positive_signals": [
108
+ "Audio disclosure asset in voice pipeline",
109
+ "TTS disclosure before first AI response",
110
+ "IVR flow with disclosure node"
111
+ ],
112
+ "negative_signals": [
113
+ "Voice AI without audio disclosure step",
114
+ "Voice bot answering without identifying as AI"
115
+ ],
116
+ "warning_message": "WARNING [OBL-015a]: Voice AI detected without audio disclosure. Article 50(1) applies to voice interactions.",
117
+ "fix_suggestion": "Add audio AI disclosure at start of voice interaction. Play before first AI-generated response.",
118
+ "severity": "error"
119
+ }
120
+ },
121
+ {
122
+ "obligation_id": "eu-ai-act-OBL-015b",
123
+ "feature_type": "disclosure",
124
+ "cli_check": {
125
+ "what_to_scan": "Email sending and messaging bot code",
126
+ "positive_signals": [
127
+ "AI disclosure in email templates/footers",
128
+ "'AI generated' in email signature config",
129
+ "First-message disclosure in messaging bots"
130
+ ],
131
+ "negative_signals": [
132
+ "AI-generated emails sent without disclosure",
133
+ "Bot messages without identifying as AI",
134
+ "Auto-reply without AI label"
135
+ ],
136
+ "warning_message": "WARNING [OBL-015b]: AI-generated emails/messages without disclosure. Article 50(1) requires AI identification.",
137
+ "fix_suggestion": "Add 'This message was generated by an AI system' to email footer/message header.",
138
+ "severity": "warning"
139
+ }
140
+ },
141
+ {
142
+ "obligation_id": "eu-ai-act-OBL-015c",
143
+ "feature_type": "disclosure",
144
+ "cli_check": {
145
+ "what_to_scan": "API response middleware",
146
+ "positive_signals": [
147
+ "X-AI-Generated header in API responses",
148
+ "AI metadata in response body",
149
+ "API docs documenting AI generation metadata"
150
+ ],
151
+ "negative_signals": [
152
+ "AI API serving content without any generation metadata",
153
+ "No AI disclosure headers"
154
+ ],
155
+ "warning_message": "WARNING [OBL-015c]: API responses lack AI generation metadata. Include X-AI-Generated header for downstream deployer compliance.",
156
+ "fix_suggestion": "Add response header X-AI-Generated: true to all AI-powered API endpoints. Document in API reference.",
157
+ "severity": "warning"
158
+ }
159
+ },
160
+ {
161
+ "obligation_id": "eu-ai-act-OBL-016",
162
+ "feature_type": "content-marking",
163
+ "sdk_implementation": {
164
+ "description": "Auto-embed machine-readable AI markers into synthetic outputs. Supports C2PA, IPTC, watermark, text provenance.",
165
+ "middleware_behavior": "After generation, before delivery: inject C2PA manifest for images, audio watermark for audio/video, provenance metadata for text.",
166
+ "configuration_options": {
167
+ "image_marking": "c2pa_manifest | iptc_metadata | invisible_watermark | all",
168
+ "audio_marking": "metadata_embed | audio_watermark | both",
169
+ "text_marking": "metadata_header | provenance_json",
170
+ "robustness_level": "standard | high"
171
+ },
172
+ "code_example": "```python\nfrom complior import ContentMarker\nmarker = ContentMarker(regulation='eu-ai-act')\nmarked_image = marker.mark_image(raw_bytes, model_id='dall-e-3', method=['c2pa','watermark'])\n```"
173
+ },
174
+ "cli_check": {
175
+ "what_to_scan": "Content generation pipelines",
176
+ "positive_signals": [
177
+ "C2PA library in image pipeline",
178
+ "Watermarking in content output",
179
+ "Metadata injection before delivery"
180
+ ],
181
+ "negative_signals": [
182
+ "AI content generation without marking step",
183
+ "Raw AI output delivered directly"
184
+ ],
185
+ "warning_message": "WARNING [OBL-016]: AI content generation without machine-readable marking. Article 50(2) requires marking.",
186
+ "fix_suggestion": "Add ContentMarker to generation pipeline before delivery.",
187
+ "severity": "error"
188
+ }
189
+ },
190
+ {
191
+ "obligation_id": "eu-ai-act-OBL-004a",
192
+ "feature_type": "bias-testing",
193
+ "sdk_implementation": {
194
+ "description": "Bias detection and fairness testing tools analyzing AI outputs across protected characteristics.",
195
+ "middleware_behavior": "Batch mode: analyze historical outputs. Live mode: real-time monitoring with threshold alerts.",
196
+ "configuration_options": {
197
+ "protected_characteristics": "gender | age | ethnicity | disability | religion",
198
+ "fairness_metrics": "statistical_parity | equal_opportunity | predictive_parity",
199
+ "threshold": "0.8 (four-fifths rule)",
200
+ "test_frequency": "on_deploy | weekly | monthly | continuous"
201
+ },
202
+ "code_example": "```python\nfrom complior import BiasDetector\ndetector = BiasDetector(protected_characteristics=['gender','age','ethnicity'])\nresults = detector.test(predictions=outputs, sensitive_features=demographics)\nresults.export_report('bias_Q1.pdf')\n```"
203
+ },
204
+ "cli_check": {
205
+ "what_to_scan": "Model evaluation and data pipeline code",
206
+ "positive_signals": [
207
+ "fairlearn/aif360 imported",
208
+ "Fairness metrics in test suite",
209
+ "Protected characteristics in evaluation"
210
+ ],
211
+ "negative_signals": [
212
+ "No bias testing in evaluation",
213
+ "No fairness metrics",
214
+ "Protected characteristics available but untested"
215
+ ],
216
+ "warning_message": "WARNING [OBL-004a]: No bias testing detected. Article 10(2)(f) requires bias detection and mitigation.",
217
+ "fix_suggestion": "Add BiasDetector to evaluation pipeline. Test across gender, age, ethnicity.",
218
+ "severity": "warning"
219
+ }
220
+ },
221
+ {
222
+ "obligation_id": "eu-ai-act-OBL-008",
223
+ "feature_type": "human-oversight",
224
+ "sdk_implementation": {
225
+ "description": "Human-in-the-loop workflow: confidence thresholds, override buttons, review queues, audit trail.",
226
+ "middleware_behavior": "Check confidence against threshold → route below-threshold decisions to human queue. Log all human decisions.",
227
+ "configuration_options": {
228
+ "confidence_threshold": "0.7 (auto-escalate below this)",
229
+ "review_queue_type": "fifo | priority | round_robin",
230
+ "max_review_time": "24h before escalation",
231
+ "stop_mechanism": "enabled for all high-risk"
232
+ },
233
+ "code_example": "```python\nfrom complior import HumanOversight\noversight = HumanOversight(confidence_threshold=0.7)\n@oversight.with_human_review\ndef credit_decision(data): return model.predict(data)\n```"
234
+ },
235
+ "cli_check": {
236
+ "what_to_scan": "Decision endpoints and AI output delivery code",
237
+ "positive_signals": [
238
+ "Human review queue",
239
+ "Confidence threshold checks",
240
+ "Override/reject UI",
241
+ "Emergency stop endpoint"
242
+ ],
243
+ "negative_signals": [
244
+ "AI decisions delivered without human review option",
245
+ "No confidence checks",
246
+ "No stop mechanism"
247
+ ],
248
+ "warning_message": "WARNING [OBL-008]: High-risk decision endpoint without human oversight. Article 14 requires effective human oversight.",
249
+ "fix_suggestion": "Add HumanOversight wrapper. Configure confidence thresholds and emergency stop.",
250
+ "severity": "error"
251
+ }
252
+ },
253
+ {
254
+ "obligation_id": "eu-ai-act-OBL-024",
255
+ "feature_type": "explainability",
256
+ "sdk_implementation": {
257
+ "description": "Automated explanation generation for AI decisions using SHAP/LIME/rule extraction.",
258
+ "middleware_behavior": "On significant decision: generate human-readable explanation with top factors. Include contestation info.",
259
+ "configuration_options": {
260
+ "explanation_method": "shap | lime | rule_extraction | counterfactual",
261
+ "detail_level": "summary (3-5 factors) | detailed | technical",
262
+ "include_contestation_info": "true"
263
+ },
264
+ "code_example": "```python\nfrom complior import ExplainableDecision\nexplainer = ExplainableDecision(method='shap', contact_email='complaints@co.com')\n@explainer.explain\ndef loan_decision(applicant): return model.predict(applicant)\n```"
265
+ },
266
+ "cli_check": {
267
+ "what_to_scan": "Decision output endpoints",
268
+ "positive_signals": [
269
+ "SHAP/LIME/eli5 imported",
270
+ "Explanation generation on decision endpoints",
271
+ "Contestation info in output"
272
+ ],
273
+ "negative_signals": [
274
+ "Decision endpoints returning only approve/deny",
275
+ "No explainability library",
276
+ "No appeal mechanism"
277
+ ],
278
+ "warning_message": "WARNING [OBL-024]: Decision endpoint without explanation. Articles 26(11)/86 require explanations for significant AI decisions.",
279
+ "fix_suggestion": "Add ExplainableDecision wrapper. Include top factors and contestation info.",
280
+ "severity": "error"
281
+ }
282
+ },
283
+ {
284
+ "obligation_id": "eu-ai-act-OBL-002f",
285
+ "feature_type": "prohibited-practice-scan",
286
+ "cli_check": {
287
+ "what_to_scan": "Codebase for emotion recognition in workplace/education contexts",
288
+ "positive_signals": [
289
+ "Emotion detection explicitly disabled in HR/LMS modules",
290
+ "Configuration blocking emotion features in workplace context"
291
+ ],
292
+ "negative_signals": [
293
+ "Emotion detection libraries (Affectiva, Azure Face emotion, fer, deepface emotion) imported in HR/LMS/workplace code",
294
+ "Sentiment analysis applied to employee communications (Slack, email)",
295
+ "Emotion scoring in performance review systems"
296
+ ],
297
+ "warning_message": "CRITICAL [OBL-002f]: Emotion recognition detected in workplace/education context. This is a PROHIBITED PRACTICE under Article 5(1)(f). Maximum fine: €35M / 7% turnover.",
298
+ "fix_suggestion": "Remove emotion recognition from all workplace and educational applications immediately. Medical/safety exceptions require documented justification.",
299
+ "severity": "error"
300
+ }
301
+ },
302
+ {
303
+ "obligation_id": "eu-ai-act-OBL-005",
304
+ "feature_type": "documentation-check",
305
+ "cli_check": {
306
+ "what_to_scan": "Repository documentation structure for Annex IV compliance",
307
+ "positive_signals": [
308
+ "TECHNICAL_DOCUMENTATION.md or /docs/annex-iv/ exists",
309
+ "Sections covering: system description, development process, data governance, risk management, testing, post-market monitoring",
310
+ "Version history maintained",
311
+ "Performance metrics documented"
312
+ ],
313
+ "negative_signals": [
314
+ "No technical documentation file in repository",
315
+ "README only covers installation, not compliance",
316
+ "No risk management section",
317
+ "No performance metrics documented"
318
+ ],
319
+ "warning_message": "WARNING [OBL-005]: Technical documentation missing or incomplete. Article 11/Annex IV requires comprehensive docs before market placement.",
320
+ "fix_suggestion": "Create TECHNICAL_DOCUMENTATION.md following Annex IV structure: (1) System description, (2) Development process, (3) Data governance, (4) Risk management, (5) Testing results, (6) Post-market monitoring plan.",
321
+ "severity": "error"
322
+ }
323
+ },
324
+ {
325
+ "obligation_id": "eu-ai-act-OBL-022",
326
+ "feature_type": "gpai-documentation-check",
327
+ "cli_check": {
328
+ "what_to_scan": "Repository for GPAI model documentation per Annex XI",
329
+ "positive_signals": [
330
+ "MODEL_CARD.md exists with required sections",
331
+ "Training process documented",
332
+ "Evaluation results published",
333
+ "Capabilities and limitations described",
334
+ "TRAINING_DATA_SUMMARY.md exists",
335
+ "COPYRIGHT_POLICY.md exists",
336
+ "DOWNSTREAM_PROVIDER_INFO.md or integration guide exists"
337
+ ],
338
+ "negative_signals": [
339
+ "No model card or model documentation",
340
+ "Training process undocumented",
341
+ "No evaluation results",
342
+ "No training data summary",
343
+ "No copyright compliance policy",
344
+ "No downstream provider information"
345
+ ],
346
+ "warning_message": "WARNING [OBL-022]: GPAI model documentation incomplete. Article 53/Annex XI requires technical documentation, training data summary, copyright policy, and downstream provider information.",
347
+ "fix_suggestion": "Create: MODEL_CARD.md (Annex XI), TRAINING_DATA_SUMMARY.md (Art. 53(1)(d)), COPYRIGHT_POLICY.md (Art. 53(1)(c)), DOWNSTREAM_PROVIDER_INFO.md (Annex XII).",
348
+ "severity": "error"
349
+ }
350
+ },
351
+ {
352
+ "obligation_id": "eu-ai-act-OBL-010",
353
+ "feature_type": "compliance-infrastructure-check",
354
+ "cli_check": {
355
+ "what_to_scan": "Repository for compliance governance infrastructure",
356
+ "positive_signals": [
357
+ "COMPLIANCE.md or /docs/compliance/ directory exists",
358
+ "QMS documentation present",
359
+ "AI_POLICY.md or AI governance document",
360
+ "RISK_REGISTER.json or equivalent",
361
+ "Incident response procedure documented"
362
+ ],
363
+ "negative_signals": [
364
+ "No compliance directory or documentation",
365
+ "No QMS documentation",
366
+ "No AI governance policy",
367
+ "No risk register",
368
+ "No incident response plan"
369
+ ],
370
+ "warning_message": "WARNING [OBL-010]: Quality management system documentation missing. Article 17 requires documented QMS for high-risk AI providers.",
371
+ "fix_suggestion": "Create /docs/compliance/ with: COMPLIANCE.md (QMS overview), AI_POLICY.md (governance), RISK_REGISTER.json (identified risks), INCIDENT_RESPONSE.md (procedures).",
372
+ "severity": "warning"
373
+ }
374
+ },
375
+ {
376
+ "obligation_id": "eu-ai-act-OBL-001",
377
+ "feature_type": "documentation-check",
378
+ "sdk_implementation": {
379
+ "description": "Generate AI Literacy documentation template",
380
+ "middleware_behavior": null,
381
+ "data_to_log": [],
382
+ "user_facing_output": null,
383
+ "configuration_options": {},
384
+ "code_example": null
385
+ },
386
+ "cli_check": {
387
+ "what_to_scan": "Project root and docs/ for AI literacy training documentation",
388
+ "positive_signals": [
389
+ "File matching AI-LITERACY.md or ai-training-policy.*",
390
+ "Document contains 'training level' or 'AI literacy' sections",
391
+ "Training schedule with dates present",
392
+ "Training record template or completion tracking"
393
+ ],
394
+ "negative_signals": [
395
+ "No AI literacy or training documentation found",
396
+ "Document exists but missing required sections (scope, levels, schedule)",
397
+ "No training records or completion tracking mechanism"
398
+ ],
399
+ "warning_message": "No AI Literacy documentation found. Article 4 requires all organizations using AI to ensure staff have sufficient AI literacy. This obligation is already in force since February 2, 2025.",
400
+ "fix_suggestion": "Run 'ai-comply fix --literacy' to generate AI Literacy Policy template with all required sections.",
401
+ "severity": "warning"
402
+ }
403
+ },
404
+ {
405
+ "obligation_id": "eu-ai-act-OBL-002",
406
+ "feature_type": "prohibited-practice-scan",
407
+ "sdk_implementation": {
408
+ "description": null,
409
+ "middleware_behavior": null,
410
+ "data_to_log": [],
411
+ "user_facing_output": null,
412
+ "configuration_options": {},
413
+ "code_example": null
414
+ },
415
+ "cli_check": {
416
+ "what_to_scan": "Dependency tree and import statements for prohibited AI practice patterns",
417
+ "positive_signals": [
418
+ "PROHIBITED-PRACTICES-SCREENING.md or art5-screening.* present",
419
+ "No imports from known prohibited-use libraries",
420
+ "Screening report with sign-off and date"
421
+ ],
422
+ "negative_signals": [
423
+ "No Art. 5 screening documentation",
424
+ "Imports from facial recognition mass-scraping libraries (e.g., face_recognition with scraping patterns)",
425
+ "Social scoring calculation patterns in code",
426
+ "Criminal profiling logic without objective fact inputs"
427
+ ],
428
+ "warning_message": "No Article 5 Prohibited Practices Screening found. Prohibited practices carry the highest fines (€35M / 7% turnover) and are already in force since February 2, 2025.",
429
+ "fix_suggestion": "Run 'ai-comply fix --art5' to generate Prohibited Practices Screening template. Review each AI system against 8 prohibited categories.",
430
+ "severity": "error"
431
+ }
432
+ },
433
+ {
434
+ "obligation_id": "eu-ai-act-OBL-002a",
435
+ "feature_type": "prohibited-practice-scan",
436
+ "sdk_implementation": {
437
+ "description": null,
438
+ "middleware_behavior": null,
439
+ "data_to_log": [],
440
+ "user_facing_output": null,
441
+ "configuration_options": {},
442
+ "code_example": null
443
+ },
444
+ "cli_check": {
445
+ "what_to_scan": "Code patterns indicating subliminal or manipulative AI techniques",
446
+ "positive_signals": [
447
+ "No dark pattern libraries imported",
448
+ "No behavioral manipulation logic detected"
449
+ ],
450
+ "negative_signals": [
451
+ "Import of dark pattern or persuasion profiling libraries",
452
+ "A/B testing on vulnerable user segments without consent safeguards",
453
+ "Algorithmic content recommendations designed to maximize engagement without user control"
454
+ ],
455
+ "warning_message": "Potential subliminal/manipulative AI technique pattern detected. Art. 5(1)(a) prohibits AI that deploys techniques beyond a person's consciousness to materially distort behavior.",
456
+ "fix_suggestion": "Review flagged code for compliance with Art. 5(1)(a). Add user control mechanisms and transparent disclosure of AI-driven recommendations.",
457
+ "severity": "error"
458
+ }
459
+ },
460
+ {
461
+ "obligation_id": "eu-ai-act-OBL-003",
462
+ "feature_type": "documentation-check",
463
+ "sdk_implementation": {
464
+ "description": null,
465
+ "middleware_behavior": null,
466
+ "data_to_log": [],
467
+ "user_facing_output": null,
468
+ "configuration_options": {},
469
+ "code_example": null
470
+ },
471
+ "cli_check": {
472
+ "what_to_scan": "Project documentation for risk management system artifacts",
473
+ "positive_signals": [
474
+ "RISK-MANAGEMENT.md or risk-assessment.* present",
475
+ "Document contains sections: identified risks, misuse scenarios, mitigations, test results",
476
+ "Risk register with severity ratings",
477
+ "Evidence of periodic risk review (dates, sign-offs)"
478
+ ],
479
+ "negative_signals": [
480
+ "No risk management documentation",
481
+ "Risk document exists but missing misuse scenarios",
482
+ "No evidence of testing or review dates",
483
+ "Risk management is only in TODO/draft state"
484
+ ],
485
+ "warning_message": "No Risk Management System documentation found. Article 9 requires providers of high-risk AI to establish and maintain a continuous risk management system.",
486
+ "fix_suggestion": "Run 'ai-comply fix --risk-mgmt' to generate Risk Management System template with all Art. 9 required sections.",
487
+ "severity": "error"
488
+ }
489
+ },
490
+ {
491
+ "obligation_id": "eu-ai-act-OBL-003c",
492
+ "feature_type": "testing-check",
493
+ "sdk_implementation": {
494
+ "description": null,
495
+ "middleware_behavior": null,
496
+ "data_to_log": [],
497
+ "user_facing_output": null,
498
+ "configuration_options": {},
499
+ "code_example": null
500
+ },
501
+ "cli_check": {
502
+ "what_to_scan": "Test infrastructure for AI system validation before deployment",
503
+ "positive_signals": [
504
+ "Test directory with AI-specific test cases (bias, accuracy, robustness)",
505
+ "CI/CD pipeline includes AI validation step",
506
+ "Test reports with documented metrics and pass/fail thresholds"
507
+ ],
508
+ "negative_signals": [
509
+ "No AI-specific tests in test suite",
510
+ "No CI/CD validation gate for AI model performance",
511
+ "Test directory empty or contains only unit tests without AI validation"
512
+ ],
513
+ "warning_message": "No AI system testing infrastructure found. Art. 9(7) requires testing high-risk AI systems before market placement with appropriate metrics.",
514
+ "fix_suggestion": "Add AI validation tests: bias testing, accuracy benchmarking, robustness checks. Integrate into CI/CD pipeline.",
515
+ "severity": "warning"
516
+ }
517
+ },
518
+ {
519
+ "obligation_id": "eu-ai-act-OBL-004b",
520
+ "feature_type": "documentation-check",
521
+ "sdk_implementation": {
522
+ "description": null,
523
+ "middleware_behavior": null,
524
+ "data_to_log": [],
525
+ "user_facing_output": null,
526
+ "configuration_options": {},
527
+ "code_example": null
528
+ },
529
+ "cli_check": {
530
+ "what_to_scan": "Data governance documentation — training data sources and processing",
531
+ "positive_signals": [
532
+ "DATA-GOVERNANCE.md or data-sources.* documentation present",
533
+ "Training data manifest with source, license, date, processing steps",
534
+ "Data quality assessment report"
535
+ ],
536
+ "negative_signals": [
537
+ "No data governance documentation",
538
+ "Training data used without documented provenance",
539
+ "No data quality or bias assessment records"
540
+ ],
541
+ "warning_message": "No data governance documentation found. Art. 10 requires documenting training data sources, processing, and quality measures.",
542
+ "fix_suggestion": "Run 'ai-comply fix --data-gov' to generate Data Governance template with data provenance fields.",
543
+ "severity": "warning"
544
+ }
545
+ },
546
+ {
547
+ "obligation_id": "eu-ai-act-OBL-007",
548
+ "feature_type": "documentation-check",
549
+ "sdk_implementation": {
550
+ "description": null,
551
+ "middleware_behavior": null,
552
+ "data_to_log": [],
553
+ "user_facing_output": null,
554
+ "configuration_options": {},
555
+ "code_example": null
556
+ },
557
+ "cli_check": {
558
+ "what_to_scan": "Instructions for Use documentation for high-risk AI system",
559
+ "positive_signals": [
560
+ "INSTRUCTIONS-FOR-USE.md or provider-instructions.* present",
561
+ "Document covers: intended purpose, limitations, known risks, performance metrics",
562
+ "Human oversight requirements documented",
563
+ "Installation and configuration instructions included"
564
+ ],
565
+ "negative_signals": [
566
+ "No instructions for use documentation",
567
+ "README exists but missing required sections (purpose, limitations, risks)",
568
+ "No performance metrics or accuracy statements"
569
+ ],
570
+ "warning_message": "No Instructions for Use documentation found. Art. 13 requires providers to supply clear instructions enabling deployers to use high-risk AI correctly.",
571
+ "fix_suggestion": "Run 'ai-comply fix --instructions' to generate Instructions for Use template per Art. 13 requirements.",
572
+ "severity": "error"
573
+ }
574
+ },
575
+ {
576
+ "obligation_id": "eu-ai-act-OBL-008a",
577
+ "feature_type": "human-oversight",
578
+ "sdk_implementation": {
579
+ "description": null,
580
+ "middleware_behavior": null,
581
+ "data_to_log": [],
582
+ "user_facing_output": null,
583
+ "configuration_options": {},
584
+ "code_example": null
585
+ },
586
+ "cli_check": {
587
+ "what_to_scan": "Emergency stop / interrupt mechanism in AI system code",
588
+ "positive_signals": [
589
+ "Emergency stop function or endpoint defined",
590
+ "Kill switch or circuit breaker pattern in AI pipeline",
591
+ "Admin override API endpoint",
592
+ "Graceful shutdown mechanism for AI processing"
593
+ ],
594
+ "negative_signals": [
595
+ "No emergency stop or interrupt mechanism found",
596
+ "AI pipeline runs without any override capability",
597
+ "No admin API for system control",
598
+ "AI decisions execute automatically without intervention point"
599
+ ],
600
+ "warning_message": "No emergency stop mechanism found. Art. 14(4)(e) requires high-risk AI to have an interrupt or stop mechanism accessible to human overseers.",
601
+ "fix_suggestion": "Implement an emergency stop endpoint/function that immediately halts AI system processing. Add circuit breaker pattern to AI pipeline.",
602
+ "severity": "error"
603
+ }
604
+ },
605
+ {
606
+ "obligation_id": "eu-ai-act-OBL-009a",
607
+ "feature_type": "accuracy-check",
608
+ "sdk_implementation": {
609
+ "description": null,
610
+ "middleware_behavior": null,
611
+ "data_to_log": [],
612
+ "user_facing_output": null,
613
+ "configuration_options": {},
614
+ "code_example": null
615
+ },
616
+ "cli_check": {
617
+ "what_to_scan": "Accuracy metrics declaration and test results",
618
+ "positive_signals": [
619
+ "MODEL-CARD.md or model-metrics.* with accuracy/performance metrics",
620
+ "Test results with precision, recall, F1, or domain-specific metrics",
621
+ "Benchmark comparison against stated performance claims",
622
+ "Confidence intervals or uncertainty quantification"
623
+ ],
624
+ "negative_signals": [
625
+ "No accuracy metrics documented",
626
+ "Performance claims without supporting test data",
627
+ "No benchmark or evaluation dataset specified",
628
+ "Metrics only on training set, not on held-out test/validation set"
629
+ ],
630
+ "warning_message": "No accuracy metrics declaration found. Art. 15(1) requires high-risk AI providers to declare accuracy levels and test them with appropriate metrics.",
631
+ "fix_suggestion": "Add MODEL-CARD.md with accuracy metrics, test methodology, evaluation dataset description, and confidence intervals.",
632
+ "severity": "warning"
633
+ }
634
+ },
635
+ {
636
+ "obligation_id": "eu-ai-act-OBL-009b",
637
+ "feature_type": "cybersecurity-check",
638
+ "sdk_implementation": {
639
+ "description": null,
640
+ "middleware_behavior": null,
641
+ "data_to_log": [],
642
+ "user_facing_output": null,
643
+ "configuration_options": {},
644
+ "code_example": null
645
+ },
646
+ "cli_check": {
647
+ "what_to_scan": "Cybersecurity and adversarial robustness measures",
648
+ "positive_signals": [
649
+ "Input validation/sanitization on AI inputs",
650
+ "Rate limiting on AI endpoints",
651
+ "Prompt injection protection (for LLM-based systems)",
652
+ "Model access controls and authentication",
653
+ "Adversarial test results documented"
654
+ ],
655
+ "negative_signals": [
656
+ "No input validation on AI-facing endpoints",
657
+ "AI model accessible without authentication",
658
+ "No rate limiting on inference endpoints",
659
+ "No prompt injection or data poisoning mitigations",
660
+ "No adversarial robustness testing documented"
661
+ ],
662
+ "warning_message": "Insufficient cybersecurity measures for AI system. Art. 15(4) requires resilience against adversarial attacks including data poisoning and model manipulation.",
663
+ "fix_suggestion": "Add input validation, rate limiting, authentication on AI endpoints. Implement prompt injection protection for LLM systems. Document adversarial testing results.",
664
+ "severity": "warning"
665
+ }
666
+ },
667
+ {
668
+ "obligation_id": "eu-ai-act-OBL-011b",
669
+ "feature_type": "data-quality-check",
670
+ "sdk_implementation": {
671
+ "description": null,
672
+ "middleware_behavior": null,
673
+ "data_to_log": [],
674
+ "user_facing_output": null,
675
+ "configuration_options": {},
676
+ "code_example": null
677
+ },
678
+ "cli_check": {
679
+ "what_to_scan": "Input data validation for deployer-side data quality",
680
+ "positive_signals": [
681
+ "Input validation schemas defined (Zod, JSON Schema, etc.)",
682
+ "Data quality checks before AI system input",
683
+ "Data preprocessing pipeline with documented transformations"
684
+ ],
685
+ "negative_signals": [
686
+ "Raw user input passed directly to AI system without validation",
687
+ "No input schema or data quality checks",
688
+ "No data preprocessing or cleaning before AI consumption"
689
+ ],
690
+ "warning_message": "No input data quality checks found. Art. 26(4) requires deployers to ensure input data is relevant and representative for the system's intended purpose.",
691
+ "fix_suggestion": "Add input validation schema. Implement data quality checks before feeding data to AI system.",
692
+ "severity": "info"
693
+ }
694
+ },
695
+ {
696
+ "obligation_id": "eu-ai-act-OBL-011d",
697
+ "feature_type": "logging",
698
+ "sdk_implementation": {
699
+ "description": null,
700
+ "middleware_behavior": null,
701
+ "data_to_log": [],
702
+ "user_facing_output": null,
703
+ "configuration_options": {},
704
+ "code_example": null
705
+ },
706
+ "cli_check": {
707
+ "what_to_scan": "Deployer-side log retention configuration",
708
+ "positive_signals": [
709
+ "Log retention config >= 180 days",
710
+ "Log storage with access controls configured",
711
+ "Log backup or archival policy documented"
712
+ ],
713
+ "negative_signals": [
714
+ "Log retention < 180 days",
715
+ "No log retention configuration found",
716
+ "Log rotation set to delete logs prematurely",
717
+ "Logs stored without access controls"
718
+ ],
719
+ "warning_message": "Log retention appears insufficient. Art. 26(6) requires deployers to retain high-risk AI system logs for minimum 6 months (180 days).",
720
+ "fix_suggestion": "Set log retention to minimum 180 days. Configure secure log storage with access controls. Document retention policy.",
721
+ "severity": "error"
722
+ }
723
+ },
724
+ {
725
+ "obligation_id": "eu-ai-act-OBL-016a",
726
+ "feature_type": "content-marking",
727
+ "sdk_implementation": {
728
+ "description": "Embed C2PA/IPTC metadata in AI-generated images",
729
+ "middleware_behavior": "Post-processing: after image generation, inject C2PA manifest with AI provenance data",
730
+ "data_to_log": [
731
+ "image_hash",
732
+ "generation_model",
733
+ "timestamp",
734
+ "c2pa_manifest_id"
735
+ ],
736
+ "user_facing_output": "AI-generated images contain embedded C2PA metadata indicating artificial origin",
737
+ "configuration_options": {
738
+ "c2pa_enabled": "boolean, default true",
739
+ "watermark_visible": "boolean, default false (machine-readable only per Art. 50)",
740
+ "provider_attribution": "string, provider name in C2PA manifest"
741
+ },
742
+ "code_example": "import { signC2PA } from '@complior/content-marking';\nconst signedImage = await signC2PA(generatedImage, { model: 'dall-e-3', provider: 'OpenAI' });"
743
+ },
744
+ "cli_check": {
745
+ "what_to_scan": "Image generation pipeline for C2PA/watermark embedding",
746
+ "positive_signals": [
747
+ "C2PA library imported (c2pa-node, c2patool integration)",
748
+ "Post-processing step adding metadata to generated images",
749
+ "IPTC metadata fields populated on image output"
750
+ ],
751
+ "negative_signals": [
752
+ "Image generation without any metadata embedding",
753
+ "Generated images served directly without post-processing",
754
+ "EXIF/IPTC stripping in image processing pipeline"
755
+ ],
756
+ "warning_message": "AI-generated images lack C2PA/watermark metadata. Art. 50(2) requires machine-readable marking of AI-generated content.",
757
+ "fix_suggestion": "Add C2PA signing to image generation pipeline. Use @complior/content-marking or c2pa-node library.",
758
+ "severity": "error"
759
+ }
760
+ },
761
+ {
762
+ "obligation_id": "eu-ai-act-OBL-016b",
763
+ "feature_type": "content-marking",
764
+ "sdk_implementation": {
765
+ "description": null,
766
+ "middleware_behavior": null,
767
+ "data_to_log": [],
768
+ "user_facing_output": null,
769
+ "configuration_options": {},
770
+ "code_example": null
771
+ },
772
+ "cli_check": {
773
+ "what_to_scan": "Text generation pipeline for AI provenance metadata",
774
+ "positive_signals": [
775
+ "AI-generated text tagged with metadata (HTML meta, JSON field, header)",
776
+ "Content-Type or custom header indicating AI-generated text",
777
+ "Structured output includes 'ai_generated: true' field"
778
+ ],
779
+ "negative_signals": [
780
+ "AI-generated text returned as plain string without any metadata",
781
+ "No distinction between human-written and AI-generated text in output",
782
+ "API responses lack AI attribution fields"
783
+ ],
784
+ "warning_message": "AI-generated text lacks provenance metadata. Art. 50(2) requires machine-readable marking indicating content was artificially generated.",
785
+ "fix_suggestion": "Add 'ai_generated: true' field to text output JSON. Add X-AI-Generated header to API responses. Include AI attribution metadata in structured outputs.",
786
+ "severity": "warning"
787
+ }
788
+ },
789
+ {
790
+ "obligation_id": "eu-ai-act-OBL-017",
791
+ "feature_type": "transparency",
792
+ "sdk_implementation": {
793
+ "description": null,
794
+ "middleware_behavior": null,
795
+ "data_to_log": [],
796
+ "user_facing_output": null,
797
+ "configuration_options": {},
798
+ "code_example": null
799
+ },
800
+ "cli_check": {
801
+ "what_to_scan": "Notification mechanism for emotion recognition or biometric categorization",
802
+ "positive_signals": [
803
+ "User notification component before biometric/emotion processing",
804
+ "Consent mechanism for biometric data collection",
805
+ "Disclosure text mentioning emotion recognition or biometric categorization"
806
+ ],
807
+ "negative_signals": [
808
+ "Biometric processing without prior notification",
809
+ "Emotion recognition SDK imported without user notification UI",
810
+ "No consent mechanism for biometric data"
811
+ ],
812
+ "warning_message": "Emotion recognition or biometric categorization detected without user notification. Art. 50(3) requires informing exposed individuals.",
813
+ "fix_suggestion": "Add notification component before biometric processing. Implement consent mechanism. Display disclosure text explaining what biometric data is processed and why.",
814
+ "severity": "error"
815
+ }
816
+ },
817
+ {
818
+ "obligation_id": "eu-ai-act-OBL-018",
819
+ "feature_type": "content-marking",
820
+ "sdk_implementation": {
821
+ "description": null,
822
+ "middleware_behavior": null,
823
+ "data_to_log": [],
824
+ "user_facing_output": null,
825
+ "configuration_options": {},
826
+ "code_example": null
827
+ },
828
+ "cli_check": {
829
+ "what_to_scan": "Deepfake / synthetic media labeling mechanism",
830
+ "positive_signals": [
831
+ "Visible label on AI-generated video/audio output",
832
+ "C2PA metadata on synthetic media files",
833
+ "Watermark embedding in generated audio/video"
834
+ ],
835
+ "negative_signals": [
836
+ "Synthetic media generation without any labeling",
837
+ "Deepfake output served without disclosure",
838
+ "Audio/video generation pipeline without watermark step"
839
+ ],
840
+ "warning_message": "AI-generated deepfake content lacks labeling. Art. 50(4) requires deployers to disclose that content is artificially generated or manipulated.",
841
+ "fix_suggestion": "Add visible label and machine-readable metadata to all synthetic media outputs. Implement C2PA signing for generated audio/video.",
842
+ "severity": "error"
843
+ }
844
+ },
845
+ {
846
+ "obligation_id": "eu-ai-act-OBL-020",
847
+ "feature_type": "monitoring-check",
848
+ "sdk_implementation": {
849
+ "description": "Post-market monitoring data collection and alerting",
850
+ "middleware_behavior": "Collect performance metrics, user feedback, error rates continuously",
851
+ "data_to_log": [
852
+ "prediction_accuracy",
853
+ "error_rate",
854
+ "user_complaints",
855
+ "drift_metrics"
856
+ ],
857
+ "user_facing_output": "Monitoring dashboard showing system health and compliance metrics",
858
+ "configuration_options": {
859
+ "monitoring_interval": "string, default '1h'",
860
+ "alert_threshold_accuracy_drop": "number, default 0.05",
861
+ "alert_threshold_error_rate": "number, default 0.01"
862
+ },
863
+ "code_example": null
864
+ },
865
+ "cli_check": {
866
+ "what_to_scan": "Post-market monitoring infrastructure",
867
+ "positive_signals": [
868
+ "Monitoring configuration file (prometheus, datadog, custom)",
869
+ "Alert rules defined for AI performance metrics",
870
+ "POST-MARKET-MONITORING-PLAN.md or equivalent documentation",
871
+ "Feedback collection mechanism for users"
872
+ ],
873
+ "negative_signals": [
874
+ "No monitoring configuration for AI system performance",
875
+ "No alerting on model drift or accuracy degradation",
876
+ "No post-market monitoring plan documentation",
877
+ "No user feedback collection mechanism"
878
+ ],
879
+ "warning_message": "No post-market monitoring system found. Art. 72 requires providers of high-risk AI to establish and document a post-market monitoring system.",
880
+ "fix_suggestion": "Set up monitoring for AI performance metrics (accuracy, error rate, drift). Create POST-MARKET-MONITORING-PLAN.md. Configure alerts for degradation.",
881
+ "severity": "warning"
882
+ }
883
+ },
884
+ {
885
+ "obligation_id": "eu-ai-act-OBL-022b",
886
+ "feature_type": "documentation-check",
887
+ "sdk_implementation": {
888
+ "description": null,
889
+ "middleware_behavior": null,
890
+ "data_to_log": [],
891
+ "user_facing_output": null,
892
+ "configuration_options": {},
893
+ "code_example": null
894
+ },
895
+ "cli_check": {
896
+ "what_to_scan": "GPAI copyright compliance policy",
897
+ "positive_signals": [
898
+ "COPYRIGHT-POLICY.md or copyright-compliance.* document",
899
+ "Policy describes approach to rights holder opt-out mechanisms",
900
+ "Training data licensing documented"
901
+ ],
902
+ "negative_signals": [
903
+ "No copyright compliance policy",
904
+ "Training data used without license documentation",
905
+ "No opt-out mechanism for rights holders"
906
+ ],
907
+ "warning_message": "No copyright compliance policy found. Art. 53(1)(d) requires GPAI providers to have a policy to comply with EU copyright law including opt-out mechanisms.",
908
+ "fix_suggestion": "Create COPYRIGHT-POLICY.md documenting your approach to copyright compliance, training data licensing, and rights holder opt-out mechanisms.",
909
+ "severity": "warning"
910
+ }
911
+ },
912
+ {
913
+ "obligation_id": "eu-ai-act-OBL-022c",
914
+ "feature_type": "documentation-check",
915
+ "sdk_implementation": {
916
+ "description": null,
917
+ "middleware_behavior": null,
918
+ "data_to_log": [],
919
+ "user_facing_output": null,
920
+ "configuration_options": {},
921
+ "code_example": null
922
+ },
923
+ "cli_check": {
924
+ "what_to_scan": "GPAI training data summary publication",
925
+ "positive_signals": [
926
+ "TRAINING-DATA-SUMMARY.md or training-data.* documentation",
927
+ "Summary describes data sources at category level",
928
+ "Publication or public availability of summary"
929
+ ],
930
+ "negative_signals": [
931
+ "No training data summary",
932
+ "Training data undisclosed",
933
+ "Data sources described vaguely without actionable information"
934
+ ],
935
+ "warning_message": "No training data summary found. Art. 53(1)(d) requires GPAI providers to publish a sufficiently detailed summary of training data content.",
936
+ "fix_suggestion": "Create TRAINING-DATA-SUMMARY.md describing training data sources, categories, sizes, and processing. Follow the template provided by the AI Office.",
937
+ "severity": "warning"
938
+ }
939
+ },
940
+ {
941
+ "obligation_id": "eu-ai-act-OBL-023c",
942
+ "feature_type": "cybersecurity-check",
943
+ "sdk_implementation": {
944
+ "description": null,
945
+ "middleware_behavior": null,
946
+ "data_to_log": [],
947
+ "user_facing_output": null,
948
+ "configuration_options": {},
949
+ "code_example": null
950
+ },
951
+ "cli_check": {
952
+ "what_to_scan": "GPAI systemic risk cybersecurity measures",
953
+ "positive_signals": [
954
+ "Model access protected by authentication and authorization",
955
+ "Inference API rate-limited and monitored",
956
+ "Model weights encrypted at rest",
957
+ "Adversarial robustness test results documented",
958
+ "Incident response plan for model security breaches"
959
+ ],
960
+ "negative_signals": [
961
+ "Model API accessible without authentication",
962
+ "No rate limiting on model inference",
963
+ "Model weights stored unencrypted",
964
+ "No adversarial testing documented",
965
+ "No security incident response plan"
966
+ ],
967
+ "warning_message": "Insufficient cybersecurity for GPAI with systemic risk. Art. 55(1)(d) requires ensuring adequate level of cybersecurity protection.",
968
+ "fix_suggestion": "Implement: model access authentication, rate limiting, weight encryption, adversarial testing program, security incident response plan.",
969
+ "severity": "error"
970
+ }
971
+ },
972
+ {
973
+ "obligation_id": "eu-ai-act-OBL-026",
974
+ "feature_type": "traceability-check",
975
+ "sdk_implementation": {
976
+ "description": null,
977
+ "middleware_behavior": null,
978
+ "data_to_log": [],
979
+ "user_facing_output": null,
980
+ "configuration_options": {},
981
+ "code_example": null
982
+ },
983
+ "cli_check": {
984
+ "what_to_scan": "AI system inventory and version traceability",
985
+ "positive_signals": [
986
+ "AI-INVENTORY.md or ai-systems.json listing all AI components",
987
+ "Semantic versioning on AI models and systems",
988
+ "CHANGELOG.md with AI system changes documented",
989
+ "Git tags for AI model releases"
990
+ ],
991
+ "negative_signals": [
992
+ "No AI system inventory documentation",
993
+ "AI models deployed without version tracking",
994
+ "No changelog for AI system modifications",
995
+ "No traceability between model versions and deployments"
996
+ ],
997
+ "warning_message": "No AI system inventory or traceability found. Providers must maintain records of AI system versions, modifications, and deployment history.",
998
+ "fix_suggestion": "Create AI-INVENTORY.md listing all AI systems. Use semantic versioning for models. Maintain CHANGELOG.md for AI changes.",
999
+ "severity": "info"
1000
+ }
1001
+ },
1002
+ {
1003
+ "obligation_id": "eu-ai-act-OBL-029",
1004
+ "feature_type": "classification-check",
1005
+ "sdk_implementation": {
1006
+ "description": null,
1007
+ "middleware_behavior": null,
1008
+ "data_to_log": [],
1009
+ "user_facing_output": null,
1010
+ "configuration_options": {},
1011
+ "code_example": null
1012
+ },
1013
+ "cli_check": {
1014
+ "what_to_scan": "Substantial modification indicators in deployer codebase",
1015
+ "positive_signals": [
1016
+ "No custom model fine-tuning on top of provider model",
1017
+ "Using provider API as-is without significant output modification",
1018
+ "Clear documentation that system is used within provider's intended purpose"
1019
+ ],
1020
+ "negative_signals": [
1021
+ "Custom fine-tuning scripts on provider's base model",
1022
+ "Significant post-processing that changes AI system behavior",
1023
+ "System used for purpose different from provider's intended purpose",
1024
+ "Custom training data applied to modify model behavior"
1025
+ ],
1026
+ "warning_message": "Potential deployer-becomes-provider situation detected. Art. 25(1)(c): if a deployer substantially modifies a high-risk AI system or changes its intended purpose, they assume provider obligations including conformity assessment.",
1027
+ "fix_suggestion": "Review modifications against Art. 25 criteria. If substantial modification confirmed, assume provider obligations. Document assessment in MODIFICATION-ASSESSMENT.md.",
1028
+ "severity": "warning"
1029
+ }
1030
+ },
1031
+ {
1032
+ "obligation_id": "eu-ai-act-OBL-032",
1033
+ "feature_type": "documentation-check",
1034
+ "sdk_implementation": {
1035
+ "description": null,
1036
+ "middleware_behavior": null,
1037
+ "data_to_log": [],
1038
+ "user_facing_output": null,
1039
+ "configuration_options": {},
1040
+ "code_example": null
1041
+ },
1042
+ "cli_check": {
1043
+ "what_to_scan": "Open-source GPAI reduced documentation compliance",
1044
+ "positive_signals": [
1045
+ "Open-source license file (MIT, Apache, etc.)",
1046
+ "GPAI model card with training methodology description",
1047
+ "Model published on public repository with documentation",
1048
+ "No systemic risk classification (under 10^25 FLOPs)"
1049
+ ],
1050
+ "negative_signals": [
1051
+ "Open-source model without any documentation",
1052
+ "Missing model card despite GPAI classification",
1053
+ "Model exceeds systemic risk threshold but claims open-source exemption"
1054
+ ],
1055
+ "warning_message": "Open-source GPAI model with insufficient documentation. Art. 53(2) provides reduced obligations only if model is under systemic risk threshold and documentation is published.",
1056
+ "fix_suggestion": "Publish model card with: training methodology, data summary, evaluation results. Verify model is below systemic risk threshold (10^25 FLOPs).",
1057
+ "severity": "info"
1058
+ }
1059
+ },
1060
+ {
1061
+ "obligation_id": "eu-ai-act-OBL-011c",
1062
+ "feature_type": "incident-response",
1063
+ "sdk_implementation": {
1064
+ "description": null,
1065
+ "middleware_behavior": null,
1066
+ "data_to_log": [],
1067
+ "user_facing_output": null,
1068
+ "configuration_options": {},
1069
+ "code_example": null
1070
+ },
1071
+ "cli_check": {
1072
+ "what_to_scan": "Deployer incident response and system suspension procedures",
1073
+ "positive_signals": [
1074
+ "INCIDENT-RESPONSE.md or incident-response-plan.* documentation",
1075
+ "Suspension criteria defined for AI system",
1076
+ "Provider notification template or procedure",
1077
+ "Authority notification contact information documented"
1078
+ ],
1079
+ "negative_signals": [
1080
+ "No incident response documentation",
1081
+ "No defined criteria for system suspension",
1082
+ "No provider notification mechanism",
1083
+ "No contact information for market surveillance authority"
1084
+ ],
1085
+ "warning_message": "No AI incident response plan found. Art. 26(5) requires deployers to suspend high-risk AI if risk is identified and notify provider and authorities.",
1086
+ "fix_suggestion": "Create INCIDENT-RESPONSE.md with: suspension criteria, notification templates, authority contacts, escalation procedures.",
1087
+ "severity": "warning"
1088
+ }
1089
+ },
1090
+ {
1091
+ "obligation_id": "eu-ai-act-OBL-011e",
1092
+ "feature_type": "documentation-check",
1093
+ "sdk_implementation": {
1094
+ "description": null,
1095
+ "middleware_behavior": null,
1096
+ "data_to_log": [],
1097
+ "user_facing_output": null,
1098
+ "configuration_options": {},
1099
+ "code_example": null
1100
+ },
1101
+ "cli_check": {
1102
+ "what_to_scan": "Provider instructions for use archived by deployer",
1103
+ "positive_signals": [
1104
+ "Vendor documentation directory (vendor-docs/, provider-docs/)",
1105
+ "Provider instructions for use (PDF, MD) present in project",
1106
+ "Documentation references provider-specific configuration"
1107
+ ],
1108
+ "negative_signals": [
1109
+ "No vendor or provider documentation directory",
1110
+ "No provider instructions for use found in project",
1111
+ "AI system configured without reference to provider guidance"
1112
+ ],
1113
+ "warning_message": "No provider instructions for use found. Art. 26(1) requires deployers to obtain and follow provider's instructions for use of high-risk AI systems.",
1114
+ "fix_suggestion": "Create vendor-docs/ directory. Archive provider's instructions for use. Reference in system configuration documentation.",
1115
+ "severity": "info"
1116
+ }
1117
+ },
1118
+ {
1119
+ "obligation_id": "eu-ai-act-OBL-013a",
1120
+ "feature_type": "documentation-check",
1121
+ "sdk_implementation": {
1122
+ "description": null,
1123
+ "middleware_behavior": null,
1124
+ "data_to_log": [],
1125
+ "user_facing_output": null,
1126
+ "configuration_options": {},
1127
+ "code_example": null
1128
+ },
1129
+ "cli_check": {
1130
+ "what_to_scan": "FRIA aligned with existing GDPR DPIA",
1131
+ "positive_signals": [
1132
+ "Both DPIA and FRIA documents present",
1133
+ "FRIA cross-references DPIA findings",
1134
+ "FRIA covers fundamental rights beyond data protection"
1135
+ ],
1136
+ "negative_signals": [
1137
+ "FRIA present without DPIA reference (if DPIA exists)",
1138
+ "DPIA present but no FRIA for high-risk AI deployer",
1139
+ "FRIA covers only data protection rights (duplicating DPIA without extending)"
1140
+ ],
1141
+ "warning_message": "FRIA should complement existing GDPR DPIA per Art. 27(4). Ensure FRIA cross-references DPIA and extends to cover all fundamental rights.",
1142
+ "fix_suggestion": "Create FRIA that cross-references existing DPIA. Add sections for: non-discrimination, dignity, expression, effective remedy, children's rights, workers' rights.",
1143
+ "severity": "info"
1144
+ }
1145
+ },
1146
+ {
1147
+ "obligation_id": "eu-ai-act-OBL-002b",
1148
+ "feature_type": "prohibited-practice-scan",
1149
+ "sdk_implementation": {
1150
+ "description": null,
1151
+ "middleware_behavior": null,
1152
+ "data_to_log": [],
1153
+ "user_facing_output": null,
1154
+ "configuration_options": {},
1155
+ "code_example": null
1156
+ },
1157
+ "cli_check": {
1158
+ "what_to_scan": "Code patterns exploiting vulnerable groups (age, disability, economic)",
1159
+ "positive_signals": [
1160
+ "Age verification before AI interaction",
1161
+ "Vulnerability safeguards in user segmentation",
1162
+ "No targeting based on disability/economic status"
1163
+ ],
1164
+ "negative_signals": [
1165
+ "User segmentation by age/disability/economic status for differential AI behavior",
1166
+ "Targeting minors or elderly with AI-driven persuasion",
1167
+ "Exploiting economic vulnerability indicators in AI recommendations"
1168
+ ],
1169
+ "warning_message": "Potential exploitation of vulnerable groups detected. Art. 5(1)(b) prohibits AI exploiting vulnerabilities due to age, disability, or social/economic situation.",
1170
+ "fix_suggestion": "Remove vulnerability-based targeting. Add safeguards for vulnerable user groups. Implement age verification where applicable.",
1171
+ "severity": "error"
1172
+ }
1173
+ },
1174
+ {
1175
+ "obligation_id": "eu-ai-act-OBL-002c",
1176
+ "feature_type": "prohibited-practice-scan",
1177
+ "sdk_implementation": {
1178
+ "description": null,
1179
+ "middleware_behavior": null,
1180
+ "data_to_log": [],
1181
+ "user_facing_output": null,
1182
+ "configuration_options": {},
1183
+ "code_example": null
1184
+ },
1185
+ "cli_check": {
1186
+ "what_to_scan": "Social scoring patterns aggregating behavior across contexts",
1187
+ "positive_signals": [
1188
+ "No cross-context behavioral scoring",
1189
+ "Scoring limited to relevant context only",
1190
+ "No access restriction based on behavioral scores"
1191
+ ],
1192
+ "negative_signals": [
1193
+ "Cross-context behavior aggregation into unified score",
1194
+ "User scores affecting unrelated service access",
1195
+ "Social behavior data merged across domains"
1196
+ ],
1197
+ "warning_message": "Potential social scoring system detected. Art. 5(1)(c) prohibits evaluating persons based on social behavior leading to detrimental treatment in unrelated contexts.",
1198
+ "fix_suggestion": "Ensure scoring is context-specific. Do not aggregate behavior across unrelated domains. Do not restrict service access based on behavioral scores.",
1199
+ "severity": "error"
1200
+ }
1201
+ },
1202
+ {
1203
+ "obligation_id": "eu-ai-act-OBL-002d",
1204
+ "feature_type": "prohibited-practice-scan",
1205
+ "sdk_implementation": {
1206
+ "description": null,
1207
+ "middleware_behavior": null,
1208
+ "data_to_log": [],
1209
+ "user_facing_output": null,
1210
+ "configuration_options": {},
1211
+ "code_example": null
1212
+ },
1213
+ "cli_check": {
1214
+ "what_to_scan": "Criminal risk profiling based on demographics or personality",
1215
+ "positive_signals": [
1216
+ "No criminal risk assessment functionality",
1217
+ "Risk assessment based on objective verifiable facts only"
1218
+ ],
1219
+ "negative_signals": [
1220
+ "Criminal risk prediction based on demographics",
1221
+ "Personality trait-based risk scoring",
1222
+ "Profiling without objective fact basis"
1223
+ ],
1224
+ "warning_message": "Potential criminal risk profiling detected. Art. 5(1)(d) prohibits assessing criminal risk based solely on profiling or personality traits.",
1225
+ "fix_suggestion": "Remove demographic/personality-based criminal profiling. If risk assessment needed, base on objective verifiable facts only.",
1226
+ "severity": "error"
1227
+ }
1228
+ },
1229
+ {
1230
+ "obligation_id": "eu-ai-act-OBL-002e",
1231
+ "feature_type": "prohibited-practice-scan",
1232
+ "sdk_implementation": {
1233
+ "description": null,
1234
+ "middleware_behavior": null,
1235
+ "data_to_log": [],
1236
+ "user_facing_output": null,
1237
+ "configuration_options": {},
1238
+ "code_example": null
1239
+ },
1240
+ "cli_check": {
1241
+ "what_to_scan": "Untargeted facial image collection or scraping patterns",
1242
+ "positive_signals": [
1243
+ "No facial image collection functionality",
1244
+ "Facial data processing with explicit consent only",
1245
+ "No internet or CCTV scraping"
1246
+ ],
1247
+ "negative_signals": [
1248
+ "Web scraping for facial images (BeautifulSoup/Scrapy + face detection)",
1249
+ "Bulk image download from social media",
1250
+ "CCTV feed processing for facial recognition database building"
1251
+ ],
1252
+ "warning_message": "Potential untargeted facial scraping detected. Art. 5(1)(e) prohibits creating or expanding facial recognition databases through untargeted scraping.",
1253
+ "fix_suggestion": "Remove facial image scraping. Use only consensual, targeted facial data collection with documented lawful basis.",
1254
+ "severity": "error"
1255
+ }
1256
+ },
1257
+ {
1258
+ "obligation_id": "eu-ai-act-OBL-002g",
1259
+ "feature_type": "prohibited-practice-scan",
1260
+ "sdk_implementation": {
1261
+ "description": null,
1262
+ "middleware_behavior": null,
1263
+ "data_to_log": [],
1264
+ "user_facing_output": null,
1265
+ "configuration_options": {},
1266
+ "code_example": null
1267
+ },
1268
+ "cli_check": {
1269
+ "what_to_scan": "Biometric categorization by sensitive characteristics",
1270
+ "positive_signals": [
1271
+ "No biometric categorization functionality",
1272
+ "No sensitive attribute inference from biometric data"
1273
+ ],
1274
+ "negative_signals": [
1275
+ "Biometric data used to infer race, religion, political opinion",
1276
+ "Facial analysis for ethnicity classification",
1277
+ "Voice analysis for sensitive characteristic inference"
1278
+ ],
1279
+ "warning_message": "Potential biometric categorization by sensitive characteristics. Art. 5(1)(g) prohibits using biometric data to categorize persons by race, political opinions, religion, sex life, or sexual orientation.",
1280
+ "fix_suggestion": "Remove sensitive characteristic inference from biometric processing. Do not classify individuals by protected characteristics using biometric data.",
1281
+ "severity": "error"
1282
+ }
1283
+ },
1284
+ {
1285
+ "obligation_id": "eu-ai-act-OBL-003a",
1286
+ "feature_type": "documentation-check",
1287
+ "sdk_implementation": {
1288
+ "description": null,
1289
+ "middleware_behavior": null,
1290
+ "data_to_log": [],
1291
+ "user_facing_output": null,
1292
+ "configuration_options": {},
1293
+ "code_example": null
1294
+ },
1295
+ "cli_check": {
1296
+ "what_to_scan": "Risk identification and analysis documentation",
1297
+ "positive_signals": [
1298
+ "Risk register with identified risks",
1299
+ "Severity and likelihood ratings for each risk",
1300
+ "Mitigation measures documented per risk"
1301
+ ],
1302
+ "negative_signals": [
1303
+ "No risk register or risk analysis documentation",
1304
+ "Risks identified without severity ratings",
1305
+ "No mitigation measures for identified risks"
1306
+ ],
1307
+ "warning_message": "No risk identification/analysis documentation found. Art. 9(2)(a) requires identifying and analyzing known and reasonably foreseeable risks.",
1308
+ "fix_suggestion": "Create risk register documenting: each identified risk, severity, likelihood, affected persons, mitigation measures.",
1309
+ "severity": "warning"
1310
+ }
1311
+ },
1312
+ {
1313
+ "obligation_id": "eu-ai-act-OBL-003b",
1314
+ "feature_type": "documentation-check",
1315
+ "sdk_implementation": {
1316
+ "description": null,
1317
+ "middleware_behavior": null,
1318
+ "data_to_log": [],
1319
+ "user_facing_output": null,
1320
+ "configuration_options": {},
1321
+ "code_example": null
1322
+ },
1323
+ "cli_check": {
1324
+ "what_to_scan": "Misuse risk evaluation documentation",
1325
+ "positive_signals": [
1326
+ "Misuse scenario documentation",
1327
+ "Foreseeable misuse cases analyzed",
1328
+ "Mitigations for misuse scenarios documented"
1329
+ ],
1330
+ "negative_signals": [
1331
+ "No misuse scenarios documented",
1332
+ "Only intended use documented without misuse analysis",
1333
+ "No mitigations for foreseeable misuse"
1334
+ ],
1335
+ "warning_message": "No misuse risk evaluation found. Art. 9(2)(b) requires evaluating risks from reasonably foreseeable misuse.",
1336
+ "fix_suggestion": "Document at least 5 foreseeable misuse scenarios with analysis and mitigations.",
1337
+ "severity": "warning"
1338
+ }
1339
+ },
1340
+ {
1341
+ "obligation_id": "eu-ai-act-OBL-020a",
1342
+ "feature_type": "documentation-check",
1343
+ "sdk_implementation": {
1344
+ "description": null,
1345
+ "middleware_behavior": null,
1346
+ "data_to_log": [],
1347
+ "user_facing_output": null,
1348
+ "configuration_options": {},
1349
+ "code_example": null
1350
+ },
1351
+ "cli_check": {
1352
+ "what_to_scan": "Corrective action and withdrawal procedures",
1353
+ "positive_signals": [
1354
+ "CORRECTIVE-ACTIONS.md or corrective-action-policy.*",
1355
+ "Procedure for withdrawing non-compliant AI system",
1356
+ "Authority notification process for corrective actions"
1357
+ ],
1358
+ "negative_signals": [
1359
+ "No corrective action procedures",
1360
+ "No withdrawal process documented",
1361
+ "No authority notification for non-compliance discovered"
1362
+ ],
1363
+ "warning_message": "No corrective action procedures found. Art. 20 requires providers to take corrective actions including withdrawal when AI system is non-compliant.",
1364
+ "fix_suggestion": "Document corrective action procedures: identification, assessment, action, notification, verification.",
1365
+ "severity": "info"
1366
+ }
1367
+ },
1368
+ {
1369
+ "obligation_id": "eu-ai-act-OBL-022a",
1370
+ "feature_type": "documentation-check",
1371
+ "sdk_implementation": {
1372
+ "description": null,
1373
+ "middleware_behavior": null,
1374
+ "data_to_log": [],
1375
+ "user_facing_output": null,
1376
+ "configuration_options": {},
1377
+ "code_example": null
1378
+ },
1379
+ "cli_check": {
1380
+ "what_to_scan": "GPAI downstream provider information (Annex XII)",
1381
+ "positive_signals": [
1382
+ "DOWNSTREAM-INFO.md or annex-xii.* documentation",
1383
+ "Model capabilities and limitations documented for integrators",
1384
+ "Integration guidelines with compliance requirements for downstream use"
1385
+ ],
1386
+ "negative_signals": [
1387
+ "No downstream provider information",
1388
+ "Model distributed without integration compliance guidance",
1389
+ "No documentation of model limitations for downstream providers"
1390
+ ],
1391
+ "warning_message": "No downstream provider information found. Art. 53(1)(b) requires GPAI providers to supply Annex XII information to downstream providers integrating the model.",
1392
+ "fix_suggestion": "Create DOWNSTREAM-INFO.md documenting: model capabilities, limitations, intended downstream uses, compliance requirements for integrators.",
1393
+ "severity": "warning"
1394
+ }
1395
+ },
1396
+ {
1397
+ "obligation_id": "eu-ai-act-OBL-008b",
1398
+ "feature_type": "human-oversight",
1399
+ "sdk_implementation": {
1400
+ "description": null,
1401
+ "middleware_behavior": null,
1402
+ "data_to_log": [],
1403
+ "user_facing_output": null,
1404
+ "configuration_options": {},
1405
+ "code_example": null
1406
+ },
1407
+ "cli_check": {
1408
+ "what_to_scan": "Biometric identification double verification mechanism",
1409
+ "positive_signals": [
1410
+ "Two-step verification for biometric identification results",
1411
+ "Human confirmation required before biometric match action",
1412
+ "No automated action on single biometric match"
1413
+ ],
1414
+ "negative_signals": [
1415
+ "Automated action on single biometric match without human verification",
1416
+ "No confirmation step after biometric identification",
1417
+ "Direct decision based on biometric match alone"
1418
+ ],
1419
+ "warning_message": "No double verification for biometric identification. Art. 14(5) requires at least two natural persons to verify biometric identification results before action.",
1420
+ "fix_suggestion": "Implement two-step human verification: biometric match must be confirmed by second person before any action is taken.",
1421
+ "severity": "error"
1422
+ }
1423
+ },
1424
+ {
1425
+ "obligation_id": "eu-ai-act-OBL-004",
1426
+ "feature_type": "data-governance-check",
1427
+ "sdk_implementation": {
1428
+ "description": "Data quality validation middleware for training pipelines",
1429
+ "middleware_behavior": "Pre-training validation: check data completeness, balance, and bias indicators",
1430
+ "data_to_log": [
1431
+ "data_source",
1432
+ "sample_count",
1433
+ "class_distribution",
1434
+ "bias_metrics"
1435
+ ],
1436
+ "user_facing_output": null,
1437
+ "configuration_options": {},
1438
+ "code_example": null
1439
+ },
1440
+ "cli_check": {
1441
+ "what_to_scan": "Training data quality and governance infrastructure",
1442
+ "positive_signals": [
1443
+ "Data quality validation scripts in training pipeline",
1444
+ "Dataset documentation (datasheet, data card)",
1445
+ "Bias testing in data preprocessing",
1446
+ "Data versioning (DVC, MLflow, etc.)"
1447
+ ],
1448
+ "negative_signals": [
1449
+ "No data validation in training pipeline",
1450
+ "Undocumented training data sources",
1451
+ "No bias checking on training data",
1452
+ "No data versioning or tracking"
1453
+ ],
1454
+ "warning_message": "No training data governance found. Art. 10 requires providers to use high-quality training data with appropriate governance measures including bias examination.",
1455
+ "fix_suggestion": "Add data validation pipeline. Create dataset documentation. Implement bias checking. Use data versioning (DVC or similar).",
1456
+ "severity": "warning"
1457
+ }
1458
+ },
1459
+ {
1460
+ "obligation_id": "eu-ai-act-OBL-009",
1461
+ "feature_type": "accuracy-robustness-check",
1462
+ "sdk_implementation": {
1463
+ "description": "Accuracy and robustness testing framework",
1464
+ "middleware_behavior": null,
1465
+ "data_to_log": [
1466
+ "accuracy_metrics",
1467
+ "robustness_score",
1468
+ "test_date"
1469
+ ],
1470
+ "user_facing_output": null,
1471
+ "configuration_options": {},
1472
+ "code_example": null
1473
+ },
1474
+ "cli_check": {
1475
+ "what_to_scan": "Accuracy, robustness, and cybersecurity measures for AI system",
1476
+ "positive_signals": [
1477
+ "Benchmark test suite with accuracy metrics",
1478
+ "Adversarial robustness testing",
1479
+ "Input validation and sanitization",
1480
+ "Model versioning with performance tracking",
1481
+ "Security headers on AI endpoints"
1482
+ ],
1483
+ "negative_signals": [
1484
+ "No accuracy benchmarks or test suites",
1485
+ "No adversarial or robustness testing",
1486
+ "No input validation on AI inputs",
1487
+ "AI model deployed without performance metrics",
1488
+ "No cybersecurity measures on AI endpoints"
1489
+ ],
1490
+ "warning_message": "Insufficient accuracy, robustness, or cybersecurity measures. Art. 15 requires high-risk AI to achieve appropriate levels of accuracy, robustness, and cybersecurity.",
1491
+ "fix_suggestion": "Implement: accuracy benchmarks with held-out test set, adversarial testing, input validation, model versioning, endpoint security.",
1492
+ "severity": "error"
1493
+ }
1494
+ },
1495
+ {
1496
+ "obligation_id": "eu-ai-act-OBL-023",
1497
+ "feature_type": "gpai-evaluation",
1498
+ "sdk_implementation": {
1499
+ "description": "GPAI systemic risk evaluation and adversarial testing framework",
1500
+ "middleware_behavior": null,
1501
+ "data_to_log": [
1502
+ "evaluation_results",
1503
+ "red_team_findings",
1504
+ "test_date"
1505
+ ],
1506
+ "user_facing_output": null,
1507
+ "configuration_options": {},
1508
+ "code_example": null
1509
+ },
1510
+ "cli_check": {
1511
+ "what_to_scan": "GPAI model evaluation and adversarial testing infrastructure",
1512
+ "positive_signals": [
1513
+ "Model evaluation suite with standardized benchmarks",
1514
+ "Red-teaming or adversarial testing results documented",
1515
+ "Safety testing (OWASP LLM Top 10 or equivalent)",
1516
+ "Evaluation results published or available",
1517
+ "Systemic risk assessment documentation"
1518
+ ],
1519
+ "negative_signals": [
1520
+ "No model evaluation suite",
1521
+ "No adversarial or red-team testing",
1522
+ "No safety benchmark results",
1523
+ "GPAI model deployed without documented evaluation",
1524
+ "No systemic risk assessment for high-capability model"
1525
+ ],
1526
+ "warning_message": "No GPAI model evaluation found. Art. 55(1)(a) requires GPAI providers with systemic risk to perform model evaluations including adversarial testing.",
1527
+ "fix_suggestion": "Implement: standardized model evaluation benchmarks, red-teaming program, safety testing per OWASP LLM Top 10. Document all results.",
1528
+ "severity": "error"
1529
+ }
1530
+ },
1531
+ {
1532
+ "obligation_id": "eu-ai-act-OBL-033",
1533
+ "feature_type": "compliance-check",
1534
+ "sdk_implementation": {
1535
+ "description": null,
1536
+ "middleware_behavior": null,
1537
+ "data_to_log": [],
1538
+ "user_facing_output": null,
1539
+ "configuration_options": {},
1540
+ "code_example": null
1541
+ },
1542
+ "cli_check": {
1543
+ "what_to_scan": "Compliance check: Assess High-Risk Classification of AI System",
1544
+ "positive_signals": [
1545
+ "Documentation for Assess High-Risk Classification of AI System",
1546
+ "Evidence of obligation fulfillment"
1547
+ ],
1548
+ "negative_signals": [
1549
+ "No documentation for Assess High-Risk Classification of AI System",
1550
+ "No evidence of compliance"
1551
+ ],
1552
+ "warning_message": "Compliance gap: Assess High-Risk Classification of AI System. Review obligation requirements.",
1553
+ "fix_suggestion": "Address Assess High-Risk Classification of AI System per obligation requirements.",
1554
+ "severity": "warning"
1555
+ }
1556
+ },
1557
+ {
1558
+ "obligation_id": "eu-ai-act-OBL-033a",
1559
+ "feature_type": "compliance-check",
1560
+ "sdk_implementation": {
1561
+ "description": null,
1562
+ "middleware_behavior": null,
1563
+ "data_to_log": [],
1564
+ "user_facing_output": null,
1565
+ "configuration_options": {},
1566
+ "code_example": null
1567
+ },
1568
+ "cli_check": {
1569
+ "what_to_scan": "Compliance check: Document Art. 6(3) Non-High-Risk Exception",
1570
+ "positive_signals": [
1571
+ "Documentation for Document Art. 6(3) Non-High-Risk Exception",
1572
+ "Evidence of obligation fulfillment"
1573
+ ],
1574
+ "negative_signals": [
1575
+ "No documentation for Document Art. 6(3) Non-High-Risk Exception",
1576
+ "No evidence of compliance"
1577
+ ],
1578
+ "warning_message": "Compliance gap: Document Art. 6(3) Non-High-Risk Exception. Review obligation requirements.",
1579
+ "fix_suggestion": "Address Document Art. 6(3) Non-High-Risk Exception per obligation requirements.",
1580
+ "severity": "warning"
1581
+ }
1582
+ },
1583
+ {
1584
+ "obligation_id": "eu-ai-act-OBL-034",
1585
+ "feature_type": "compliance-check",
1586
+ "sdk_implementation": {
1587
+ "description": null,
1588
+ "middleware_behavior": null,
1589
+ "data_to_log": [],
1590
+ "user_facing_output": null,
1591
+ "configuration_options": {},
1592
+ "code_example": null
1593
+ },
1594
+ "cli_check": {
1595
+ "what_to_scan": "Compliance check: Provider: Master Compliance Checklist for High-Risk AI",
1596
+ "positive_signals": [
1597
+ "Documentation for Provider: Master Compliance Checklist for High-Risk AI",
1598
+ "Evidence of obligation fulfillment"
1599
+ ],
1600
+ "negative_signals": [
1601
+ "No documentation for Provider: Master Compliance Checklist for High-Risk AI",
1602
+ "No evidence of compliance"
1603
+ ],
1604
+ "warning_message": "Compliance gap: Provider: Master Compliance Checklist for High-Risk AI. Review obligation requirements.",
1605
+ "fix_suggestion": "Address Provider: Master Compliance Checklist for High-Risk AI per obligation requirements.",
1606
+ "severity": "warning"
1607
+ }
1608
+ },
1609
+ {
1610
+ "obligation_id": "eu-ai-act-OBL-010a",
1611
+ "feature_type": "compliance-check",
1612
+ "sdk_implementation": {
1613
+ "description": null,
1614
+ "middleware_behavior": null,
1615
+ "data_to_log": [],
1616
+ "user_facing_output": null,
1617
+ "configuration_options": {},
1618
+ "code_example": null
1619
+ },
1620
+ "cli_check": {
1621
+ "what_to_scan": "Compliance check: QMS: Document All Required Procedures",
1622
+ "positive_signals": [
1623
+ "Documentation for QMS: Document All Required Procedures",
1624
+ "Evidence of obligation fulfillment"
1625
+ ],
1626
+ "negative_signals": [
1627
+ "No documentation for QMS: Document All Required Procedures",
1628
+ "No evidence of compliance"
1629
+ ],
1630
+ "warning_message": "Compliance gap: QMS: Document All Required Procedures. Review obligation requirements.",
1631
+ "fix_suggestion": "Address QMS: Document All Required Procedures per obligation requirements.",
1632
+ "severity": "warning"
1633
+ }
1634
+ },
1635
+ {
1636
+ "obligation_id": "eu-ai-act-OBL-035",
1637
+ "feature_type": "compliance-check",
1638
+ "sdk_implementation": {
1639
+ "description": null,
1640
+ "middleware_behavior": null,
1641
+ "data_to_log": [],
1642
+ "user_facing_output": null,
1643
+ "configuration_options": {},
1644
+ "code_example": null
1645
+ },
1646
+ "cli_check": {
1647
+ "what_to_scan": "Compliance check: Provide Information to Authorities Upon Reasoned Request",
1648
+ "positive_signals": [
1649
+ "Documentation for Provide Information to Authorities Upon Reasoned Request",
1650
+ "Evidence of obligation fulfillment"
1651
+ ],
1652
+ "negative_signals": [
1653
+ "No documentation for Provide Information to Authorities Upon Reasoned Request",
1654
+ "No evidence of compliance"
1655
+ ],
1656
+ "warning_message": "Compliance gap: Provide Information to Authorities Upon Reasoned Request. Review obligation requirements.",
1657
+ "fix_suggestion": "Address Provide Information to Authorities Upon Reasoned Request per obligation requirements.",
1658
+ "severity": "warning"
1659
+ }
1660
+ },
1661
+ {
1662
+ "obligation_id": "eu-ai-act-OBL-036",
1663
+ "feature_type": "compliance-check",
1664
+ "sdk_implementation": {
1665
+ "description": null,
1666
+ "middleware_behavior": null,
1667
+ "data_to_log": [],
1668
+ "user_facing_output": null,
1669
+ "configuration_options": {},
1670
+ "code_example": null
1671
+ },
1672
+ "cli_check": {
1673
+ "what_to_scan": "Compliance check: Recognize When You Become a Provider (Value Chain Liability)",
1674
+ "positive_signals": [
1675
+ "Documentation for Recognize When You Become a Provider (Value Chain Liability)",
1676
+ "Evidence of obligation fulfillment"
1677
+ ],
1678
+ "negative_signals": [
1679
+ "No documentation for Recognize When You Become a Provider (Value Chain Liability)",
1680
+ "No evidence of compliance"
1681
+ ],
1682
+ "warning_message": "Compliance gap: Recognize When You Become a Provider (Value Chain Liability). Review obligation requirements.",
1683
+ "fix_suggestion": "Address Recognize When You Become a Provider (Value Chain Liability) per obligation requirements.",
1684
+ "severity": "warning"
1685
+ }
1686
+ },
1687
+ {
1688
+ "obligation_id": "eu-ai-act-OBL-037",
1689
+ "feature_type": "compliance-check",
1690
+ "sdk_implementation": {
1691
+ "description": null,
1692
+ "middleware_behavior": null,
1693
+ "data_to_log": [],
1694
+ "user_facing_output": null,
1695
+ "configuration_options": {},
1696
+ "code_example": null
1697
+ },
1698
+ "cli_check": {
1699
+ "what_to_scan": "Compliance check: Affix CE Marking to High-Risk AI System",
1700
+ "positive_signals": [
1701
+ "Documentation for Affix CE Marking to High-Risk AI System",
1702
+ "Evidence of obligation fulfillment"
1703
+ ],
1704
+ "negative_signals": [
1705
+ "No documentation for Affix CE Marking to High-Risk AI System",
1706
+ "No evidence of compliance"
1707
+ ],
1708
+ "warning_message": "Compliance gap: Affix CE Marking to High-Risk AI System. Review obligation requirements.",
1709
+ "fix_suggestion": "Address Affix CE Marking to High-Risk AI System per obligation requirements.",
1710
+ "severity": "warning"
1711
+ }
1712
+ },
1713
+ {
1714
+ "obligation_id": "eu-ai-act-OBL-014a",
1715
+ "feature_type": "compliance-check",
1716
+ "sdk_implementation": {
1717
+ "description": null,
1718
+ "middleware_behavior": null,
1719
+ "data_to_log": [],
1720
+ "user_facing_output": null,
1721
+ "configuration_options": {},
1722
+ "code_example": null
1723
+ },
1724
+ "cli_check": {
1725
+ "what_to_scan": "Compliance check: Register Self and System in EU Database Before Deployment",
1726
+ "positive_signals": [
1727
+ "Documentation for Register Self and System in EU Database Before Deployment",
1728
+ "Evidence of obligation fulfillment"
1729
+ ],
1730
+ "negative_signals": [
1731
+ "No documentation for Register Self and System in EU Database Before Deployment",
1732
+ "No evidence of compliance"
1733
+ ],
1734
+ "warning_message": "Compliance gap: Register Self and System in EU Database Before Deployment. Review obligation requirements.",
1735
+ "fix_suggestion": "Address Register Self and System in EU Database Before Deployment per obligation requirements.",
1736
+ "severity": "warning"
1737
+ }
1738
+ },
1739
+ {
1740
+ "obligation_id": "eu-ai-act-OBL-020b",
1741
+ "feature_type": "compliance-check",
1742
+ "sdk_implementation": {
1743
+ "description": null,
1744
+ "middleware_behavior": null,
1745
+ "data_to_log": [],
1746
+ "user_facing_output": null,
1747
+ "configuration_options": {},
1748
+ "code_example": null
1749
+ },
1750
+ "cli_check": {
1751
+ "what_to_scan": "Compliance check: Post-Market Monitoring: Active Systematic Data Collection",
1752
+ "positive_signals": [
1753
+ "Documentation for Post-Market Monitoring: Active Systematic Data Collection",
1754
+ "Evidence of obligation fulfillment"
1755
+ ],
1756
+ "negative_signals": [
1757
+ "No documentation for Post-Market Monitoring: Active Systematic Data Collection",
1758
+ "No evidence of compliance"
1759
+ ],
1760
+ "warning_message": "Compliance gap: Post-Market Monitoring: Active Systematic Data Collection. Review obligation requirements.",
1761
+ "fix_suggestion": "Address Post-Market Monitoring: Active Systematic Data Collection per obligation requirements.",
1762
+ "severity": "warning"
1763
+ }
1764
+ },
1765
+ {
1766
+ "obligation_id": "eu-ai-act-OBL-030a",
1767
+ "feature_type": "compliance-check",
1768
+ "sdk_implementation": {
1769
+ "description": null,
1770
+ "middleware_behavior": null,
1771
+ "data_to_log": [],
1772
+ "user_facing_output": null,
1773
+ "configuration_options": {},
1774
+ "code_example": null
1775
+ },
1776
+ "cli_check": {
1777
+ "what_to_scan": "Compliance check: Inform Affected Persons of Right to Complaint to Authorities",
1778
+ "positive_signals": [
1779
+ "Documentation for Inform Affected Persons of Right to Complaint to Authorities",
1780
+ "Evidence of obligation fulfillment"
1781
+ ],
1782
+ "negative_signals": [
1783
+ "No documentation for Inform Affected Persons of Right to Complaint to Authorities",
1784
+ "No evidence of compliance"
1785
+ ],
1786
+ "warning_message": "Compliance gap: Inform Affected Persons of Right to Complaint to Authorities. Review obligation requirements.",
1787
+ "fix_suggestion": "Address Inform Affected Persons of Right to Complaint to Authorities per obligation requirements.",
1788
+ "severity": "warning"
1789
+ }
1790
+ },
1791
+ {
1792
+ "obligation_id": "eu-ai-act-OBL-039",
1793
+ "feature_type": "compliance-check",
1794
+ "sdk_implementation": {
1795
+ "description": null,
1796
+ "middleware_behavior": null,
1797
+ "data_to_log": [],
1798
+ "user_facing_output": null,
1799
+ "configuration_options": {},
1800
+ "code_example": null
1801
+ },
1802
+ "cli_check": {
1803
+ "what_to_scan": "Compliance check: Complete Correct Conformity Assessment Procedure",
1804
+ "positive_signals": [
1805
+ "Documentation for Complete Correct Conformity Assessment Procedure",
1806
+ "Evidence of obligation fulfillment"
1807
+ ],
1808
+ "negative_signals": [
1809
+ "No documentation for Complete Correct Conformity Assessment Procedure",
1810
+ "No evidence of compliance"
1811
+ ],
1812
+ "warning_message": "Compliance gap: Complete Correct Conformity Assessment Procedure. Review obligation requirements.",
1813
+ "fix_suggestion": "Address Complete Correct Conformity Assessment Procedure per obligation requirements.",
1814
+ "severity": "warning"
1815
+ }
1816
+ },
1817
+ {
1818
+ "obligation_id": "eu-ai-act-OBL-006b",
1819
+ "feature_type": "compliance-check",
1820
+ "sdk_implementation": {
1821
+ "description": null,
1822
+ "middleware_behavior": null,
1823
+ "data_to_log": [],
1824
+ "user_facing_output": null,
1825
+ "configuration_options": {},
1826
+ "code_example": null
1827
+ },
1828
+ "cli_check": {
1829
+ "what_to_scan": "Compliance check: Logging: Provider Must Generate and Store System Logs",
1830
+ "positive_signals": [
1831
+ "Documentation for Logging: Provider Must Generate and Store System Logs",
1832
+ "Evidence of obligation fulfillment"
1833
+ ],
1834
+ "negative_signals": [
1835
+ "No documentation for Logging: Provider Must Generate and Store System Logs",
1836
+ "No evidence of compliance"
1837
+ ],
1838
+ "warning_message": "Compliance gap: Logging: Provider Must Generate and Store System Logs. Review obligation requirements.",
1839
+ "fix_suggestion": "Address Logging: Provider Must Generate and Store System Logs per obligation requirements.",
1840
+ "severity": "warning"
1841
+ }
1842
+ },
1843
+ {
1844
+ "obligation_id": "eu-ai-act-OBL-HR-001",
1845
+ "feature_type": "hr-compliance",
1846
+ "sdk_implementation": {
1847
+ "description": null,
1848
+ "middleware_behavior": null,
1849
+ "data_to_log": [],
1850
+ "user_facing_output": null,
1851
+ "configuration_options": {},
1852
+ "code_example": null
1853
+ },
1854
+ "cli_check": {
1855
+ "what_to_scan": "HR AI recruitment pipeline compliance",
1856
+ "positive_signals": [
1857
+ "Bias testing suite for hiring AI (fairness metrics)",
1858
+ "Applicant notification component about AI use",
1859
+ "Human review workflow for AI-assisted rejections",
1860
+ "FRIA document for recruitment use case",
1861
+ "Works council notification template"
1862
+ ],
1863
+ "negative_signals": [
1864
+ "No bias testing in recruitment pipeline",
1865
+ "No applicant notification about AI involvement",
1866
+ "Automated rejection without human review step",
1867
+ "Emotion recognition SDK used in interview context (PROHIBITED)",
1868
+ "No FRIA for high-risk HR AI"
1869
+ ],
1870
+ "warning_message": "HR recruitment AI compliance gap detected. HR: AI in Recruitment and Candidate Selection is High-Risk — full high-risk obligations apply including FRIA, bias testing, and worker notification.",
1871
+ "fix_suggestion": "Add bias testing to recruitment pipeline. Create applicant AI notification. Implement human review for rejections. Generate FRIA template.",
1872
+ "severity": "error"
1873
+ }
1874
+ },
1875
+ {
1876
+ "obligation_id": "eu-ai-act-OBL-HR-002",
1877
+ "feature_type": "hr-compliance",
1878
+ "sdk_implementation": {
1879
+ "description": null,
1880
+ "middleware_behavior": null,
1881
+ "data_to_log": [],
1882
+ "user_facing_output": null,
1883
+ "configuration_options": {},
1884
+ "code_example": null
1885
+ },
1886
+ "cli_check": {
1887
+ "what_to_scan": "Workplace AI and employee monitoring compliance",
1888
+ "positive_signals": [
1889
+ "Worker notification templates",
1890
+ "Works council consultation documentation",
1891
+ "Human oversight for personnel decisions",
1892
+ "No emotion recognition imports",
1893
+ "Performance evaluation bias testing"
1894
+ ],
1895
+ "negative_signals": [
1896
+ "Emotion recognition SDK (fer, deepface emotion, affectiva) — PROHIBITED in workplace",
1897
+ "Employee monitoring without notification documentation",
1898
+ "Automated termination/demotion decisions without human review",
1899
+ "No bias testing for performance AI"
1900
+ ],
1901
+ "warning_message": "Workplace AI compliance gap. HR: AI in Employee Management and Workplace Monitoring is High-Risk — emotion recognition in workplace is PROHIBITED (Art. 5(1)(f)).",
1902
+ "fix_suggestion": "Remove emotion recognition from workplace context. Add worker notifications. Implement human oversight for personnel decisions.",
1903
+ "severity": "error"
1904
+ }
1905
+ },
1906
+ {
1907
+ "obligation_id": "eu-ai-act-OBL-HR-003",
1908
+ "feature_type": "hr-compliance",
1909
+ "sdk_implementation": {
1910
+ "description": null,
1911
+ "middleware_behavior": null,
1912
+ "data_to_log": [],
1913
+ "user_facing_output": null,
1914
+ "configuration_options": {},
1915
+ "code_example": null
1916
+ },
1917
+ "cli_check": {
1918
+ "what_to_scan": "Workplace AI and employee monitoring compliance",
1919
+ "positive_signals": [
1920
+ "Worker notification templates",
1921
+ "Works council consultation documentation",
1922
+ "Human oversight for personnel decisions",
1923
+ "No emotion recognition imports",
1924
+ "Performance evaluation bias testing"
1925
+ ],
1926
+ "negative_signals": [
1927
+ "Emotion recognition SDK (fer, deepface emotion, affectiva) — PROHIBITED in workplace",
1928
+ "Employee monitoring without notification documentation",
1929
+ "Automated termination/demotion decisions without human review",
1930
+ "No bias testing for performance AI"
1931
+ ],
1932
+ "warning_message": "Workplace AI compliance gap. HR: AI Processing of Employee Personal Data — emotion recognition in workplace is PROHIBITED (Art. 5(1)(f)).",
1933
+ "fix_suggestion": "Remove emotion recognition from workplace context. Add worker notifications. Implement human oversight for personnel decisions.",
1934
+ "severity": "error"
1935
+ }
1936
+ },
1937
+ {
1938
+ "obligation_id": "eu-ai-act-OBL-FIN-001",
1939
+ "feature_type": "finance-compliance",
1940
+ "sdk_implementation": {
1941
+ "description": null,
1942
+ "middleware_behavior": null,
1943
+ "data_to_log": [],
1944
+ "user_facing_output": null,
1945
+ "configuration_options": {},
1946
+ "code_example": null
1947
+ },
1948
+ "cli_check": {
1949
+ "what_to_scan": "Credit scoring AI compliance",
1950
+ "positive_signals": [
1951
+ "Bias testing for credit model (disparate impact analysis)",
1952
+ "FRIA for credit use case",
1953
+ "Human review for adverse credit decisions",
1954
+ "Decision explanation component",
1955
+ "Credit decision logging with confidence scores"
1956
+ ],
1957
+ "negative_signals": [
1958
+ "No bias testing for credit model",
1959
+ "No FRIA for credit AI (mandatory under Art. 27)",
1960
+ "Automated credit denial without human review",
1961
+ "No explanation for adverse decisions",
1962
+ "Credit decisions not logged"
1963
+ ],
1964
+ "warning_message": "Credit AI compliance gap. Finance: AI Credit Scoring and Lending Decisions is High-Risk — FRIA is mandatory for credit scoring (Art. 27).",
1965
+ "fix_suggestion": "Add disparate impact testing. Create FRIA. Implement human review for denials. Add decision explanations.",
1966
+ "severity": "error"
1967
+ }
1968
+ },
1969
+ {
1970
+ "obligation_id": "eu-ai-act-OBL-FIN-002",
1971
+ "feature_type": "finance-compliance",
1972
+ "sdk_implementation": {
1973
+ "description": null,
1974
+ "middleware_behavior": null,
1975
+ "data_to_log": [],
1976
+ "user_facing_output": null,
1977
+ "configuration_options": {},
1978
+ "code_example": null
1979
+ },
1980
+ "cli_check": {
1981
+ "what_to_scan": "Insurance AI pricing and risk assessment compliance",
1982
+ "positive_signals": [
1983
+ "Pricing fairness analysis",
1984
+ "Proxy discrimination testing",
1985
+ "FRIA for insurance use case",
1986
+ "Health data protection measures"
1987
+ ],
1988
+ "negative_signals": [
1989
+ "No pricing fairness testing",
1990
+ "Proxy variables correlated with protected characteristics",
1991
+ "No FRIA for insurance AI",
1992
+ "Health data processed without special safeguards"
1993
+ ],
1994
+ "warning_message": "Insurance AI compliance gap. Finance: AI in Insurance Pricing and Risk Assessment is High-Risk.",
1995
+ "fix_suggestion": "Add pricing fairness analysis. Test for proxy discrimination. Create FRIA. Implement health data safeguards.",
1996
+ "severity": "error"
1997
+ }
1998
+ },
1999
+ {
2000
+ "obligation_id": "eu-ai-act-OBL-FIN-003",
2001
+ "feature_type": "finance-compliance",
2002
+ "sdk_implementation": {
2003
+ "description": null,
2004
+ "middleware_behavior": null,
2005
+ "data_to_log": [],
2006
+ "user_facing_output": null,
2007
+ "configuration_options": {},
2008
+ "code_example": null
2009
+ },
2010
+ "cli_check": {
2011
+ "what_to_scan": "Public benefits eligibility AI compliance",
2012
+ "positive_signals": [
2013
+ "FRIA with vulnerable population focus",
2014
+ "Human review for benefit denials",
2015
+ "Bias testing against low-income groups",
2016
+ "Appeal mechanism"
2017
+ ],
2018
+ "negative_signals": [
2019
+ "Automated benefit denial without review",
2020
+ "No vulnerable population bias testing",
2021
+ "No appeal mechanism",
2022
+ "No FRIA"
2023
+ ],
2024
+ "warning_message": "Benefits eligibility AI gap. Finance: AI in Public Benefits Eligibility is High-Risk.",
2025
+ "fix_suggestion": "Add FRIA for benefits. Implement human review for denials. Test bias. Add appeal mechanism.",
2026
+ "severity": "error"
2027
+ }
2028
+ },
2029
+ {
2030
+ "obligation_id": "eu-ai-act-OBL-FIN-004",
2031
+ "feature_type": "finance-compliance",
2032
+ "sdk_implementation": {
2033
+ "description": null,
2034
+ "middleware_behavior": null,
2035
+ "data_to_log": [],
2036
+ "user_facing_output": null,
2037
+ "configuration_options": {},
2038
+ "code_example": null
2039
+ },
2040
+ "cli_check": {
2041
+ "what_to_scan": "Investment advice AI compliance",
2042
+ "positive_signals": [
2043
+ "AI disclosure in financial UI",
2044
+ "Suitability assessment mechanism",
2045
+ "Recommendation logging",
2046
+ "Human advisor access option"
2047
+ ],
2048
+ "negative_signals": [
2049
+ "No AI disclosure in investment interface",
2050
+ "No suitability assessment",
2051
+ "Recommendations not logged",
2052
+ "No human advisor option"
2053
+ ],
2054
+ "warning_message": "Investment AI compliance gap. Finance: AI in Investment Advice and Robo-Advisory.",
2055
+ "fix_suggestion": "Add AI disclosure. Implement suitability assessment. Log recommendations. Offer human advisor.",
2056
+ "severity": "warning"
2057
+ }
2058
+ },
2059
+ {
2060
+ "obligation_id": "eu-ai-act-OBL-MED-001",
2061
+ "feature_type": "healthcare-compliance",
2062
+ "sdk_implementation": {
2063
+ "description": null,
2064
+ "middleware_behavior": null,
2065
+ "data_to_log": [],
2066
+ "user_facing_output": null,
2067
+ "configuration_options": {},
2068
+ "code_example": null
2069
+ },
2070
+ "cli_check": {
2071
+ "what_to_scan": "Medical AI device compliance (AI Act + MDR)",
2072
+ "positive_signals": [
2073
+ "Clinical validation documentation",
2074
+ "MDR conformity reference",
2075
+ "Demographic accuracy testing",
2076
+ "Clinician-in-the-loop architecture",
2077
+ "Clinical decision logging"
2078
+ ],
2079
+ "negative_signals": [
2080
+ "No clinical validation",
2081
+ "No MDR conformity",
2082
+ "Accuracy untested across demographics",
2083
+ "Autonomous diagnosis without clinician review",
2084
+ "Clinical decisions not logged"
2085
+ ],
2086
+ "warning_message": "Medical AI compliance gap. Healthcare: AI as Medical Device Component is High-Risk — dual AI Act + MDR conformity required.",
2087
+ "fix_suggestion": "Add clinical validation. Ensure MDR conformity. Test across demographics. Implement clinician oversight.",
2088
+ "severity": "error"
2089
+ }
2090
+ },
2091
+ {
2092
+ "obligation_id": "eu-ai-act-OBL-MED-002",
2093
+ "feature_type": "healthcare-compliance",
2094
+ "sdk_implementation": {
2095
+ "description": null,
2096
+ "middleware_behavior": null,
2097
+ "data_to_log": [],
2098
+ "user_facing_output": null,
2099
+ "configuration_options": {},
2100
+ "code_example": null
2101
+ },
2102
+ "cli_check": {
2103
+ "what_to_scan": "Health AI disclosure and limitations",
2104
+ "positive_signals": [
2105
+ "AI disclosure in health interface",
2106
+ "Medical disclaimer component",
2107
+ "Professional referral mechanism",
2108
+ "Health data GDPR safeguards"
2109
+ ],
2110
+ "negative_signals": [
2111
+ "Health chatbot without AI disclosure",
2112
+ "No medical disclaimer",
2113
+ "No referral to professional",
2114
+ "Health data without special protection"
2115
+ ],
2116
+ "warning_message": "Health AI transparency gap. Healthcare: AI Health Advice Requires Disclosure and Limitations.",
2117
+ "fix_suggestion": "Add AI disclosure. Add medical disclaimer. Implement professional referral.",
2118
+ "severity": "warning"
2119
+ }
2120
+ },
2121
+ {
2122
+ "obligation_id": "eu-ai-act-OBL-MED-003",
2123
+ "feature_type": "data-governance",
2124
+ "sdk_implementation": {
2125
+ "description": null,
2126
+ "middleware_behavior": null,
2127
+ "data_to_log": [],
2128
+ "user_facing_output": null,
2129
+ "configuration_options": {},
2130
+ "code_example": null
2131
+ },
2132
+ "cli_check": {
2133
+ "what_to_scan": "Health data AI protection compliance",
2134
+ "positive_signals": [
2135
+ "Health data encryption at rest and transit",
2136
+ "GDPR Art. 9 legal basis documentation",
2137
+ "Access controls for health data",
2138
+ "Data pseudonymization"
2139
+ ],
2140
+ "negative_signals": [
2141
+ "Health data unencrypted",
2142
+ "No GDPR Art. 9 basis",
2143
+ "No access controls on health data",
2144
+ "Health data stored in plain text"
2145
+ ],
2146
+ "warning_message": "Health data protection gap. Healthcare: AI Processing Health Data — Special Category — GDPR Art. 9 applies.",
2147
+ "fix_suggestion": "Encrypt health data. Document Art. 9 legal basis. Implement access controls.",
2148
+ "severity": "error"
2149
+ }
2150
+ },
2151
+ {
2152
+ "obligation_id": "eu-ai-act-OBL-EDU-001",
2153
+ "feature_type": "education-compliance",
2154
+ "sdk_implementation": {
2155
+ "description": null,
2156
+ "middleware_behavior": null,
2157
+ "data_to_log": [],
2158
+ "user_facing_output": null,
2159
+ "configuration_options": {},
2160
+ "code_example": null
2161
+ },
2162
+ "cli_check": {
2163
+ "what_to_scan": "Education admissions AI compliance",
2164
+ "positive_signals": [
2165
+ "Bias testing for admissions model",
2166
+ "FRIA for education use case",
2167
+ "Human review for rejections",
2168
+ "Explanation mechanism for applicants"
2169
+ ],
2170
+ "negative_signals": [
2171
+ "No bias testing in admissions",
2172
+ "No FRIA",
2173
+ "Automated rejection without review",
2174
+ "No explanation for applicants"
2175
+ ],
2176
+ "warning_message": "Education admissions AI gap. Education: AI in Admissions and Access Determination is High-Risk.",
2177
+ "fix_suggestion": "Add bias testing. Create FRIA. Implement human review. Add explanations.",
2178
+ "severity": "error"
2179
+ }
2180
+ },
2181
+ {
2182
+ "obligation_id": "eu-ai-act-OBL-EDU-002",
2183
+ "feature_type": "education-compliance",
2184
+ "sdk_implementation": {
2185
+ "description": null,
2186
+ "middleware_behavior": null,
2187
+ "data_to_log": [],
2188
+ "user_facing_output": null,
2189
+ "configuration_options": {},
2190
+ "code_example": null
2191
+ },
2192
+ "cli_check": {
2193
+ "what_to_scan": "Education grading and proctoring AI compliance",
2194
+ "positive_signals": [
2195
+ "Student notification of AI use",
2196
+ "Appeal mechanism for AI-influenced grades",
2197
+ "Proctoring false-positive testing",
2198
+ "No emotion recognition SDK imports"
2199
+ ],
2200
+ "negative_signals": [
2201
+ "Emotion recognition in education context (PROHIBITED Art. 5(1)(f))",
2202
+ "No student notification",
2203
+ "No appeal mechanism",
2204
+ "Proctoring bias untested"
2205
+ ],
2206
+ "warning_message": "Education AI gap. Education: AI in Grading, Assessment and Proctoring is High-Risk — emotion recognition in education is PROHIBITED.",
2207
+ "fix_suggestion": "Remove emotion recognition. Notify students. Add appeal mechanism. Test proctoring fairness.",
2208
+ "severity": "error"
2209
+ }
2210
+ },
2211
+ {
2212
+ "obligation_id": "eu-ai-act-OBL-EDU-003",
2213
+ "feature_type": "education-compliance",
2214
+ "sdk_implementation": {
2215
+ "description": null,
2216
+ "middleware_behavior": null,
2217
+ "data_to_log": [],
2218
+ "user_facing_output": null,
2219
+ "configuration_options": {},
2220
+ "code_example": null
2221
+ },
2222
+ "cli_check": {
2223
+ "what_to_scan": "AI tutoring transparency and minor protection",
2224
+ "positive_signals": [
2225
+ "AI disclosure in education interface",
2226
+ "Minor user protections",
2227
+ "Student data safeguards",
2228
+ "Parental notification mechanism"
2229
+ ],
2230
+ "negative_signals": [
2231
+ "No AI disclosure in tutoring interface",
2232
+ "No minor-specific protections",
2233
+ "Student data collected without safeguards"
2234
+ ],
2235
+ "warning_message": "AI tutoring transparency gap. Education: AI Tutoring and Personalized Learning — Transparency.",
2236
+ "fix_suggestion": "Add AI disclosure. Implement minor protections. Secure student data.",
2237
+ "severity": "warning"
2238
+ }
2239
+ },
2240
+ {
2241
+ "obligation_id": "eu-ai-act-OBL-LAW-001",
2242
+ "feature_type": "law-enforcement-compliance",
2243
+ "sdk_implementation": {
2244
+ "description": null,
2245
+ "middleware_behavior": null,
2246
+ "data_to_log": [],
2247
+ "user_facing_output": null,
2248
+ "configuration_options": {},
2249
+ "code_example": null
2250
+ },
2251
+ "cli_check": {
2252
+ "what_to_scan": "Law enforcement AI compliance",
2253
+ "positive_signals": [
2254
+ "FRIA for law enforcement use case",
2255
+ "Prohibited biometric screening",
2256
+ "Human oversight documentation",
2257
+ "Bias testing across demographics"
2258
+ ],
2259
+ "negative_signals": [
2260
+ "Biometric identification in public spaces without authorization",
2261
+ "No bias testing",
2262
+ "No FRIA",
2263
+ "Autonomous decisions without human oversight"
2264
+ ],
2265
+ "warning_message": "Law enforcement AI gap. Law Enforcement: AI in Policing is High-Risk with Prohibitions.",
2266
+ "fix_suggestion": "Conduct FRIA. Screen biometric prohibitions. Test for bias. Ensure human oversight.",
2267
+ "severity": "error"
2268
+ }
2269
+ },
2270
+ {
2271
+ "obligation_id": "eu-ai-act-OBL-LAW-002",
2272
+ "feature_type": "law-enforcement-compliance",
2273
+ "sdk_implementation": {
2274
+ "description": null,
2275
+ "middleware_behavior": null,
2276
+ "data_to_log": [],
2277
+ "user_facing_output": null,
2278
+ "configuration_options": {},
2279
+ "code_example": null
2280
+ },
2281
+ "cli_check": {
2282
+ "what_to_scan": "Law enforcement notification compliance",
2283
+ "positive_signals": [
2284
+ "Explanation mechanism",
2285
+ "Notification templates",
2286
+ "Delay justification documentation"
2287
+ ],
2288
+ "negative_signals": [
2289
+ "No explanation mechanism",
2290
+ "No notification process",
2291
+ "Permanent withholding of AI involvement information"
2292
+ ],
2293
+ "warning_message": "Law enforcement AI gap. Law Enforcement: Notify Affected Persons of AI-Influenced Decisions.",
2294
+ "fix_suggestion": "Add explanation mechanism. Create notification templates.",
2295
+ "severity": "error"
2296
+ }
2297
+ },
2298
+ {
2299
+ "obligation_id": "eu-ai-act-OBL-JUS-001",
2300
+ "feature_type": "justice-compliance",
2301
+ "sdk_implementation": {
2302
+ "description": null,
2303
+ "middleware_behavior": null,
2304
+ "data_to_log": [],
2305
+ "user_facing_output": null,
2306
+ "configuration_options": {},
2307
+ "code_example": null
2308
+ },
2309
+ "cli_check": {
2310
+ "what_to_scan": "Judicial AI compliance",
2311
+ "positive_signals": [
2312
+ "Advisory-only output configuration",
2313
+ "Bias testing for case predictions",
2314
+ "Explainability components",
2315
+ "Judge final authority documentation"
2316
+ ],
2317
+ "negative_signals": [
2318
+ "Autonomous judicial decisions",
2319
+ "Opaque model without explainability",
2320
+ "No bias testing",
2321
+ "AI involvement hidden from parties"
2322
+ ],
2323
+ "warning_message": "Judicial AI gap. Justice: AI in Judicial Decision-Making is High-Risk — highest explainability standard required.",
2324
+ "fix_suggestion": "Configure advisory-only. Add explainability. Test for bias. Document judge authority.",
2325
+ "severity": "error"
2326
+ }
2327
+ },
2328
+ {
2329
+ "obligation_id": "eu-ai-act-OBL-JUS-002",
2330
+ "feature_type": "legal-compliance",
2331
+ "sdk_implementation": {
2332
+ "description": null,
2333
+ "middleware_behavior": null,
2334
+ "data_to_log": [],
2335
+ "user_facing_output": null,
2336
+ "configuration_options": {},
2337
+ "code_example": null
2338
+ },
2339
+ "cli_check": {
2340
+ "what_to_scan": "Legal practice AI compliance",
2341
+ "positive_signals": [
2342
+ "Client AI disclosure component",
2343
+ "Lawyer review workflow",
2344
+ "Legal research audit trail"
2345
+ ],
2346
+ "negative_signals": [
2347
+ "No client disclosure of AI use",
2348
+ "AI analysis presented as lawyer work without review",
2349
+ "No audit trail"
2350
+ ],
2351
+ "warning_message": "Legal AI gap. Legal: AI in Law Firm Practice (Contract Review, Legal Research, Due Diligence).",
2352
+ "fix_suggestion": "Add client disclosure. Implement lawyer review. Log AI research.",
2353
+ "severity": "warning"
2354
+ }
2355
+ },
2356
+ {
2357
+ "obligation_id": "eu-ai-act-OBL-INF-001",
2358
+ "feature_type": "infrastructure-compliance",
2359
+ "sdk_implementation": {
2360
+ "description": null,
2361
+ "middleware_behavior": null,
2362
+ "data_to_log": [],
2363
+ "user_facing_output": null,
2364
+ "configuration_options": {},
2365
+ "code_example": null
2366
+ },
2367
+ "cli_check": {
2368
+ "what_to_scan": "Critical infrastructure AI compliance",
2369
+ "positive_signals": [
2370
+ "Failsafe mechanism documentation",
2371
+ "Redundancy architecture",
2372
+ "Cybersecurity assessment (NIS2)",
2373
+ "Human override mechanism",
2374
+ "Real-time monitoring"
2375
+ ],
2376
+ "negative_signals": [
2377
+ "No failsafe mechanism",
2378
+ "Single point of failure on AI",
2379
+ "No cybersecurity assessment",
2380
+ "No human override",
2381
+ "No real-time monitoring"
2382
+ ],
2383
+ "warning_message": "Infrastructure AI gap. Infrastructure: AI in Critical Infrastructure Management is High-Risk — NIS2 intersection.",
2384
+ "fix_suggestion": "Implement failsafe. Add redundancy. Conduct cybersecurity assessment. Add human override. Set up monitoring.",
2385
+ "severity": "error"
2386
+ }
2387
+ },
2388
+ {
2389
+ "obligation_id": "eu-ai-act-OBL-BIO-001",
2390
+ "feature_type": "biometric-compliance",
2391
+ "sdk_implementation": {
2392
+ "description": null,
2393
+ "middleware_behavior": null,
2394
+ "data_to_log": [],
2395
+ "user_facing_output": null,
2396
+ "configuration_options": {},
2397
+ "code_example": null
2398
+ },
2399
+ "cli_check": {
2400
+ "what_to_scan": "Biometric AI compliance with prohibitions",
2401
+ "positive_signals": [
2402
+ "Art. 5 biometric prohibition screening",
2403
+ "Demographic accuracy testing (skin tone, age, gender)",
2404
+ "Double human verification mechanism",
2405
+ "GDPR Art. 9 consent/basis",
2406
+ "Anti-spoofing measures"
2407
+ ],
2408
+ "negative_signals": [
2409
+ "Untargeted facial scraping (PROHIBITED)",
2410
+ "Emotion recognition in workplace/education (PROHIBITED)",
2411
+ "Sensitive characteristic categorization (PROHIBITED)",
2412
+ "Single biometric match without human verification",
2413
+ "Biometric data without GDPR Art. 9 basis"
2414
+ ],
2415
+ "warning_message": "Biometric AI gap. Biometric: AI Biometric Systems are High-Risk with Prohibitions — multiple prohibitions apply (Art. 5).",
2416
+ "fix_suggestion": "Screen all biometric prohibitions. Test demographic accuracy. Add double verification. Document GDPR Art. 9 basis.",
2417
+ "severity": "error"
2418
+ }
2419
+ },
2420
+ {
2421
+ "obligation_id": "eu-ai-act-OBL-GEN-001",
2422
+ "feature_type": "content-marking",
2423
+ "sdk_implementation": {
2424
+ "description": null,
2425
+ "middleware_behavior": null,
2426
+ "data_to_log": [],
2427
+ "user_facing_output": null,
2428
+ "configuration_options": {},
2429
+ "code_example": null
2430
+ },
2431
+ "cli_check": {
2432
+ "what_to_scan": "AI content generation marking compliance",
2433
+ "positive_signals": [
2434
+ "C2PA library integration",
2435
+ "Watermark embedding in generation pipeline",
2436
+ "Machine-readable marking on all outputs",
2437
+ "Deepfake visible labeling"
2438
+ ],
2439
+ "negative_signals": [
2440
+ "Content generation without marking",
2441
+ "No C2PA or watermark",
2442
+ "Metadata stripped from outputs"
2443
+ ],
2444
+ "warning_message": "Content generation marking gap. Content Generation: AI Image/Video/Audio Generation Transparency.",
2445
+ "fix_suggestion": "Integrate C2PA. Embed watermarks. Add machine-readable marking.",
2446
+ "severity": "error"
2447
+ }
2448
+ },
2449
+ {
2450
+ "obligation_id": "eu-ai-act-OBL-GEN-002",
2451
+ "feature_type": "content-marking",
2452
+ "sdk_implementation": {
2453
+ "description": null,
2454
+ "middleware_behavior": null,
2455
+ "data_to_log": [],
2456
+ "user_facing_output": null,
2457
+ "configuration_options": {},
2458
+ "code_example": null
2459
+ },
2460
+ "cli_check": {
2461
+ "what_to_scan": "Deepfake disclosure compliance",
2462
+ "positive_signals": [
2463
+ "Content disclosure labels",
2464
+ "Deepfake labeling in publishing pipeline"
2465
+ ],
2466
+ "negative_signals": [
2467
+ "Published deepfakes without disclosure",
2468
+ "No labeling mechanism"
2469
+ ],
2470
+ "warning_message": "Content generation marking gap. Content Generation: Deployer Deepfake Disclosure Obligation.",
2471
+ "fix_suggestion": "Add deepfake disclosure labels. Implement labeling pipeline.",
2472
+ "severity": "error"
2473
+ }
2474
+ },
2475
+ {
2476
+ "obligation_id": "eu-ai-act-OBL-CSR-001",
2477
+ "feature_type": "chatbot-disclosure",
2478
+ "sdk_implementation": {
2479
+ "description": null,
2480
+ "middleware_behavior": null,
2481
+ "data_to_log": [],
2482
+ "user_facing_output": null,
2483
+ "configuration_options": {},
2484
+ "code_example": null
2485
+ },
2486
+ "cli_check": {
2487
+ "what_to_scan": "Customer service chatbot AI disclosure",
2488
+ "positive_signals": [
2489
+ "AI disclosure component at start of chat",
2490
+ "Clear 'You are talking to AI' message",
2491
+ "Human agent escalation option",
2492
+ "Disclosure maintained throughout conversation"
2493
+ ],
2494
+ "negative_signals": [
2495
+ "Chatbot without AI disclosure",
2496
+ "Disclosure buried in ToS",
2497
+ "No human escalation option",
2498
+ "AI designed to appear human"
2499
+ ],
2500
+ "warning_message": "Chatbot disclosure gap. Customer Service: AI Chatbot Interaction Disclosure — Art. 50(1) requires disclosure.",
2501
+ "fix_suggestion": "Add AI disclosure at start of chat. Provide human escalation. Maintain disclosure throughout.",
2502
+ "severity": "error"
2503
+ }
2504
+ },
2505
+ {
2506
+ "obligation_id": "eu-ai-act-OBL-MKT-001",
2507
+ "feature_type": "marketing-compliance",
2508
+ "sdk_implementation": {
2509
+ "description": null,
2510
+ "middleware_behavior": null,
2511
+ "data_to_log": [],
2512
+ "user_facing_output": null,
2513
+ "configuration_options": {},
2514
+ "code_example": null
2515
+ },
2516
+ "cli_check": {
2517
+ "what_to_scan": "Marketing AI manipulation screening and transparency",
2518
+ "positive_signals": [
2519
+ "Art. 5(1)(a) screening for manipulation",
2520
+ "User opt-out mechanism for AI personalization",
2521
+ "Recommendation transparency",
2522
+ "No dark patterns in AI targeting"
2523
+ ],
2524
+ "negative_signals": [
2525
+ "Dark pattern libraries or manipulation techniques",
2526
+ "No user opt-out for AI recommendations",
2527
+ "Hidden AI personalization",
2528
+ "Exploiting user vulnerabilities for targeting"
2529
+ ],
2530
+ "warning_message": "Marketing AI gap. Marketing: AI in Advertising and Recommendation Systems — manipulation = prohibited practice (maximum penalty).",
2531
+ "fix_suggestion": "Screen for manipulation (Art. 5). Add user opt-out. Add transparency. Remove dark patterns.",
2532
+ "severity": "error"
2533
+ }
2534
+ },
2535
+ {
2536
+ "obligation_id": "eu-ai-act-OBL-AV-001",
2537
+ "feature_type": "transport-compliance",
2538
+ "sdk_implementation": {
2539
+ "description": null,
2540
+ "middleware_behavior": null,
2541
+ "data_to_log": [],
2542
+ "user_facing_output": null,
2543
+ "configuration_options": {},
2544
+ "code_example": null
2545
+ },
2546
+ "cli_check": {
2547
+ "what_to_scan": "Autonomous vehicle / transport AI compliance",
2548
+ "positive_signals": [
2549
+ "Fail-safe behavior documentation",
2550
+ "Diverse condition testing reports",
2551
+ "Human override mechanism",
2552
+ "Safety-critical decision logging"
2553
+ ],
2554
+ "negative_signals": [
2555
+ "No fail-safe behavior",
2556
+ "Testing only in ideal conditions",
2557
+ "No human override",
2558
+ "Safety decisions not logged"
2559
+ ],
2560
+ "warning_message": "Transport AI gap. Transport: AI in Autonomous Vehicles and Traffic Management is High-Risk.",
2561
+ "fix_suggestion": "Implement fail-safe. Test in adverse conditions. Add human override. Log safety decisions.",
2562
+ "severity": "error"
2563
+ }
2564
+ }
2565
+ ],
2566
+ "version": {
2567
+ "framework_version": "4.0-full-coverage",
2568
+ "processed_date": "2026-02-17",
2569
+ "source_regulation_version": "Regulation (EU) 2024/1689 as published in OJ L 2024/1689",
2570
+ "processing_prompt_version": "12-stage-v2 + domain decomposition",
2571
+ "last_regulatory_update_checked": "2025-12-17 (Code of Practice on content marking draft)",
2572
+ "next_review_due": "2026-03-01",
2573
+ "coverage": "~95% of actionable obligations. All 8 Annex III domains + 5 additional domains decomposed.",
2574
+ "domains_covered": [
2575
+ "HR/Employment",
2576
+ "Finance/Credit/Insurance",
2577
+ "Healthcare/Medical",
2578
+ "Education",
2579
+ "Law Enforcement",
2580
+ "Migration/Border",
2581
+ "Justice/Legal",
2582
+ "Critical Infrastructure",
2583
+ "Biometric",
2584
+ "Content Generation",
2585
+ "Customer Service",
2586
+ "Marketing/Advertising",
2587
+ "Transport/Autonomous"
2588
+ ]
2589
+ }
2590
+ }