@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,160 @@
1
+ {
2
+ "applicability_tree": {
3
+ "regulation_id": "eu-ai-act",
4
+ "root_question": "Q1",
5
+ "questions": [
6
+ {
7
+ "id": "Q1",
8
+ "text": "Does your company develop, sell, import, distribute, or USE any AI-powered tools or systems?",
9
+ "help_text": "This includes using third-party AI tools like ChatGPT, Copilot, AI-powered CRM, AI recruitment tools, AI analytics, etc. — not just building your own AI. 'AI system' under the EU AI Act is broadly defined as any machine-based system that infers outputs (predictions, content, recommendations, decisions) from its inputs.",
10
+ "answers": [
11
+ {
12
+ "text": "Yes, we develop/build AI products or models",
13
+ "next": "Q2"
14
+ },
15
+ {
16
+ "text": "Yes, we use/deploy AI tools built by others",
17
+ "next": "Q2"
18
+ },
19
+ {
20
+ "text": "Yes, we both build and use AI",
21
+ "next": "Q2"
22
+ },
23
+ {
24
+ "text": "No, we don't use any AI",
25
+ "next": null,
26
+ "result_if_final": "does-not-apply",
27
+ "explanation_if_final": "The EU AI Act applies to operators of AI systems. If your company does not develop, deploy, import, distribute, or use AI systems in any capacity, the Act does not apply to you. However, consider whether tools you use may contain AI components (e.g., AI features in Microsoft 365, Salesforce Einstein, etc.)."
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "id": "Q2",
33
+ "text": "Does your company have any connection to the European Union?",
34
+ "help_text": "Connection means ANY of: (a) your company is established/located in the EU, (b) you sell/offer AI products or services to customers in the EU, (c) the output of your AI is used by anyone in the EU, (d) your AI system affects people located in the EU. The EU AI Act has extraterritorial reach — similar to GDPR.",
35
+ "answers": [
36
+ {
37
+ "text": "Yes, we are established in the EU or EEA",
38
+ "next": "Q3"
39
+ },
40
+ {
41
+ "text": "Yes, we serve customers or users in the EU (even though we're based elsewhere)",
42
+ "next": "Q3"
43
+ },
44
+ {
45
+ "text": "Yes, our AI's output is used by people in the EU",
46
+ "next": "Q3"
47
+ },
48
+ {
49
+ "text": "No EU connection at all — no EU customers, users, or affected persons",
50
+ "next": null,
51
+ "result_if_final": "does-not-apply",
52
+ "explanation_if_final": "The EU AI Act applies based on market presence and output use in the EU. If your AI system has genuinely zero connection to the EU (no EU customers, no EU users, no outputs used in the EU), the Act does not apply. But verify carefully — even indirect connections (e.g., a US client with EU operations using your tool) may bring you in scope."
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ "id": "Q3",
58
+ "text": "Is your AI use purely for personal, non-professional purposes OR exclusively for scientific research before market placement?",
59
+ "help_text": "The AI Act exempts: (a) individuals using AI for personal non-professional activities, (b) AI developed solely for scientific R&D before any market placement or deployment. Military/defence/national security AI is also excluded.",
60
+ "answers": [
61
+ {
62
+ "text": "Yes, purely personal use or pre-market R&D only",
63
+ "next": null,
64
+ "result_if_final": "does-not-apply",
65
+ "explanation_if_final": "The EU AI Act exempts purely personal non-professional AI use and pre-market scientific R&D. However, once the system is placed on the market or put into service (even for free), the exemption ends."
66
+ },
67
+ {
68
+ "text": "No, it's used in a professional or commercial context",
69
+ "next": "Q4"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "id": "Q4",
75
+ "text": "What is your company's role with respect to AI systems?",
76
+ "help_text": "Provider = you build/develop the AI (or have it built) and offer it under your name. Deployer = you use AI tools built by others in your business operations. You can be both if you build some AI and use third-party AI tools.",
77
+ "answers": [
78
+ {
79
+ "text": "We are a PROVIDER — we build/develop AI products",
80
+ "next": "Q5"
81
+ },
82
+ {
83
+ "text": "We are a DEPLOYER — we use AI tools from other companies",
84
+ "next": "Q5"
85
+ },
86
+ {
87
+ "text": "We are BOTH — we build some AI and deploy others",
88
+ "next": "Q5"
89
+ },
90
+ {
91
+ "text": "We import or distribute AI systems into the EU",
92
+ "next": "Q5"
93
+ }
94
+ ]
95
+ },
96
+ {
97
+ "id": "Q5",
98
+ "text": "Could any of your AI systems fall under a PROHIBITED practice? (social scoring, subliminal manipulation, exploitation of vulnerable groups, untargeted facial scraping, emotion recognition in workplace/school, real-time biometric ID in public spaces)",
99
+ "help_text": "These are completely banned under Article 5. Think about whether any AI tool you build or use could: manipulate behavior without awareness, exploit children/elderly/disabled, score people's social behavior, scrape faces from internet, detect emotions in office/classroom, or identify people in real-time in public via biometrics.",
100
+ "answers": [
101
+ {
102
+ "text": "Yes, or possibly — need to check",
103
+ "next": null,
104
+ "result_if_final": "applies",
105
+ "explanation_if_final": "CRITICAL: The EU AI Act applies to you, and you may be operating a prohibited AI system. Prohibited practices carry the highest fines (€35M or 7% of global turnover). You should immediately conduct a detailed assessment of each AI system against Article 5 prohibited practices and cease any prohibited use. Prohibition has been in force since February 2, 2025."
106
+ },
107
+ {
108
+ "text": "No, none of our AI does any of these things",
109
+ "next": "Q6"
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "id": "Q6",
115
+ "text": "Is any of your AI used in a HIGH-RISK area? (hiring/HR, credit/lending, insurance, education grading, healthcare/medical devices, critical infrastructure, law enforcement, border control, justice system)",
116
+ "help_text": "High-risk covers AI used in decisions that significantly affect people's lives: getting a job, a loan, insurance, grades, medical treatment, interactions with police, immigration decisions, or court proceedings. Also includes AI as safety component in regulated products (medical devices, machinery, vehicles, etc.).",
117
+ "answers": [
118
+ {
119
+ "text": "Yes, we build or use AI in one or more of these areas",
120
+ "next": null,
121
+ "result_if_final": "applies",
122
+ "explanation_if_final": "The EU AI Act FULLY applies to you with HIGH-RISK obligations. As a provider, you need: risk management system, technical documentation, conformity assessment, CE marking, registration in EU database, post-market monitoring, and more. As a deployer, you need: use per instructions, human oversight, monitoring, log retention, and for public entities a Fundamental Rights Impact Assessment. High-risk rules apply from August 2, 2026 (Annex III) or August 2, 2027 (Annex II product-related). Start preparing NOW."
123
+ },
124
+ {
125
+ "text": "No, our AI is in other areas (marketing, content, customer service, analytics, etc.)",
126
+ "next": "Q7"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "id": "Q7",
132
+ "text": "Does your AI system directly interact with people (chatbot, voice assistant) OR generate synthetic content (text, images, audio, video)?",
133
+ "help_text": "This covers any AI that 'talks to' users (customer service bots, AI assistants, virtual agents) or creates content that could be mistaken for human-made (AI-generated articles, images, videos, audio, deep fakes).",
134
+ "answers": [
135
+ {
136
+ "text": "Yes, it interacts with people or generates content",
137
+ "next": null,
138
+ "result_if_final": "applies",
139
+ "explanation_if_final": "The EU AI Act applies to you with TRANSPARENCY obligations (Article 50). You must: disclose AI interaction to users ('You are talking to an AI'), mark AI-generated content as AI-generated in machine-readable format, and label deep fakes clearly. These transparency rules apply from August 2, 2026. Additionally, AI literacy obligation (Art. 4) and general obligations already apply."
140
+ },
141
+ {
142
+ "text": "No, it's backend AI with no direct user interaction or content generation",
143
+ "next": null,
144
+ "result_if_final": "partially-applies",
145
+ "explanation_if_final": "The EU AI Act applies with MINIMAL obligations. You must still: (1) ensure AI literacy of your staff (Art. 4 — already in force since Feb 2025), (2) ensure no prohibited practices, and (3) comply with any voluntary codes of conduct you've adopted (Art. 95). While the regulatory burden is light, you should maintain an AI inventory and regularly reassess risk classification, as AI uses may evolve into higher-risk categories."
146
+ }
147
+ ]
148
+ }
149
+ ]
150
+ },
151
+ "version": {
152
+ "framework_version": "3.0-production",
153
+ "processed_date": "2026-02-17",
154
+ "source_regulation_version": "Regulation (EU) 2024/1689 as published in OJ L 2024/1689",
155
+ "processing_prompt_version": "12-stage-v2",
156
+ "last_regulatory_update_checked": "2025-12-17 (Code of Practice on content marking draft)",
157
+ "next_review_due": "2026-03-01",
158
+ "notes": "Production-grade framework with granular obligation decomposition, full what_not_to_do coverage, expanded deployer obligations, and comprehensive tech specs for scanner."
159
+ }
160
+ }
@@ -0,0 +1,175 @@
1
+ {
2
+ "cross_mapping_note": "Since the EU AI Act IS the baseline regulation for Complior, this file maps EU AI Act obligations to other known AI regulations. When additional regulations are processed (US state laws, Korea, Canada, etc.), this file will be enriched with specific obligation-level cross-references. For now, it provides the mapping framework and identifies EU AI Act obligations that have known parallels in other jurisdictions.",
3
+ "cross_mapping": [
4
+ {
5
+ "this_obligation": "eu-ai-act-OBL-001",
6
+ "this_requirement_summary": "AI literacy training for all staff interacting with AI systems",
7
+ "known_parallels": {
8
+ "us-co-sb205": {
9
+ "overlap": "partial",
10
+ "note": "Colorado SB 205 requires deployers to implement risk management programs which implicitly include training, but no explicit AI literacy mandate."
11
+ },
12
+ "eu-gdpr": {
13
+ "overlap": "partial",
14
+ "note": "GDPR Art. 39(1)(b) requires DPO to provide awareness-raising and training for staff involved in processing. AI literacy extends this concept to AI-specific knowledge."
15
+ }
16
+ },
17
+ "conflicts_with": []
18
+ },
19
+ {
20
+ "this_obligation": "eu-ai-act-OBL-002",
21
+ "this_requirement_summary": "Prohibition of specific AI practices (social scoring, manipulation, etc.)",
22
+ "known_parallels": {
23
+ "council-of-europe-ai-convention": {
24
+ "overlap": "partial",
25
+ "note": "Council of Europe Framework Convention on AI (2024) requires parties to address risks to human rights but does not provide an explicit prohibited practices list."
26
+ },
27
+ "brazil-ai-act-draft": {
28
+ "overlap": "partial",
29
+ "note": "Brazil's AI Bill includes prohibitions on social scoring and subliminal manipulation, similar scope but differences in exceptions."
30
+ }
31
+ },
32
+ "conflicts_with": []
33
+ },
34
+ {
35
+ "this_obligation": "eu-ai-act-OBL-013",
36
+ "this_requirement_summary": "Fundamental Rights Impact Assessment (FRIA) before deploying high-risk AI",
37
+ "known_parallels": {
38
+ "us-co-sb205": {
39
+ "overlap": "partial",
40
+ "strictness": "eu_stricter",
41
+ "note": "Colorado requires an impact assessment but calls it 'risk management policy and impact assessment'. EU FRIA is more structured with specific elements required under Art. 27(3)."
42
+ },
43
+ "us-nyc-ll144": {
44
+ "overlap": "partial",
45
+ "strictness": "equivalent",
46
+ "note": "NYC Local Law 144 requires bias audits for automated employment decision tools. Narrower scope (employment only) but similar concept."
47
+ },
48
+ "canada-aida-draft": {
49
+ "overlap": "partial",
50
+ "note": "Canada's proposed AIDA includes impact assessment requirements for high-impact AI systems."
51
+ }
52
+ },
53
+ "conflicts_with": []
54
+ },
55
+ {
56
+ "this_obligation": "eu-ai-act-OBL-015",
57
+ "this_requirement_summary": "Disclose AI interaction to users (chatbot disclosure)",
58
+ "known_parallels": {
59
+ "us-ca-bot-disclosure": {
60
+ "overlap": "full",
61
+ "strictness": "equivalent",
62
+ "note": "California SB 1001 (Bot Disclosure Act) requires bots to disclose non-human identity. Similar requirement, narrower scope (CA only)."
63
+ },
64
+ "china-ai-provisions": {
65
+ "overlap": "full",
66
+ "note": "China's Provisions on the Management of Algorithmic Recommendations (2022) and Generative AI rules require disclosure of AI-generated content."
67
+ }
68
+ },
69
+ "conflicts_with": []
70
+ },
71
+ {
72
+ "this_obligation": "eu-ai-act-OBL-016",
73
+ "this_requirement_summary": "Mark AI-generated content as artificially generated (machine-readable)",
74
+ "known_parallels": {
75
+ "us-executive-order-14110": {
76
+ "overlap": "partial",
77
+ "note": "US EO 14110 on AI Safety (2023) directed NIST to develop content authentication standards. Voluntary, not mandatory."
78
+ },
79
+ "china-deep-synthesis-rules": {
80
+ "overlap": "full",
81
+ "strictness": "this_is_stricter",
82
+ "note": "China's Deep Synthesis Provisions (2023) require labeling of AI-generated content. EU AI Act adds machine-readable requirement and is more specific on technical implementation."
83
+ }
84
+ },
85
+ "conflicts_with": []
86
+ },
87
+ {
88
+ "this_obligation": "eu-ai-act-OBL-024",
89
+ "this_requirement_summary": "Provide explanation of AI decisions to affected persons",
90
+ "known_parallels": {
91
+ "eu-gdpr-art22": {
92
+ "overlap": "partial",
93
+ "strictness": "this_is_stricter",
94
+ "note": "GDPR Art. 22 provides right not to be subject to solely automated decisions with legal effects, with right to obtain meaningful information. EU AI Act Art. 86 provides broader right to explanation beyond solely automated decisions."
95
+ },
96
+ "us-co-sb205": {
97
+ "overlap": "partial",
98
+ "note": "Colorado requires notice and ability to appeal when consequential AI decisions are adverse. Similar but different scope and process."
99
+ }
100
+ },
101
+ "conflicts_with": []
102
+ },
103
+ {
104
+ "this_obligation": "eu-ai-act-OBL-003",
105
+ "this_requirement_summary": "Risk management system for high-risk AI",
106
+ "known_parallels": {
107
+ "iso-42001": {
108
+ "overlap": "partial",
109
+ "note": "ISO/IEC 42001 (AI Management System) provides a framework for AI risk management that can support EU AI Act compliance but is voluntary and broader in scope."
110
+ },
111
+ "nist-ai-rmf": {
112
+ "overlap": "partial",
113
+ "note": "NIST AI Risk Management Framework (AI RMF 1.0) provides voluntary risk management guidance. Good complementary framework but not legally required."
114
+ }
115
+ },
116
+ "conflicts_with": []
117
+ },
118
+ {
119
+ "this_obligation": "eu-ai-act-OBL-022",
120
+ "this_requirement_summary": "GPAI technical documentation and downstream transparency",
121
+ "known_parallels": {
122
+ "us-executive-order-14110": {
123
+ "overlap": "partial",
124
+ "note": "US EO 14110 required reporting for large AI models (>10^26 FLOPs) but focused on national security. Different threshold and scope."
125
+ }
126
+ },
127
+ "conflicts_with": [
128
+ {
129
+ "regulation": "us-executive-order-14110",
130
+ "conflict_type": "none",
131
+ "description": "No true conflict. US EO had a higher compute threshold (10^26 FLOPs) vs EU AI Act (10^25 FLOPs). EU AI Act is stricter and broader.",
132
+ "resolution": "Comply with EU AI Act threshold (10^25 FLOPs) to cover both."
133
+ }
134
+ ]
135
+ }
136
+ ],
137
+ "strictest_rule_wins_matrix": {
138
+ "description": "When a Complior customer operates under multiple jurisdictions, the platform applies the strictest rule. This matrix summarizes which regulation is typically strictest for key obligation categories.",
139
+ "categories": {
140
+ "prohibited_practices": {
141
+ "strictest": "eu-ai-act",
142
+ "reason": "Most comprehensive list of prohibited AI practices globally. No other jurisdiction has as broad a prohibition list."
143
+ },
144
+ "transparency_disclosure": {
145
+ "strictest": "eu-ai-act",
146
+ "reason": "Requires both user-facing disclosure AND machine-readable content marking. Most jurisdictions only require one or the other."
147
+ },
148
+ "impact_assessment": {
149
+ "strictest": "eu-ai-act",
150
+ "reason": "FRIA under Art. 27 is the most structured impact assessment requirement with specific mandatory elements. Colorado SB 205 is close but less prescriptive."
151
+ },
152
+ "data_governance": {
153
+ "strictest": "eu-ai-act + eu-gdpr (combined)",
154
+ "reason": "EU AI Act Art. 10 data quality requirements combined with GDPR create the strictest data governance regime globally."
155
+ },
156
+ "penalties": {
157
+ "strictest": "eu-ai-act",
158
+ "reason": "7% of global turnover for prohibited practices violations is the highest AI-specific fine globally."
159
+ },
160
+ "worker_notification": {
161
+ "strictest": "eu-ai-act",
162
+ "reason": "Explicit worker notification requirement under Art. 26(7) is unique to EU AI Act."
163
+ }
164
+ }
165
+ },
166
+ "version": {
167
+ "framework_version": "3.0-production",
168
+ "processed_date": "2026-02-17",
169
+ "source_regulation_version": "Regulation (EU) 2024/1689 as published in OJ L 2024/1689",
170
+ "processing_prompt_version": "12-stage-v2",
171
+ "last_regulatory_update_checked": "2025-12-17 (Code of Practice on content marking draft)",
172
+ "next_review_due": "2026-03-01",
173
+ "notes": "Production-grade framework with granular obligation decomposition, full what_not_to_do coverage, expanded deployer obligations, and comprehensive tech specs for scanner."
174
+ }
175
+ }
@@ -0,0 +1,186 @@
1
+ {
2
+ "localization": {
3
+ "regulation_id": "eu-ai-act",
4
+ "primary_language": "English (reference text), plus all 24 official EU languages",
5
+ "ui_language_needed": [
6
+ "en",
7
+ "de",
8
+ "fr",
9
+ "es",
10
+ "it",
11
+ "nl",
12
+ "pt",
13
+ "pl",
14
+ "sv",
15
+ "da",
16
+ "fi",
17
+ "el",
18
+ "cs",
19
+ "ro",
20
+ "hu",
21
+ "bg",
22
+ "hr",
23
+ "sk",
24
+ "sl",
25
+ "lt",
26
+ "lv",
27
+ "et",
28
+ "ga",
29
+ "mt"
30
+ ],
31
+ "priority_ui_languages": [
32
+ "en",
33
+ "de",
34
+ "fr",
35
+ "es",
36
+ "it",
37
+ "nl"
38
+ ],
39
+ "document_languages": [
40
+ "English (universal — all templates must be available in EN)",
41
+ "German (largest EU economy, strong AI ecosystem)",
42
+ "French (co-official EU language, France has significant AI activity)",
43
+ "Spanish (large market, Latin America bridge)",
44
+ "Italian (major economy)",
45
+ "Dutch (Netherlands is major tech hub)",
46
+ "Polish (large Eastern EU market)",
47
+ "Swedish (strong Nordic AI ecosystem)"
48
+ ],
49
+ "terminology": [
50
+ {
51
+ "english_term": "AI system",
52
+ "local_terms": {
53
+ "de": "KI-System",
54
+ "fr": "système d'IA",
55
+ "es": "sistema de IA",
56
+ "it": "sistema di IA",
57
+ "nl": "AI-systeem",
58
+ "pt": "sistema de IA",
59
+ "pl": "system sztucznej inteligencji"
60
+ },
61
+ "definition": "A machine-based system designed to operate with varying levels of autonomy that infers from input how to generate outputs (Art. 3(1))",
62
+ "usage_context": "Core term used throughout all UI screens, documents, and compliance workflows"
63
+ },
64
+ {
65
+ "english_term": "Provider",
66
+ "local_terms": {
67
+ "de": "Anbieter",
68
+ "fr": "fournisseur",
69
+ "es": "proveedor",
70
+ "it": "fornitore",
71
+ "nl": "aanbieder",
72
+ "pt": "prestador",
73
+ "pl": "dostawca"
74
+ },
75
+ "definition": "Entity that develops an AI system or GPAI model and places it on market under its own name (Art. 3(3))",
76
+ "usage_context": "Role selector in onboarding, obligation filtering, dashboard labels"
77
+ },
78
+ {
79
+ "english_term": "Deployer",
80
+ "local_terms": {
81
+ "de": "Betreiber",
82
+ "fr": "déployeur",
83
+ "es": "responsable del despliegue",
84
+ "it": "deployer (utilizzatore)",
85
+ "nl": "gebruiksverantwoordelijke",
86
+ "pt": "responsável pela implantação",
87
+ "pl": "podmiot stosujący"
88
+ },
89
+ "definition": "Entity using an AI system under its authority, except for personal non-professional use (Art. 3(4))",
90
+ "usage_context": "Role selector in onboarding, obligation filtering, dashboard labels"
91
+ },
92
+ {
93
+ "english_term": "High-risk AI system",
94
+ "local_terms": {
95
+ "de": "Hochrisiko-KI-System",
96
+ "fr": "système d'IA à haut risque",
97
+ "es": "sistema de IA de alto riesgo",
98
+ "it": "sistema di IA ad alto rischio",
99
+ "nl": "AI-systeem met een hoog risico",
100
+ "pt": "sistema de IA de alto risco",
101
+ "pl": "system sztucznej inteligencji wysokiego ryzyka"
102
+ },
103
+ "definition": "AI system falling under Article 6 criteria (Annex II product safety or Annex III use cases)",
104
+ "usage_context": "Risk classification results, obligation cards, compliance score breakdown"
105
+ },
106
+ {
107
+ "english_term": "Conformity assessment",
108
+ "local_terms": {
109
+ "de": "Konformitätsbewertung",
110
+ "fr": "évaluation de la conformité",
111
+ "es": "evaluación de la conformidad",
112
+ "it": "valutazione della conformità",
113
+ "nl": "conformiteitsbeoordeling",
114
+ "pt": "avaliação da conformidade",
115
+ "pl": "ocena zgodności"
116
+ },
117
+ "definition": "Process of verifying that a high-risk AI system meets all AI Act requirements (Art. 43)",
118
+ "usage_context": "Provider compliance workflow, assessment status tracking"
119
+ },
120
+ {
121
+ "english_term": "Fundamental rights impact assessment",
122
+ "local_terms": {
123
+ "de": "Grundrechte-Folgenabschätzung",
124
+ "fr": "analyse d'impact sur les droits fondamentaux",
125
+ "es": "evaluación de impacto en derechos fundamentales",
126
+ "it": "valutazione d'impatto sui diritti fondamentali",
127
+ "nl": "effectbeoordeling op grondrechten",
128
+ "pt": "avaliação de impacto nos direitos fundamentais",
129
+ "pl": "ocena wpływu na prawa podstawowe"
130
+ },
131
+ "definition": "Assessment public/certain private deployers must conduct before deploying high-risk AI (Art. 27)",
132
+ "usage_context": "FRIA workflow, deployer compliance dashboard, document templates"
133
+ },
134
+ {
135
+ "english_term": "General-purpose AI model",
136
+ "local_terms": {
137
+ "de": "KI-Modell mit allgemeinem Verwendungszweck",
138
+ "fr": "modèle d'IA à usage général",
139
+ "es": "modelo de IA de uso general",
140
+ "it": "modello di IA per finalità generali",
141
+ "nl": "AI-model voor algemene doeleinden",
142
+ "pt": "modelo de IA de finalidade geral",
143
+ "pl": "model sztucznej inteligencji ogólnego przeznaczenia"
144
+ },
145
+ "definition": "AI model displaying significant generality, capable of performing wide range of distinct tasks (Art. 3(63))",
146
+ "usage_context": "Classification workflow, GPAI provider obligations section"
147
+ },
148
+ {
149
+ "english_term": "AI literacy",
150
+ "local_terms": {
151
+ "de": "KI-Kompetenz",
152
+ "fr": "maîtrise de l'IA",
153
+ "es": "alfabetización en materia de IA",
154
+ "it": "alfabetizzazione in materia di IA",
155
+ "nl": "AI-geletterdheid",
156
+ "pt": "literacia em matéria de IA",
157
+ "pl": "umiejętność korzystania z AI"
158
+ },
159
+ "definition": "Skills, knowledge and understanding allowing informed deployment and use of AI systems (Art. 3(56))",
160
+ "usage_context": "Training module, AI literacy obligation card, compliance checklist"
161
+ }
162
+ ],
163
+ "date_format": "DD/MM/YYYY (EU standard) or YYYY-MM-DD (ISO 8601 for technical/API use)",
164
+ "currency": "EUR (€) — all fines and financial references in euros",
165
+ "cultural_notes": [
166
+ "EU is not a monolithic market — compliance culture, enforcement intensity, and AI adoption vary significantly across Member States",
167
+ "Germany has the strongest compliance culture and is likely to be among the first/strictest enforcers. Prioritize DE localization.",
168
+ "France has a strong AI industry (Mistral, etc.) and active regulatory engagement. FR localization is high priority.",
169
+ "Netherlands is a major tech hub with relatively pragmatic regulatory approach.",
170
+ "Nordic countries (SE, DK, FI) have high AI adoption and value transparency — green/sustainability positioning resonates.",
171
+ "Southern/Eastern EU markets may have longer adoption curves but are catching up rapidly.",
172
+ "Works councils (Betriebsräte in Germany) are a major factor in worker notification obligations — strong cultural and legal importance.",
173
+ "Data protection culture is deeply ingrained in EU — GDPR compliance is baseline expectation. AI Act compliance should be positioned as GDPR's natural extension.",
174
+ "Many EU companies already have ISO 27001 or similar certifications — position AI Act compliance as complementary to existing frameworks."
175
+ ]
176
+ },
177
+ "version": {
178
+ "framework_version": "3.0-production",
179
+ "processed_date": "2026-02-17",
180
+ "source_regulation_version": "Regulation (EU) 2024/1689 as published in OJ L 2024/1689",
181
+ "processing_prompt_version": "12-stage-v2",
182
+ "last_regulatory_update_checked": "2025-12-17 (Code of Practice on content marking draft)",
183
+ "next_review_due": "2026-03-01",
184
+ "notes": "Production-grade framework with granular obligation decomposition, full what_not_to_do coverage, expanded deployer obligations, and comprehensive tech specs for scanner."
185
+ }
186
+ }