@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.
- package/.well-known/ai-compliance.json +16 -0
- package/COMPLIANCE.md +64 -0
- package/data/data-integrity.test.ts +75 -0
- package/data/eval/eval-mappings.json +33 -0
- package/data/llm/model-pricing.json +15 -0
- package/data/llm/model-routing.json +36 -0
- package/data/onboarding/risk-profile.json +17 -0
- package/data/regulations/eu-ai-act/README.md +245 -0
- package/data/regulations/eu-ai-act/applicability-tree.json +160 -0
- package/data/regulations/eu-ai-act/cross-mapping.json +175 -0
- package/data/regulations/eu-ai-act/localization.json +186 -0
- package/data/regulations/eu-ai-act/obligations.json +3981 -0
- package/data/regulations/eu-ai-act/regulation-meta.json +482 -0
- package/data/regulations/eu-ai-act/scoring.json +342 -0
- package/data/regulations/eu-ai-act/technical-requirements.json +2590 -0
- package/data/regulations/eu-ai-act/timeline.json +160 -0
- package/data/regulations/jurisdictions/at.json +15 -0
- package/data/regulations/jurisdictions/be.json +15 -0
- package/data/regulations/jurisdictions/bg.json +15 -0
- package/data/regulations/jurisdictions/cy.json +15 -0
- package/data/regulations/jurisdictions/cz.json +15 -0
- package/data/regulations/jurisdictions/de.json +15 -0
- package/data/regulations/jurisdictions/dk.json +15 -0
- package/data/regulations/jurisdictions/ee.json +15 -0
- package/data/regulations/jurisdictions/es.json +15 -0
- package/data/regulations/jurisdictions/fi.json +15 -0
- package/data/regulations/jurisdictions/fr.json +15 -0
- package/data/regulations/jurisdictions/gr.json +15 -0
- package/data/regulations/jurisdictions/hr.json +15 -0
- package/data/regulations/jurisdictions/hu.json +15 -0
- package/data/regulations/jurisdictions/ie.json +15 -0
- package/data/regulations/jurisdictions/is.json +15 -0
- package/data/regulations/jurisdictions/it.json +15 -0
- package/data/regulations/jurisdictions/li.json +15 -0
- package/data/regulations/jurisdictions/lt.json +15 -0
- package/data/regulations/jurisdictions/lu.json +15 -0
- package/data/regulations/jurisdictions/lv.json +15 -0
- package/data/regulations/jurisdictions/mt.json +15 -0
- package/data/regulations/jurisdictions/nl.json +15 -0
- package/data/regulations/jurisdictions/no.json +15 -0
- package/data/regulations/jurisdictions/pl.json +15 -0
- package/data/regulations/jurisdictions/pt.json +15 -0
- package/data/regulations/jurisdictions/ro.json +15 -0
- package/data/regulations/jurisdictions/se.json +15 -0
- package/data/regulations/jurisdictions/si.json +15 -0
- package/data/regulations/jurisdictions/sk.json +15 -0
- package/data/scanner/check-id-categories.json +81 -0
- package/data/scanner/confidence-params.json +16 -0
- package/data/scanner/limits.json +4 -0
- package/data/schemas/http-contract-sample.json +79 -0
- package/data/schemas/http-contract.json +144 -0
- package/data/semgrep-rules/bare-call.yaml +37 -0
- package/data/semgrep-rules/injection.yaml +73 -0
- package/data/semgrep-rules/missing-error-handling.yaml +58 -0
- package/data/semgrep-rules/unsafe-deser.yaml +65 -0
- package/data/templates/eu-ai-act/ai-literacy.md +184 -0
- package/data/templates/eu-ai-act/art5-screening.md +131 -0
- package/data/templates/eu-ai-act/data-governance.md +145 -0
- package/data/templates/eu-ai-act/declaration-of-conformity.md +161 -0
- package/data/templates/eu-ai-act/fria.md +127 -0
- package/data/templates/eu-ai-act/gpai-systemic-risk.md +150 -0
- package/data/templates/eu-ai-act/gpai-transparency.md +166 -0
- package/data/templates/eu-ai-act/incident-report.md +188 -0
- package/data/templates/eu-ai-act/instructions-for-use.md +202 -0
- package/data/templates/eu-ai-act/monitoring-policy.md +110 -0
- package/data/templates/eu-ai-act/qms.md +180 -0
- package/data/templates/eu-ai-act/risk-management-system.md +123 -0
- package/data/templates/eu-ai-act/technical-documentation.md +287 -0
- package/data/templates/eu-ai-act/worker-notification.md +143 -0
- package/data/templates/policies/biometrics-ai-policy.md +214 -0
- package/data/templates/policies/critical-infra-ai-policy.md +228 -0
- package/data/templates/policies/education-ai-policy.md +184 -0
- package/data/templates/policies/finance-ai-policy.md +191 -0
- package/data/templates/policies/healthcare-ai-policy.md +197 -0
- package/data/templates/policies/hr-ai-policy.md +178 -0
- package/data/templates/policies/legal-ai-policy.md +189 -0
- package/data/templates/policies/migration-ai-policy.md +239 -0
- package/engine.log +7 -0
- package/package.json +74 -0
- package/src/composition-root.ts +791 -0
- package/src/data/eval/conformity-tests.test.ts +122 -0
- package/src/data/eval/ct-1-transparency.ts +106 -0
- package/src/data/eval/ct-10-gpai.ts +25 -0
- package/src/data/eval/ct-11-industry.ts +42 -0
- package/src/data/eval/ct-2-oversight.ts +41 -0
- package/src/data/eval/ct-3-explanation.ts +14 -0
- package/src/data/eval/ct-4-bias.ts +83 -0
- package/src/data/eval/ct-5-accuracy.ts +41 -0
- package/src/data/eval/ct-6-robustness.ts +81 -0
- package/src/data/eval/ct-7-prohibited.ts +52 -0
- package/src/data/eval/ct-8-logging.ts +68 -0
- package/src/data/eval/ct-9-risk-awareness.ts +33 -0
- package/src/data/eval/deterministic-evaluator.ts +120 -0
- package/src/data/eval/index.ts +55 -0
- package/src/data/eval/judge-prompts.ts +146 -0
- package/src/data/eval/llm-judged-tests.ts +279 -0
- package/src/data/eval/llm-tests.test.ts +83 -0
- package/src/data/eval/remediation/ct-1-transparency.ts +91 -0
- package/src/data/eval/remediation/ct-10-gpai.ts +94 -0
- package/src/data/eval/remediation/ct-11-industry.ts +94 -0
- package/src/data/eval/remediation/ct-2-oversight.ts +71 -0
- package/src/data/eval/remediation/ct-3-explanation.ts +70 -0
- package/src/data/eval/remediation/ct-4-bias.ts +70 -0
- package/src/data/eval/remediation/ct-5-accuracy.ts +70 -0
- package/src/data/eval/remediation/ct-6-robustness.ts +70 -0
- package/src/data/eval/remediation/ct-7-prohibited.ts +94 -0
- package/src/data/eval/remediation/ct-8-logging.ts +94 -0
- package/src/data/eval/remediation/ct-9-risk-awareness.ts +94 -0
- package/src/data/eval/remediation/index.ts +89 -0
- package/src/data/eval/remediation/owasp-art5.ts +15 -0
- package/src/data/eval/remediation/owasp-llm01.ts +72 -0
- package/src/data/eval/remediation/owasp-llm02.ts +72 -0
- package/src/data/eval/remediation/owasp-llm03.ts +15 -0
- package/src/data/eval/remediation/owasp-llm04.ts +15 -0
- package/src/data/eval/remediation/owasp-llm05.ts +15 -0
- package/src/data/eval/remediation/owasp-llm06.ts +15 -0
- package/src/data/eval/remediation/owasp-llm07.ts +15 -0
- package/src/data/eval/remediation/owasp-llm08.ts +15 -0
- package/src/data/eval/remediation/owasp-llm09.ts +15 -0
- package/src/data/eval/remediation/owasp-llm10.ts +15 -0
- package/src/data/eval/remediation/remediation.test.ts +229 -0
- package/src/data/eval/remediation/test-mapping.ts +290 -0
- package/src/data/eval/security-rubrics.ts +381 -0
- package/src/data/finding-explanations.json +453 -0
- package/src/data/industry-patterns.ts +161 -0
- package/src/data/registry-cards.ts +368 -0
- package/src/data/regulation/index.ts +5 -0
- package/src/data/regulation/jurisdiction-data.test.ts +73 -0
- package/src/data/regulation/jurisdiction-data.ts +65 -0
- package/src/data/regulation/regulation-data.ts +19 -0
- package/src/data/regulation/regulation-loader.test.ts +107 -0
- package/src/data/regulation/regulation-loader.ts +56 -0
- package/src/data/scanner-constants.ts +46 -0
- package/src/data/schemas/schemas-core.ts +140 -0
- package/src/data/schemas/schemas-supplementary.ts +211 -0
- package/src/data/schemas/schemas.ts +28 -0
- package/src/data/security/attack-probes.test.ts +62 -0
- package/src/data/security/attack-probes.ts +496 -0
- package/src/data/security/eu-ai-act-security.ts +40 -0
- package/src/data/security/index.ts +19 -0
- package/src/data/security/mitre-atlas.test.ts +43 -0
- package/src/data/security/mitre-atlas.ts +93 -0
- package/src/data/security/nist-ai-rmf.ts +43 -0
- package/src/data/security/owasp-llm-top10.test.ts +60 -0
- package/src/data/security/owasp-llm-top10.ts +138 -0
- package/src/data/template-registry.ts +53 -0
- package/src/data/tool-versions.json +22 -0
- package/src/domain/audit/audit-package.test.ts +152 -0
- package/src/domain/audit/audit-package.ts +166 -0
- package/src/domain/audit/audit-trail.test.ts +121 -0
- package/src/domain/audit/audit-trail.ts +174 -0
- package/src/domain/audit/index.ts +8 -0
- package/src/domain/audit/permissions-matrix.test.ts +136 -0
- package/src/domain/audit/permissions-matrix.ts +121 -0
- package/src/domain/certification/adversarial/bias-tests.ts +95 -0
- package/src/domain/certification/adversarial/evaluators.ts +304 -0
- package/src/domain/certification/adversarial/index.ts +11 -0
- package/src/domain/certification/adversarial/prompt-injection.ts +103 -0
- package/src/domain/certification/adversarial/safety-boundary.ts +132 -0
- package/src/domain/certification/aiuc1-readiness.test.ts +236 -0
- package/src/domain/certification/aiuc1-readiness.ts +298 -0
- package/src/domain/certification/aiuc1-requirements.ts +235 -0
- package/src/domain/certification/index.ts +10 -0
- package/src/domain/certification/redteam-runner.test.ts +97 -0
- package/src/domain/certification/redteam-runner.ts +205 -0
- package/src/domain/certification/test-runner.test.ts +232 -0
- package/src/domain/certification/test-runner.ts +289 -0
- package/src/domain/cost/cost-estimator.test.ts +187 -0
- package/src/domain/cost/cost-estimator.ts +133 -0
- package/src/domain/disclaimer.test.ts +52 -0
- package/src/domain/disclaimer.ts +39 -0
- package/src/domain/documents/ai-enricher.test.ts +120 -0
- package/src/domain/documents/ai-enricher.ts +159 -0
- package/src/domain/documents/document-generator.test.ts +318 -0
- package/src/domain/documents/document-generator.ts +239 -0
- package/src/domain/documents/index.ts +9 -0
- package/src/domain/documents/passport-helpers.ts +25 -0
- package/src/domain/documents/policy-generator.test.ts +252 -0
- package/src/domain/documents/policy-generator.ts +94 -0
- package/src/domain/documents/worker-notification-generator.test.ts +162 -0
- package/src/domain/documents/worker-notification-generator.ts +141 -0
- package/src/domain/eval/adapters/adapter-port.ts +94 -0
- package/src/domain/eval/adapters/adapters.test.ts +303 -0
- package/src/domain/eval/adapters/anthropic-adapter.ts +57 -0
- package/src/domain/eval/adapters/auto-detect.ts +104 -0
- package/src/domain/eval/adapters/create-chat-adapter.ts +106 -0
- package/src/domain/eval/adapters/custom-adapter.ts +74 -0
- package/src/domain/eval/adapters/http-adapter.ts +66 -0
- package/src/domain/eval/adapters/index.ts +7 -0
- package/src/domain/eval/adapters/ollama-adapter.ts +48 -0
- package/src/domain/eval/adapters/openai-adapter.ts +58 -0
- package/src/domain/eval/adapters/with-timeout.ts +25 -0
- package/src/domain/eval/conformity-score.test.ts +161 -0
- package/src/domain/eval/conformity-score.ts +135 -0
- package/src/domain/eval/eval-constants.ts +55 -0
- package/src/domain/eval/eval-evidence.test.ts +85 -0
- package/src/domain/eval/eval-evidence.ts +103 -0
- package/src/domain/eval/eval-fix-generator.test.ts +421 -0
- package/src/domain/eval/eval-fix-generator.ts +205 -0
- package/src/domain/eval/eval-passport.test.ts +82 -0
- package/src/domain/eval/eval-passport.ts +89 -0
- package/src/domain/eval/eval-remediation-report.test.ts +682 -0
- package/src/domain/eval/eval-remediation-report.ts +170 -0
- package/src/domain/eval/eval-report.ts +108 -0
- package/src/domain/eval/eval-runner.test.ts +609 -0
- package/src/domain/eval/eval-runner.ts +593 -0
- package/src/domain/eval/eval-to-findings.test.ts +293 -0
- package/src/domain/eval/eval-to-findings.ts +83 -0
- package/src/domain/eval/index.ts +31 -0
- package/src/domain/eval/llm-judge.test.ts +139 -0
- package/src/domain/eval/llm-judge.ts +168 -0
- package/src/domain/eval/remediation-types.ts +90 -0
- package/src/domain/eval/security-integration.test.ts +196 -0
- package/src/domain/eval/security-integration.ts +136 -0
- package/src/domain/eval/types.test.ts +173 -0
- package/src/domain/eval/types.ts +244 -0
- package/src/domain/eval/verdict-utils.ts +45 -0
- package/src/domain/fixer/create-fixer.ts +101 -0
- package/src/domain/fixer/diff.ts +70 -0
- package/src/domain/fixer/fix-history.ts +23 -0
- package/src/domain/fixer/fixer.test.ts +306 -0
- package/src/domain/fixer/index.ts +9 -0
- package/src/domain/fixer/strategies/bandit-fix.ts +61 -0
- package/src/domain/fixer/strategies/bias-testing.ts +49 -0
- package/src/domain/fixer/strategies/ci-compliance.ts +57 -0
- package/src/domain/fixer/strategies/content-marking.ts +45 -0
- package/src/domain/fixer/strategies/cve-upgrade.ts +66 -0
- package/src/domain/fixer/strategies/data-governance.ts +65 -0
- package/src/domain/fixer/strategies/disclosure.ts +69 -0
- package/src/domain/fixer/strategies/doc-code-sync.ts +53 -0
- package/src/domain/fixer/strategies/documentation.ts +59 -0
- package/src/domain/fixer/strategies/error-handler.ts +63 -0
- package/src/domain/fixer/strategies/hitl-gate.ts +67 -0
- package/src/domain/fixer/strategies/index.ts +61 -0
- package/src/domain/fixer/strategies/kill-switch-test.ts +85 -0
- package/src/domain/fixer/strategies/kill-switch.ts +53 -0
- package/src/domain/fixer/strategies/license-fix.ts +57 -0
- package/src/domain/fixer/strategies/log-retention.ts +40 -0
- package/src/domain/fixer/strategies/logging.ts +59 -0
- package/src/domain/fixer/strategies/metadata.ts +45 -0
- package/src/domain/fixer/strategies/permission-guard.ts +84 -0
- package/src/domain/fixer/strategies/record-keeping.ts +69 -0
- package/src/domain/fixer/strategies/secret-rotation.ts +52 -0
- package/src/domain/fixer/strategies.test.ts +341 -0
- package/src/domain/fixer/template-engine.test.ts +64 -0
- package/src/domain/fixer/template-engine.ts +38 -0
- package/src/domain/fixer/types.ts +88 -0
- package/src/domain/frameworks/aiuc1-framework.test.ts +159 -0
- package/src/domain/frameworks/aiuc1-framework.ts +126 -0
- package/src/domain/frameworks/collect-foundation-metrics.test.ts +96 -0
- package/src/domain/frameworks/collect-foundation-metrics.ts +34 -0
- package/src/domain/frameworks/eu-ai-act-framework.test.ts +117 -0
- package/src/domain/frameworks/eu-ai-act-framework.ts +100 -0
- package/src/domain/frameworks/framework-registry.test.ts +91 -0
- package/src/domain/frameworks/framework-registry.ts +38 -0
- package/src/domain/frameworks/index.ts +8 -0
- package/src/domain/frameworks/mitre-atlas-framework.test.ts +53 -0
- package/src/domain/frameworks/mitre-atlas-framework.ts +53 -0
- package/src/domain/frameworks/owasp-llm-framework.test.ts +77 -0
- package/src/domain/frameworks/owasp-llm-framework.ts +54 -0
- package/src/domain/frameworks/score-plugin-framework.ts +117 -0
- package/src/domain/fria/fria-generator.test.ts +273 -0
- package/src/domain/fria/fria-generator.ts +366 -0
- package/src/domain/import/promptfoo-importer.test.ts +103 -0
- package/src/domain/import/promptfoo-importer.ts +151 -0
- package/src/domain/onboarding/guided-onboarding.test.ts +144 -0
- package/src/domain/onboarding/guided-onboarding.ts +135 -0
- package/src/domain/passport/builder/domain-mapper.ts +9 -0
- package/src/domain/passport/builder/manifest-builder.test.ts +546 -0
- package/src/domain/passport/builder/manifest-builder.ts +535 -0
- package/src/domain/passport/builder/manifest-diff.test.ts +105 -0
- package/src/domain/passport/builder/manifest-diff.ts +89 -0
- package/src/domain/passport/builder/manifest-files.ts +17 -0
- package/src/domain/passport/crypto-signer.test.ts +93 -0
- package/src/domain/passport/crypto-signer.ts +157 -0
- package/src/domain/passport/discovery/agent-discovery.test.ts +296 -0
- package/src/domain/passport/discovery/agent-discovery.ts +325 -0
- package/src/domain/passport/discovery/autonomy-analyzer.test.ts +141 -0
- package/src/domain/passport/discovery/autonomy-analyzer.ts +113 -0
- package/src/domain/passport/discovery/permission-scanner.test.ts +191 -0
- package/src/domain/passport/discovery/permission-scanner.ts +414 -0
- package/src/domain/passport/export/a2a-mapper.ts +75 -0
- package/src/domain/passport/export/aiuc1-mapper.ts +126 -0
- package/src/domain/passport/export/export.test.ts +207 -0
- package/src/domain/passport/export/index.ts +41 -0
- package/src/domain/passport/export/nist-mapper.ts +227 -0
- package/src/domain/passport/import/a2a-importer.test.ts +133 -0
- package/src/domain/passport/import/a2a-importer.ts +156 -0
- package/src/domain/passport/import/index.ts +2 -0
- package/src/domain/passport/index.ts +32 -0
- package/src/domain/passport/obligation-field-map.test.ts +113 -0
- package/src/domain/passport/obligation-field-map.ts +117 -0
- package/src/domain/passport/passport-validator.test.ts +156 -0
- package/src/domain/passport/passport-validator.ts +126 -0
- package/src/domain/passport/scan-to-compliance.test.ts +336 -0
- package/src/domain/passport/scan-to-compliance.ts +166 -0
- package/src/domain/passport/test-generator.test.ts +93 -0
- package/src/domain/passport/test-generator.ts +136 -0
- package/src/domain/proxy/index.ts +11 -0
- package/src/domain/proxy/json-rpc.test.ts +72 -0
- package/src/domain/proxy/json-rpc.ts +53 -0
- package/src/domain/proxy/policy-engine.test.ts +259 -0
- package/src/domain/proxy/policy-engine.ts +137 -0
- package/src/domain/proxy/proxy-bridge.ts +125 -0
- package/src/domain/proxy/proxy-interceptor.test.ts +184 -0
- package/src/domain/proxy/proxy-interceptor.ts +120 -0
- package/src/domain/proxy/proxy-types.ts +35 -0
- package/src/domain/registry/compute-agent-score.test.ts +279 -0
- package/src/domain/registry/compute-agent-score.ts +162 -0
- package/src/domain/reporter/audit-report.test.ts +87 -0
- package/src/domain/reporter/audit-report.ts +116 -0
- package/src/domain/reporter/badge-generator.test.ts +54 -0
- package/src/domain/reporter/badge-generator.ts +40 -0
- package/src/domain/reporter/compliance-md.ts +45 -0
- package/src/domain/reporter/index.ts +7 -0
- package/src/domain/reporter/pdf-renderer.ts +282 -0
- package/src/domain/reporter/share.test.ts +92 -0
- package/src/domain/reporter/share.ts +80 -0
- package/src/domain/scanner/ast/swc-analyzer.test.ts +49 -0
- package/src/domain/scanner/ast/swc-analyzer.ts +124 -0
- package/src/domain/scanner/attestations.ts +97 -0
- package/src/domain/scanner/checks/ai-disclosure.test.ts +90 -0
- package/src/domain/scanner/checks/ai-disclosure.ts +54 -0
- package/src/domain/scanner/checks/ai-literacy.ts +163 -0
- package/src/domain/scanner/checks/behavioral-constraints.test.ts +167 -0
- package/src/domain/scanner/checks/behavioral-constraints.ts +86 -0
- package/src/domain/scanner/checks/compliance-metadata.ts +63 -0
- package/src/domain/scanner/checks/content-marking.ts +74 -0
- package/src/domain/scanner/checks/dep-deep-scan.test.ts +318 -0
- package/src/domain/scanner/checks/dep-deep-scan.ts +137 -0
- package/src/domain/scanner/checks/documentation.test.ts +88 -0
- package/src/domain/scanner/checks/documentation.ts +79 -0
- package/src/domain/scanner/checks/git-history.test.ts +120 -0
- package/src/domain/scanner/checks/git-history.ts +163 -0
- package/src/domain/scanner/checks/gpai-systemic-risk.test.ts +84 -0
- package/src/domain/scanner/checks/gpai-systemic-risk.ts +98 -0
- package/src/domain/scanner/checks/gpai-transparency.ts +94 -0
- package/src/domain/scanner/checks/index.ts +28 -0
- package/src/domain/scanner/checks/industry/index.ts +40 -0
- package/src/domain/scanner/checks/industry/industry.test.ts +287 -0
- package/src/domain/scanner/checks/interaction-logging.test.ts +113 -0
- package/src/domain/scanner/checks/interaction-logging.ts +142 -0
- package/src/domain/scanner/checks/nhi-scanner.test.ts +158 -0
- package/src/domain/scanner/checks/nhi-scanner.ts +78 -0
- package/src/domain/scanner/checks/passport-completeness.test.ts +127 -0
- package/src/domain/scanner/checks/passport-completeness.ts +82 -0
- package/src/domain/scanner/checks/passport-presence.test.ts +56 -0
- package/src/domain/scanner/checks/passport-presence.ts +78 -0
- package/src/domain/scanner/checks/pattern-check-factory.ts +70 -0
- package/src/domain/scanner/checks/permission-scanner.test.ts +279 -0
- package/src/domain/scanner/checks/permission-scanner.ts +90 -0
- package/src/domain/scanner/checks/presence-check-factory.test.ts +124 -0
- package/src/domain/scanner/checks/presence-check-factory.ts +275 -0
- package/src/domain/scanner/compliance-diff.test.ts +165 -0
- package/src/domain/scanner/compliance-diff.ts +138 -0
- package/src/domain/scanner/confidence.test.ts +235 -0
- package/src/domain/scanner/confidence.ts +156 -0
- package/src/domain/scanner/constants.ts +13 -0
- package/src/domain/scanner/create-scanner.ts +573 -0
- package/src/domain/scanner/cross-layer.test.ts +372 -0
- package/src/domain/scanner/cross-layer.ts +232 -0
- package/src/domain/scanner/data/ai-packages.ts +82 -0
- package/src/domain/scanner/debt-calculator.test.ts +89 -0
- package/src/domain/scanner/debt-calculator.ts +111 -0
- package/src/domain/scanner/drift.test.ts +191 -0
- package/src/domain/scanner/drift.ts +73 -0
- package/src/domain/scanner/evidence-store.test.ts +207 -0
- package/src/domain/scanner/evidence-store.ts +195 -0
- package/src/domain/scanner/evidence.test.ts +104 -0
- package/src/domain/scanner/evidence.ts +71 -0
- package/src/domain/scanner/external/bandit-runner.test.ts +45 -0
- package/src/domain/scanner/external/bandit-runner.ts +90 -0
- package/src/domain/scanner/external/checks.ts +321 -0
- package/src/domain/scanner/external/dedup.test.ts +79 -0
- package/src/domain/scanner/external/dedup.ts +94 -0
- package/src/domain/scanner/external/detect-secrets-runner.test.ts +58 -0
- package/src/domain/scanner/external/detect-secrets-runner.ts +81 -0
- package/src/domain/scanner/external/external-scanner.test.ts +221 -0
- package/src/domain/scanner/external/external-scanner.ts +36 -0
- package/src/domain/scanner/external/finding-mapper.test.ts +95 -0
- package/src/domain/scanner/external/finding-mapper.ts +138 -0
- package/src/domain/scanner/external/index.ts +15 -0
- package/src/domain/scanner/external/mappings.ts +93 -0
- package/src/domain/scanner/external/modelscan-runner.test.ts +35 -0
- package/src/domain/scanner/external/modelscan-runner.ts +101 -0
- package/src/domain/scanner/external/path-utils.ts +8 -0
- package/src/domain/scanner/external/runner-port.ts +45 -0
- package/src/domain/scanner/external/semgrep-runner.test.ts +52 -0
- package/src/domain/scanner/external/semgrep-runner.ts +94 -0
- package/src/domain/scanner/external/types.ts +32 -0
- package/src/domain/scanner/finding-attribution.test.ts +444 -0
- package/src/domain/scanner/finding-attribution.ts +195 -0
- package/src/domain/scanner/finding-explainer.test.ts +157 -0
- package/src/domain/scanner/finding-explainer.ts +73 -0
- package/src/domain/scanner/fix-diff-builder.test.ts +272 -0
- package/src/domain/scanner/fix-diff-builder.ts +477 -0
- package/src/domain/scanner/import-graph.test.ts +162 -0
- package/src/domain/scanner/import-graph.ts +198 -0
- package/src/domain/scanner/languages/adapter.test.ts +105 -0
- package/src/domain/scanner/languages/adapter.ts +239 -0
- package/src/domain/scanner/layers/index.ts +24 -0
- package/src/domain/scanner/layers/layer1-files.ts +54 -0
- package/src/domain/scanner/layers/layer2-docs.test.ts +1207 -0
- package/src/domain/scanner/layers/layer2-docs.ts +297 -0
- package/src/domain/scanner/layers/layer2-parsing.ts +217 -0
- package/src/domain/scanner/layers/layer3-config.test.ts +187 -0
- package/src/domain/scanner/layers/layer3-config.ts +279 -0
- package/src/domain/scanner/layers/layer3-parsers.ts +73 -0
- package/src/domain/scanner/layers/layer4-patterns.test.ts +397 -0
- package/src/domain/scanner/layers/layer4-patterns.ts +216 -0
- package/src/domain/scanner/layers/layer5-docs.test.ts +99 -0
- package/src/domain/scanner/layers/layer5-docs.ts +250 -0
- package/src/domain/scanner/layers/layer5-llm.test.ts +146 -0
- package/src/domain/scanner/layers/layer5-llm.ts +262 -0
- package/src/domain/scanner/layers/layer5-targeted.test.ts +93 -0
- package/src/domain/scanner/layers/layer5-targeted.ts +233 -0
- package/src/domain/scanner/layers/lockfile-parsers.test.ts +320 -0
- package/src/domain/scanner/layers/lockfile-parsers.ts +184 -0
- package/src/domain/scanner/regulation-version.test.ts +54 -0
- package/src/domain/scanner/regulation-version.ts +23 -0
- package/src/domain/scanner/role-filter.test.ts +116 -0
- package/src/domain/scanner/role-filter.ts +51 -0
- package/src/domain/scanner/rules/banned-packages-data.ts +553 -0
- package/src/domain/scanner/rules/banned-packages-sdk.ts +65 -0
- package/src/domain/scanner/rules/banned-packages.test.ts +249 -0
- package/src/domain/scanner/rules/banned-packages.ts +55 -0
- package/src/domain/scanner/rules/comment-filter.test.ts +115 -0
- package/src/domain/scanner/rules/comment-filter.ts +297 -0
- package/src/domain/scanner/rules/index.ts +9 -0
- package/src/domain/scanner/rules/nhi-patterns.test.ts +128 -0
- package/src/domain/scanner/rules/nhi-patterns.ts +60 -0
- package/src/domain/scanner/rules/pattern-rules.ts +1152 -0
- package/src/domain/scanner/sbom.test.ts +136 -0
- package/src/domain/scanner/sbom.ts +103 -0
- package/src/domain/scanner/scan-cache.test.ts +136 -0
- package/src/domain/scanner/scan-cache.ts +115 -0
- package/src/domain/scanner/scanner.test.ts +125 -0
- package/src/domain/scanner/score-calculator.test.ts +363 -0
- package/src/domain/scanner/score-calculator.ts +189 -0
- package/src/domain/scanner/security-score.test.ts +107 -0
- package/src/domain/scanner/security-score.ts +116 -0
- package/src/domain/scanner/source-filter.ts +24 -0
- package/src/domain/scanner/validators.ts +223 -0
- package/src/domain/shared/compliance-constants.ts +48 -0
- package/src/domain/shared/disclosure-patterns.ts +16 -0
- package/src/domain/shared/index.ts +6 -0
- package/src/domain/shared/parse-dependencies.ts +21 -0
- package/src/domain/supply-chain/dependency-analyzer.ts +138 -0
- package/src/domain/supply-chain/index.ts +3 -0
- package/src/domain/supply-chain/supply-chain.test.ts +211 -0
- package/src/domain/supply-chain/types.ts +32 -0
- package/src/domain/whatif/config-fixer.ts +187 -0
- package/src/domain/whatif/index.ts +6 -0
- package/src/domain/whatif/scenario-engine.ts +121 -0
- package/src/domain/whatif/simulate-actions.test.ts +161 -0
- package/src/domain/whatif/simulate-actions.ts +114 -0
- package/src/domain/whatif/whatif.test.ts +135 -0
- package/src/e2e/gaps-e2e.test.ts +259 -0
- package/src/e2e/smoke.test.ts +101 -0
- package/src/hooks/hooks-export.test.ts +81 -0
- package/src/hooks/installer.ts +113 -0
- package/src/http/cors.test.ts +38 -0
- package/src/http/create-router.ts +259 -0
- package/src/http/routes/agent.route.ts +380 -0
- package/src/http/routes/audit.route.ts +66 -0
- package/src/http/routes/badge.route.ts +23 -0
- package/src/http/routes/cert.route.ts +66 -0
- package/src/http/routes/chat.route.ts +228 -0
- package/src/http/routes/cost.route.ts +33 -0
- package/src/http/routes/debt.route.ts +29 -0
- package/src/http/routes/disclaimer.route.ts +64 -0
- package/src/http/routes/eval.route.ts +161 -0
- package/src/http/routes/events.route.test.ts +108 -0
- package/src/http/routes/events.route.ts +71 -0
- package/src/http/routes/external-scan.route.ts +24 -0
- package/src/http/routes/file.route.ts +54 -0
- package/src/http/routes/fix.route.ts +219 -0
- package/src/http/routes/frameworks.route.test.ts +66 -0
- package/src/http/routes/frameworks.route.ts +36 -0
- package/src/http/routes/git.route.ts +27 -0
- package/src/http/routes/guided-onboarding.route.ts +65 -0
- package/src/http/routes/import.route.ts +64 -0
- package/src/http/routes/jurisdiction.route.ts +22 -0
- package/src/http/routes/obligations.route.test.ts +122 -0
- package/src/http/routes/obligations.route.ts +110 -0
- package/src/http/routes/onboarding.route.ts +53 -0
- package/src/http/routes/provider.route.ts +42 -0
- package/src/http/routes/proxy.route.ts +40 -0
- package/src/http/routes/redteam.route.ts +84 -0
- package/src/http/routes/report.route.ts +29 -0
- package/src/http/routes/scan.route.ts +104 -0
- package/src/http/routes/share.route.ts +44 -0
- package/src/http/routes/shell.route.ts +27 -0
- package/src/http/routes/status.route.ts +66 -0
- package/src/http/routes/supply-chain.route.ts +121 -0
- package/src/http/routes/sync.route.ts +328 -0
- package/src/http/routes/tools.route.ts +29 -0
- package/src/http/routes/whatif.route.ts +96 -0
- package/src/http/utils/validation.ts +31 -0
- package/src/index.ts +1 -0
- package/src/infra/bundle-fetcher.ts +77 -0
- package/src/infra/cache-storage.ts +34 -0
- package/src/infra/event-bus.ts +31 -0
- package/src/infra/file-collector.ts +61 -0
- package/src/infra/file-ops-adapter.ts +95 -0
- package/src/infra/file-watcher.test.ts +90 -0
- package/src/infra/file-watcher.ts +106 -0
- package/src/infra/git-adapter.ts +93 -0
- package/src/infra/git-history-adapter.ts +41 -0
- package/src/infra/headless-browser.ts +178 -0
- package/src/infra/llm-adapter.test.ts +83 -0
- package/src/infra/llm-adapter.ts +86 -0
- package/src/infra/logger.ts +27 -0
- package/src/infra/project-config.test.ts +74 -0
- package/src/infra/project-config.ts +35 -0
- package/src/infra/rate-limiter.test.ts +36 -0
- package/src/infra/rate-limiter.ts +34 -0
- package/src/infra/retry.ts +46 -0
- package/src/infra/saas-client.ts +123 -0
- package/src/infra/search-adapter.ts +113 -0
- package/src/infra/shell-adapter.ts +68 -0
- package/src/infra/tool-manager.test.ts +99 -0
- package/src/infra/tool-manager.ts +197 -0
- package/src/llm/agents/agent-modes.test.ts +44 -0
- package/src/llm/agents/modes.ts +68 -0
- package/src/llm/routing/cost-routing.test.ts +37 -0
- package/src/llm/routing/cost-tracker.ts +74 -0
- package/src/llm/routing/model-routing.test.ts +79 -0
- package/src/llm/routing/model-routing.ts +38 -0
- package/src/llm/routing/pricing.ts +19 -0
- package/src/llm/sse-protocol.ts +77 -0
- package/src/llm/tool-definitions.ts +83 -0
- package/src/llm/tool-executors.ts +80 -0
- package/src/llm/tools/types.ts +13 -0
- package/src/mcp/create-mcp-stack.ts +82 -0
- package/src/mcp/handlers.ts +245 -0
- package/src/mcp/index.ts +28 -0
- package/src/mcp/mcp-server.test.ts +80 -0
- package/src/mcp/server.ts +79 -0
- package/src/mcp/tools.ts +48 -0
- package/src/onboarding/auto-detect.ts +164 -0
- package/src/onboarding/onboarding.test.ts +89 -0
- package/src/onboarding/profile.ts +169 -0
- package/src/onboarding/questions.ts +112 -0
- package/src/onboarding/wizard.ts +66 -0
- package/src/output/github-issue.ts +32 -0
- package/src/output/json-output.ts +67 -0
- package/src/ports/browser.port.ts +23 -0
- package/src/ports/events.port.ts +28 -0
- package/src/ports/llm.port.ts +23 -0
- package/src/ports/logger.port.ts +6 -0
- package/src/ports/process.port.ts +6 -0
- package/src/ports/scanner.port.ts +15 -0
- package/src/server.ts +134 -0
- package/src/services/badge-service.ts +67 -0
- package/src/services/chat-service.test.ts +162 -0
- package/src/services/chat-service.ts +152 -0
- package/src/services/cost-service.ts +52 -0
- package/src/services/debt-service.ts +65 -0
- package/src/services/eval-integration.test.ts +132 -0
- package/src/services/eval-service.test.ts +373 -0
- package/src/services/eval-service.ts +463 -0
- package/src/services/external-scan-service.ts +60 -0
- package/src/services/file-service.ts +37 -0
- package/src/services/fix-service.test.ts +470 -0
- package/src/services/fix-service.ts +648 -0
- package/src/services/framework-service.test.ts +159 -0
- package/src/services/framework-service.ts +67 -0
- package/src/services/onboarding-service.ts +165 -0
- package/src/services/passport-audit.ts +244 -0
- package/src/services/passport-documents.ts +258 -0
- package/src/services/passport-service-utils.ts +72 -0
- package/src/services/passport-service.test.ts +251 -0
- package/src/services/passport-service.ts +339 -0
- package/src/services/proxy-service.ts +81 -0
- package/src/services/report-service.ts +72 -0
- package/src/services/scan-service.test.ts +470 -0
- package/src/services/scan-service.ts +335 -0
- package/src/services/share-service.ts +108 -0
- package/src/services/shared/backup.ts +23 -0
- package/src/services/status-service.ts +38 -0
- package/src/services/undo-service.test.ts +190 -0
- package/src/services/undo-service.ts +144 -0
- package/src/test-helpers/factories.ts +116 -0
- package/src/types/common.schemas.ts +147 -0
- package/src/types/common.types.ts +292 -0
- package/src/types/contract.test.ts +217 -0
- package/src/types/errors.ts +52 -0
- package/src/types/framework.types.ts +87 -0
- package/src/types/passport-schemas.ts +241 -0
- package/src/types/passport.types.ts +296 -0
- package/src/version.ts +1 -0
- package/tsconfig.json +20 -0
- package/vitest.config.ts +9 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# AI Usage Policy — Critical Infrastructure
|
|
2
|
+
|
|
3
|
+
| Field | Value |
|
|
4
|
+
|-------|-------|
|
|
5
|
+
| Policy Title | AI Usage Policy — Critical Infrastructure |
|
|
6
|
+
| Organization | [Organization] |
|
|
7
|
+
| Date | [Date] |
|
|
8
|
+
| Version | [Version] |
|
|
9
|
+
| AI System Name | [AI System Name] |
|
|
10
|
+
| Risk Class | [Risk Class] |
|
|
11
|
+
|
|
12
|
+
## 1. Purpose and Scope
|
|
13
|
+
<!-- GUIDANCE: Critical infrastructure AI is high-risk under Annex III §2.
|
|
14
|
+
Covers: energy (electricity, gas, heating, oil), water supply & wastewater,
|
|
15
|
+
transport (road, rail, air, maritime), digital infrastructure, and any safety
|
|
16
|
+
component of critical infrastructure. Example: "Covers: AI-based load balancing
|
|
17
|
+
for national power grid (Annex III §2(a)), predictive maintenance for water
|
|
18
|
+
treatment (Annex III §2(b)), excludes non-safety administrative systems." -->
|
|
19
|
+
|
|
20
|
+
This policy governs the use of [AI System Name] within [Organization]'s critical infrastructure operations. It establishes requirements for safe, reliable and resilient use of AI in the management and operation of critical infrastructure, in accordance with the EU AI Act (Regulation 2024/1689) and the NIS2 Directive (EU 2022/2555).
|
|
21
|
+
|
|
22
|
+
This policy applies to all personnel involved in deploying, operating, supervising, or maintaining AI systems that serve as safety components of critical infrastructure, including control room operators, engineers, maintenance staff, and system administrators.
|
|
23
|
+
|
|
24
|
+
## 2. Applicable Legislation
|
|
25
|
+
<!-- GUIDANCE: Critical infrastructure AI is subject to AI Act, NIS2 Directive
|
|
26
|
+
(cybersecurity), sector-specific regulation (energy: Electricity Regulation;
|
|
27
|
+
transport: EASA; water: Drinking Water Directive), and potentially SEVESO III.
|
|
28
|
+
Example: "Primary: AI Act Annex III §2; NIS2 Directive Art. 21 (cybersecurity
|
|
29
|
+
measures); Electricity Regulation (EU 2019/943) for grid operations;
|
|
30
|
+
GDPR Art. 6(1)(d) vital interests for emergency systems." -->
|
|
31
|
+
|
|
32
|
+
- **EU AI Act** — Annex III §2: AI systems intended as safety components in the management and operation of critical digital infrastructure, road traffic, or supply of water, gas, heating or electricity
|
|
33
|
+
- **Art. 6(2)** — High-risk AI system classification
|
|
34
|
+
- **Art. 9** — Risk management system requirements
|
|
35
|
+
- **Art. 10** — Data governance and management practices
|
|
36
|
+
- **Art. 14** — Human oversight measures
|
|
37
|
+
- **Art. 15** — Accuracy, robustness and cybersecurity
|
|
38
|
+
- **Art. 26** — Obligations of deployers of high-risk AI systems
|
|
39
|
+
- **NIS2 Directive** (EU 2022/2555) — Art. 21 (cybersecurity risk management), Art. 23 (incident reporting)
|
|
40
|
+
- **Critical Entities Resilience Directive** (EU 2022/2557, CER) — resilience requirements
|
|
41
|
+
- **Sector-specific regulation** — [applicable sector regulation, e.g., Electricity Regulation, EASA, Drinking Water Directive]
|
|
42
|
+
- **GDPR** — Art. 6(1)(d) (vital interests) for emergency response systems
|
|
43
|
+
|
|
44
|
+
## 3. AI System Description
|
|
45
|
+
<!-- GUIDANCE: Specify the critical infrastructure sector, the safety function
|
|
46
|
+
the AI performs, and the consequences of failure. Include redundancy and
|
|
47
|
+
fallback architecture. Example: "AI-based predictive maintenance for high-voltage
|
|
48
|
+
transformers (400kV). Predicts failure probability from vibration, thermal, and
|
|
49
|
+
dissolved gas analysis. Failure to predict → transformer explosion risk. Triple
|
|
50
|
+
redundancy: AI + rule-based backup + manual inspection schedule." -->
|
|
51
|
+
|
|
52
|
+
- System name: [AI System Name]
|
|
53
|
+
- Description: [Description]
|
|
54
|
+
- Provider: [Provider]
|
|
55
|
+
- Model ID: [Model ID]
|
|
56
|
+
- Infrastructure sector: [energy / water / transport / digital / gas / heating]
|
|
57
|
+
- Safety function: [monitoring / control / prediction / optimization / emergency response]
|
|
58
|
+
- Autonomy level: [Autonomy Level]
|
|
59
|
+
|
|
60
|
+
## 4. Risk Classification
|
|
61
|
+
<!-- GUIDANCE: All AI safety components in critical infrastructure are high-risk
|
|
62
|
+
under Annex III §2. Document the specific safety function and failure modes.
|
|
63
|
+
Example: "High-risk under Annex III §2(a): AI safety component for electricity
|
|
64
|
+
grid load balancing. Failure mode: incorrect demand prediction → load shedding
|
|
65
|
+
or cascade failure. Impact: potential blackout affecting [N] households." -->
|
|
66
|
+
|
|
67
|
+
This AI system is classified as **[Risk Class]** under the EU AI Act. AI systems used as safety components in critical infrastructure management are classified as high-risk under Annex III §2.
|
|
68
|
+
|
|
69
|
+
**Safety Function Assessment:**
|
|
70
|
+
- Safety-critical function: [describe]
|
|
71
|
+
- Failure modes identified: [describe]
|
|
72
|
+
- Maximum acceptable failure rate: [define]
|
|
73
|
+
- Impact of failure: [describe consequences for population, services, environment]
|
|
74
|
+
|
|
75
|
+
## 5. Data Governance
|
|
76
|
+
<!-- GUIDANCE: Critical infrastructure data includes SCADA/ICS telemetry,
|
|
77
|
+
sensor data, operational parameters. Data integrity is paramount — corrupted
|
|
78
|
+
input can cause physical damage. Include data validation, anomaly filtering,
|
|
79
|
+
and sensor calibration requirements. Example: "Input: 10,000 sensor readings/sec
|
|
80
|
+
from grid SCADA. Validation: range checks, temporal consistency, sensor health
|
|
81
|
+
status. Anomalous readings quarantined and flagged. Sensor calibration: quarterly
|
|
82
|
+
per ISO 17025. Training data: 5 years of grid operational data, cleaned for
|
|
83
|
+
sensor faults and extreme weather events." -->
|
|
84
|
+
|
|
85
|
+
- Data inputs must be validated for integrity, completeness and temporal consistency before AI processing
|
|
86
|
+
- Sensor data must be calibrated according to applicable industrial standards
|
|
87
|
+
- Anomalous readings must be flagged and quarantined rather than silently processed
|
|
88
|
+
- Training data must reflect operational conditions including extreme and failure scenarios
|
|
89
|
+
- Data provenance must be documented for all datasets used in training and operation
|
|
90
|
+
- Cybersecurity measures must protect data in transit and at rest (NIS2 Art. 21)
|
|
91
|
+
|
|
92
|
+
## 6. Human Oversight
|
|
93
|
+
<!-- GUIDANCE: Critical infrastructure AI must NEVER be fully autonomous for
|
|
94
|
+
safety-critical decisions. Human-in-the-loop for all actions that could affect
|
|
95
|
+
physical safety. Operators must be trained to recognize AI errors under stress.
|
|
96
|
+
Example: "Control room operator reviews all AI recommendations before execution.
|
|
97
|
+
Emergency actions (load shedding, valve closure): AI recommends, operator
|
|
98
|
+
confirms within 60 seconds, automatic safe-state if no response. Operator
|
|
99
|
+
can override any AI recommendation via physical control panel." -->
|
|
100
|
+
|
|
101
|
+
- Autonomy level: [Autonomy Level]
|
|
102
|
+
- [Human Oversight Description]
|
|
103
|
+
- Safety-critical actions must require human confirmation before execution
|
|
104
|
+
- Control room operators must have the ability to override any AI-generated recommendation
|
|
105
|
+
- Physical override mechanisms must exist independent of AI system operation
|
|
106
|
+
- Automatic safe-state fallback must activate if human oversight becomes unavailable
|
|
107
|
+
- Operators must receive decision support information including confidence levels and alternatives
|
|
108
|
+
|
|
109
|
+
## 7. Transparency and Disclosure
|
|
110
|
+
<!-- GUIDANCE: For critical infrastructure, transparency is toward operators,
|
|
111
|
+
regulators, and potentially affected populations. Public disclosure must balance
|
|
112
|
+
transparency with security (no vulnerability disclosure). Example: "Operators:
|
|
113
|
+
full AI decision reasoning displayed on SCADA HMI. Regulator: annual report
|
|
114
|
+
with system description, performance metrics, incident log. Public: general
|
|
115
|
+
description only — no operational parameters or system architecture." -->
|
|
116
|
+
|
|
117
|
+
- Control room operators must have access to AI decision reasoning and confidence levels
|
|
118
|
+
- Regulatory authorities must receive periodic reports on AI system performance and incidents
|
|
119
|
+
- Public disclosure must balance transparency requirements with critical infrastructure security
|
|
120
|
+
- AI-generated operational decisions in system logs must be clearly marked as AI-assisted
|
|
121
|
+
|
|
122
|
+
## 8. Resilience and Redundancy
|
|
123
|
+
<!-- GUIDANCE: Critical infrastructure AI must be fault-tolerant. Define N+1 or
|
|
124
|
+
N+2 redundancy. Specify degraded operation modes and manual fallback. Include
|
|
125
|
+
cyber-physical attack resilience. Example: "N+2 redundancy: primary AI + backup
|
|
126
|
+
AI (different vendor) + manual rule-based control. If primary AI unavailable:
|
|
127
|
+
automatic failover to backup within 5 seconds. If both AI unavailable: manual
|
|
128
|
+
mode with enhanced operator staffing. Recovery: AI restart within 15 minutes
|
|
129
|
+
or full manual operation maintained indefinitely." -->
|
|
130
|
+
|
|
131
|
+
- The AI system must have documented redundancy architecture (N+1 minimum for safety functions)
|
|
132
|
+
- Automatic failover to backup systems must occur within defined time limits
|
|
133
|
+
- Manual operation mode must be available and regularly tested
|
|
134
|
+
- System recovery procedures must be documented and tested at least quarterly
|
|
135
|
+
- Degraded operation modes must be defined for partial AI system availability
|
|
136
|
+
- Business continuity plan must cover extended AI system unavailability
|
|
137
|
+
|
|
138
|
+
## 9. Cybersecurity (Art. 15 + NIS2)
|
|
139
|
+
<!-- GUIDANCE: Critical infrastructure AI is a prime target for cyber-physical
|
|
140
|
+
attacks. Adversarial ML attacks (data poisoning, evasion) can cause physical
|
|
141
|
+
damage. NIS2 requires specific cybersecurity measures. Example: "Input validation:
|
|
142
|
+
sensor data range checks + temporal anomaly detection. Adversarial robustness:
|
|
143
|
+
tested against FGSM and PGD attacks on sensor inputs. Network: air-gapped OT
|
|
144
|
+
network, encrypted AI model updates via secure channel. NIS2 Art. 21 measures:
|
|
145
|
+
risk analysis, incident handling, business continuity, supply chain security." -->
|
|
146
|
+
|
|
147
|
+
- AI model and data pipelines must be protected against adversarial attacks (data poisoning, evasion, model extraction)
|
|
148
|
+
- Network segmentation must isolate AI systems from general IT networks
|
|
149
|
+
- AI model updates must follow secure deployment procedures with integrity verification
|
|
150
|
+
- Penetration testing must include AI-specific attack vectors
|
|
151
|
+
- NIS2 Art. 21 cybersecurity measures must be implemented and documented
|
|
152
|
+
- Supply chain security must be assessed for AI model components and dependencies
|
|
153
|
+
|
|
154
|
+
## 10. Monitoring and Logging
|
|
155
|
+
<!-- GUIDANCE: Continuous monitoring is essential for safety-critical AI.
|
|
156
|
+
Include both AI performance metrics and physical outcome monitoring.
|
|
157
|
+
Correlation between AI decisions and physical system state is critical.
|
|
158
|
+
Example: "Real-time: prediction accuracy vs. actual sensor readings. Daily:
|
|
159
|
+
drift detection on input data distribution. Weekly: performance metric review
|
|
160
|
+
by engineering team. Monthly: correlation analysis AI predictions vs. actual
|
|
161
|
+
failures. All decisions logged: timestamp, inputs, output, confidence, operator
|
|
162
|
+
action, physical outcome. Retained 10 years per sector regulation." -->
|
|
163
|
+
|
|
164
|
+
- All AI decisions must be logged with: timestamp, inputs, outputs, confidence, operator action, physical outcome
|
|
165
|
+
- System performance must be monitored continuously for accuracy drift and anomalous behaviour
|
|
166
|
+
- Correlation between AI predictions and actual infrastructure events must be tracked
|
|
167
|
+
- Monitoring frequency: continuous with engineering team review at least weekly
|
|
168
|
+
- Logs must be retained per sector-specific regulation (minimum 5 years for safety systems)
|
|
169
|
+
- Log integrity must be protected (append-only, tamper-evident)
|
|
170
|
+
|
|
171
|
+
## 11. Incident Response
|
|
172
|
+
<!-- GUIDANCE: Critical infrastructure AI incidents may have immediate physical
|
|
173
|
+
consequences. Incident response must integrate with existing operational emergency
|
|
174
|
+
procedures. NIS2 Art. 23 requires 24-hour early warning + 72-hour notification.
|
|
175
|
+
Example: "Physical safety incident: immediate AI system suspension, emergency
|
|
176
|
+
operating procedures activated, NIS2 notification within 24h. AI accuracy
|
|
177
|
+
degradation >5%: automatic alert, operator assessment within 1h, system
|
|
178
|
+
suspension if confirmed. EU AI Act Art. 73 reporting: 2 days (serious harm)
|
|
179
|
+
or 15 days (other)." -->
|
|
180
|
+
|
|
181
|
+
- AI system incidents affecting physical safety must trigger immediate emergency operating procedures
|
|
182
|
+
- NIS2 incident reporting: early warning within 24 hours, full notification within 72 hours
|
|
183
|
+
- EU AI Act Art. 73 reporting: 2 days (death/serious harm), 15 days (other serious incidents)
|
|
184
|
+
- The AI system must be immediately suspended if safety-critical performance degrades
|
|
185
|
+
- Root cause analysis must determine whether failure is AI-specific or infrastructure-related
|
|
186
|
+
- Sector-specific incident reporting obligations must be fulfilled concurrently
|
|
187
|
+
|
|
188
|
+
## 12. Training and Awareness
|
|
189
|
+
<!-- GUIDANCE: Operators must understand AI limitations in safety-critical
|
|
190
|
+
context. Include simulator-based training for AI failure scenarios. Stress
|
|
191
|
+
testing of human-AI teaming under emergency conditions. Example: "16-hour
|
|
192
|
+
training: system operation (4h), AI limitations and failure modes (4h),
|
|
193
|
+
emergency procedures with AI unavailable (4h), simulator exercises (4h).
|
|
194
|
+
Annual recertification with emergency scenario simulation. Operators must
|
|
195
|
+
demonstrate competence in manual fallback procedures." -->
|
|
196
|
+
|
|
197
|
+
- All operators must receive training on AI system operation, limitations, and failure modes
|
|
198
|
+
- Training must include: manual operation procedures, emergency response, AI override mechanisms
|
|
199
|
+
- Simulator-based exercises must test operator response to AI system failures
|
|
200
|
+
- Competency assessment must be completed before independent system operation
|
|
201
|
+
- Refresher training must be provided at least annually and upon significant system changes
|
|
202
|
+
|
|
203
|
+
## 13. Review Schedule
|
|
204
|
+
<!-- GUIDANCE: Critical infrastructure AI requires more frequent review than
|
|
205
|
+
other domains due to safety implications. Align with sector-specific audit
|
|
206
|
+
cycles and NIS2 requirements. Example: "Monthly: AI performance metrics review.
|
|
207
|
+
Quarterly: full safety assessment. Semi-annually: cybersecurity audit (NIS2).
|
|
208
|
+
Annually: complete system re-evaluation including adversarial testing.
|
|
209
|
+
Immediate: upon any safety incident or regulatory change." -->
|
|
210
|
+
|
|
211
|
+
- This policy shall be reviewed at least quarterly and upon any safety-related change
|
|
212
|
+
- Review must incorporate performance data, incident reports, regulatory updates, and threat intelligence
|
|
213
|
+
- Annual comprehensive safety assessment including adversarial testing
|
|
214
|
+
- Updates must be approved by the Chief Operations Officer and Safety Committee
|
|
215
|
+
|
|
216
|
+
## 14. Approval and Sign-off
|
|
217
|
+
<!-- GUIDANCE: Critical infrastructure AI policy requires sign-off from
|
|
218
|
+
operations leadership and safety authority. CISO involvement mandatory for
|
|
219
|
+
NIS2 compliance. Example: "COO confirms operational adequacy; Safety Director
|
|
220
|
+
confirms risk assessment; CISO confirms NIS2 cybersecurity measures;
|
|
221
|
+
Sector regulator notified per applicable regulation." -->
|
|
222
|
+
|
|
223
|
+
| Role | Name | Date |
|
|
224
|
+
|------|------|------|
|
|
225
|
+
| Policy Owner | [Approver Name] | [Date] |
|
|
226
|
+
| Chief Operations Officer | _________________ | _________ |
|
|
227
|
+
| Safety Director | _________________ | _________ |
|
|
228
|
+
| Chief Information Security Officer | _________________ | _________ |
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# AI Usage Policy — Education / Academic
|
|
2
|
+
|
|
3
|
+
| Field | Value |
|
|
4
|
+
|-------|-------|
|
|
5
|
+
| Policy Title | AI Usage Policy — Education / Academic |
|
|
6
|
+
| Organization | [Organization] |
|
|
7
|
+
| Date | [Date] |
|
|
8
|
+
| Version | [Version] |
|
|
9
|
+
| AI System Name | [AI System Name] |
|
|
10
|
+
| Risk Class | [Risk Class] |
|
|
11
|
+
|
|
12
|
+
## 1. Purpose and Scope
|
|
13
|
+
<!-- GUIDANCE: Annex III §6(b) makes AI for student assessment/admission high-risk.
|
|
14
|
+
Scope must include ALL AI tools used in education — even those used by students
|
|
15
|
+
themselves (e.g., AI tutors, plagiarism detectors). Include age ranges affected.
|
|
16
|
+
Example: "Covers: AI grading assistant (Gradescope), plagiarism detector (Turnitin),
|
|
17
|
+
learning analytics platform (Brightspace), AI tutor (Khan Academy). Ages 14-22." -->
|
|
18
|
+
|
|
19
|
+
This policy governs the use of [AI System Name] within [Organization]'s educational operations. It establishes requirements for fair, transparent and pedagogically sound use of AI in admissions, grading, student monitoring, learning analytics, and academic integrity processes, in accordance with the EU AI Act (Regulation 2024/1689).
|
|
20
|
+
|
|
21
|
+
This policy applies to all academic staff, administrative personnel, students, and parents/guardians affected by AI-assisted educational decisions.
|
|
22
|
+
|
|
23
|
+
## 2. Applicable Legislation
|
|
24
|
+
<!-- GUIDANCE: Education AI has special protections for children. GDPR Art. 8
|
|
25
|
+
(child consent, typically 16 in EU) and UN Convention on Rights of the Child
|
|
26
|
+
are critical. National education laws may impose additional requirements.
|
|
27
|
+
Example: In France, CNIL guidelines on children's data apply; in Germany,
|
|
28
|
+
Landesdatenschutzgesetze may set consent age at 16. -->
|
|
29
|
+
|
|
30
|
+
- **EU AI Act** — Annex III §6(b): AI systems intended to be used for the purpose of assessing students in educational and vocational training institutions and for assessing participants in tests commonly required for admission to educational institutions
|
|
31
|
+
- **Art. 6(2)** — High-risk AI system classification
|
|
32
|
+
- **Art. 9** — Risk management system requirements
|
|
33
|
+
- **Art. 10** — Data governance and management practices
|
|
34
|
+
- **Art. 14** — Human oversight measures
|
|
35
|
+
- **Art. 26** — Obligations of deployers of high-risk AI systems
|
|
36
|
+
- **GDPR** — Art. 8 (conditions for child's consent), Art. 22, Art. 35
|
|
37
|
+
- **UN Convention on the Rights of the Child** — Art. 3 (best interests of the child)
|
|
38
|
+
- **EU Charter of Fundamental Rights** — Art. 14 (right to education), Art. 24 (rights of the child)
|
|
39
|
+
|
|
40
|
+
## 3. AI System Description
|
|
41
|
+
<!-- GUIDANCE: Describe how the AI interacts with the educational process.
|
|
42
|
+
Distinguish between formative assessment (learning support) and summative
|
|
43
|
+
assessment (grading/certification). Example: "AI grading assistant: analyzes
|
|
44
|
+
essay structure and grammar, provides suggested score (1-100) and feedback
|
|
45
|
+
comments; teacher reviews and may adjust before final grade is assigned." -->
|
|
46
|
+
|
|
47
|
+
- System name: [AI System Name]
|
|
48
|
+
- Description: [Description]
|
|
49
|
+
- Provider: [Provider]
|
|
50
|
+
- Model ID: [Model ID]
|
|
51
|
+
- Autonomy level: [Autonomy Level]
|
|
52
|
+
|
|
53
|
+
## 4. Risk Classification
|
|
54
|
+
<!-- GUIDANCE: AI for student assessment/admission is high-risk per Annex III §6(b).
|
|
55
|
+
AI for administrative education tasks (scheduling, facilities) may be lower risk.
|
|
56
|
+
Document classification reasoning for each system. Example: "Grading AI: high-risk
|
|
57
|
+
(Annex III §6(b)); timetable optimization AI: minimal risk (no student assessment)." -->
|
|
58
|
+
|
|
59
|
+
This AI system is classified as **[Risk Class]** under the EU AI Act. AI systems used for student assessment or admission decisions in educational institutions are classified as high-risk under Annex III §6(b).
|
|
60
|
+
|
|
61
|
+
## 5. Data Governance
|
|
62
|
+
<!-- GUIDANCE: Student data requires heightened protection, especially for minors.
|
|
63
|
+
GDPR Art. 8 requires parental consent for under-16s. Data minimisation is critical —
|
|
64
|
+
do not feed behavioral/surveillance data into academic AI. Example: "Only
|
|
65
|
+
submitted assignment text and rubric criteria provided to grading AI. No behavioral
|
|
66
|
+
data, attendance records, or personal demographics included in AI input." -->
|
|
67
|
+
|
|
68
|
+
- Student data must be processed in compliance with GDPR, with particular attention to data concerning minors
|
|
69
|
+
- Data minimisation: only educationally relevant data shall be provided to the AI system
|
|
70
|
+
- Behavioural and biometric data collection must have explicit legal basis and parental/guardian consent where required
|
|
71
|
+
- Data must not be used for purposes beyond the stated educational objective
|
|
72
|
+
- Data retention periods must comply with educational record-keeping requirements and be clearly communicated
|
|
73
|
+
|
|
74
|
+
## 6. Human Oversight
|
|
75
|
+
<!-- GUIDANCE: Art. 14 human oversight is especially important in education where
|
|
76
|
+
AI errors can affect life outcomes (university admission, qualifications). Teachers
|
|
77
|
+
must be able to override independently, not just accept/reject AI suggestions.
|
|
78
|
+
Example: "Teacher reviews all AI-suggested grades. For assessments affecting
|
|
79
|
+
progression/graduation, minimum 2 human reviewers required." -->
|
|
80
|
+
|
|
81
|
+
- Autonomy level: [Autonomy Level]
|
|
82
|
+
- [Human Oversight Description]
|
|
83
|
+
- The AI system must be used as a support tool; final academic decisions rest with qualified educators
|
|
84
|
+
- Academic staff must have the ability and authority to override AI-generated assessments or recommendations
|
|
85
|
+
- AI-assisted grades or evaluations must be reviewed by qualified academic personnel before finalization
|
|
86
|
+
|
|
87
|
+
## 7. Transparency and Disclosure
|
|
88
|
+
<!-- GUIDANCE: Age-appropriate transparency is essential. Students should understand
|
|
89
|
+
HOW AI is used in their education, not just THAT it is used. For minors,
|
|
90
|
+
communicate to both students AND parents/guardians. Example: "Student handbook
|
|
91
|
+
section (ages 14-16): 'Your essays may be reviewed by AI before your teacher reads
|
|
92
|
+
them. The AI suggests a score, but your teacher always makes the final decision.'" -->
|
|
93
|
+
|
|
94
|
+
- Students and parents/guardians must be informed when AI is used in assessment or educational processes
|
|
95
|
+
- Information must be provided in age-appropriate and accessible language
|
|
96
|
+
- The criteria used by the AI system for assessment or recommendation must be explainable
|
|
97
|
+
- AI-assisted academic records must clearly indicate the use of AI tools
|
|
98
|
+
|
|
99
|
+
## 8. Student Welfare and Academic Integrity
|
|
100
|
+
<!-- GUIDANCE: Balance academic integrity enforcement with student wellbeing.
|
|
101
|
+
AI plagiarism detection has known false positive rates that can cause unjust
|
|
102
|
+
accusations. Never penalize based solely on AI output. Example: "AI plagiarism
|
|
103
|
+
flags reviewed by Academic Integrity Officer. Student interviewed before any
|
|
104
|
+
determination. False positive rate documented (currently 3.2%) and communicated." -->
|
|
105
|
+
|
|
106
|
+
- AI systems must not be used in ways that create undue stress, surveillance pressure, or privacy invasion for students
|
|
107
|
+
- The use of AI for continuous behavioural monitoring must be proportionate and justified
|
|
108
|
+
- Academic integrity policies must clearly address permissible and impermissible uses of AI by students
|
|
109
|
+
- Students must not be penalised based solely on AI-generated plagiarism or cheating detection without human review
|
|
110
|
+
- The impact of AI systems on student wellbeing must be periodically assessed
|
|
111
|
+
|
|
112
|
+
## 9. Parental Consent and Minor Protection
|
|
113
|
+
<!-- GUIDANCE: GDPR Art. 8 sets default consent age at 16 (member states may
|
|
114
|
+
lower to 13). For students under the threshold, parental consent is required
|
|
115
|
+
before AI processes their personal data. Offer human-only alternative.
|
|
116
|
+
Example: "Consent form sent to parents at enrollment. Alternative offered:
|
|
117
|
+
'Your child's work will be assessed by teachers only (human-only assessment).'" -->
|
|
118
|
+
|
|
119
|
+
- For students under 16, parental/guardian consent must be obtained before processing personal data through AI systems (GDPR Art. 8)
|
|
120
|
+
- Age-appropriate information must be provided to minors about how AI affects their education
|
|
121
|
+
- Parents/guardians must have the right to request human-only assessment for their children
|
|
122
|
+
- Special safeguards must be in place for vulnerable students, including those with special educational needs
|
|
123
|
+
|
|
124
|
+
## 10. Monitoring and Logging
|
|
125
|
+
<!-- GUIDANCE: Track correlation between AI assessments and teacher assessments
|
|
126
|
+
to detect drift or bias. Monitor for demographic disparities in AI-suggested
|
|
127
|
+
grades. Log retention must comply with educational records legislation.
|
|
128
|
+
Example: "Monthly: AI-teacher grade correlation (target r>0.85). Quarterly:
|
|
129
|
+
demographic parity analysis across gender, ethnicity, SEN status. Logs retained
|
|
130
|
+
per Education Act requirements (typically 25 years for assessment records)." -->
|
|
131
|
+
|
|
132
|
+
- All AI-assisted academic decisions must be logged with sufficient detail for review and appeal
|
|
133
|
+
- System performance must be monitored for accuracy, fairness and pedagogical effectiveness
|
|
134
|
+
- Key metrics: assessment accuracy, consistency with human marking, demographic parity, student outcome correlation
|
|
135
|
+
- Monitoring frequency: [termly/semesterly] with academic governance review
|
|
136
|
+
- Logs must be retained for the duration required by educational regulations
|
|
137
|
+
|
|
138
|
+
## 11. Incident Response
|
|
139
|
+
<!-- GUIDANCE: In education, an "incident" includes unfair grading, discriminatory
|
|
140
|
+
admissions outcomes, and student welfare concerns from AI surveillance.
|
|
141
|
+
Reassessment must use traditional (non-AI) methods. Example: "Incident triggers:
|
|
142
|
+
student/parent complaint of unfair AI assessment, bias detected in demographic
|
|
143
|
+
analysis, AI-teacher correlation drops below 0.75 for any cohort." -->
|
|
144
|
+
|
|
145
|
+
- Any suspected unfair or inaccurate AI-assisted assessment must be reported and reviewed promptly
|
|
146
|
+
- The AI system must be suspended if systematic inaccuracy or bias is detected
|
|
147
|
+
- Affected students must be offered reassessment through traditional methods
|
|
148
|
+
- Serious incidents must be reported to relevant educational authorities and market surveillance bodies
|
|
149
|
+
|
|
150
|
+
## 12. Training and Awareness
|
|
151
|
+
<!-- GUIDANCE: Teachers need training on interpreting AI suggestions critically,
|
|
152
|
+
not just operating the software. Students need guidance on permissible AI use
|
|
153
|
+
(academic integrity). Example: "Teachers: 4-hour training on AI output
|
|
154
|
+
interpretation, override procedures, recognizing AI errors. Students: 1-hour
|
|
155
|
+
session on 'AI in your education' at term start." -->
|
|
156
|
+
|
|
157
|
+
- All academic and administrative staff using the AI system must receive training on its operation and limitations
|
|
158
|
+
- Training must cover: pedagogical implications, override procedures, data protection for minors, and complaint handling
|
|
159
|
+
- Students must receive guidance on how AI is used in their educational experience
|
|
160
|
+
- Refresher training must be provided at least annually and upon significant system updates
|
|
161
|
+
|
|
162
|
+
## 13. Review Schedule
|
|
163
|
+
<!-- GUIDANCE: Align with academic calendar — review at start of each academic
|
|
164
|
+
year. Include student feedback in review process. Example: "Annual review at
|
|
165
|
+
start of autumn term. Student survey on AI experience conducted in spring term.
|
|
166
|
+
Findings incorporated into next review cycle." -->
|
|
167
|
+
|
|
168
|
+
- This policy shall be reviewed at least annually and at the beginning of each academic year
|
|
169
|
+
- Review must incorporate monitoring data, student feedback, incident reports, and pedagogical outcome analysis
|
|
170
|
+
- Updates must be approved by the Academic Governance Board
|
|
171
|
+
|
|
172
|
+
## 14. Approval and Sign-off
|
|
173
|
+
<!-- GUIDANCE: Education AI policy should include student welfare representation.
|
|
174
|
+
Where students are of age, consider student representative sign-off for
|
|
175
|
+
transparency. Example: "Student Welfare Officer sign-off ensures safeguarding
|
|
176
|
+
considerations are addressed. Student union representative consulted for
|
|
177
|
+
university-level deployments." -->
|
|
178
|
+
|
|
179
|
+
| Role | Name | Date |
|
|
180
|
+
|------|------|------|
|
|
181
|
+
| Policy Owner | [Approver Name] | [Date] |
|
|
182
|
+
| Academic Director | _________________ | _________ |
|
|
183
|
+
| DPO | _________________ | _________ |
|
|
184
|
+
| Student Welfare Officer | _________________ | _________ |
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# AI Usage Policy — Finance / Credit
|
|
2
|
+
|
|
3
|
+
| Field | Value |
|
|
4
|
+
|-------|-------|
|
|
5
|
+
| Policy Title | AI Usage Policy — Finance / Credit |
|
|
6
|
+
| Organization | [Organization] |
|
|
7
|
+
| Date | [Date] |
|
|
8
|
+
| Version | [Version] |
|
|
9
|
+
| AI System Name | [AI System Name] |
|
|
10
|
+
| Risk Class | [Risk Class] |
|
|
11
|
+
|
|
12
|
+
## 1. Purpose and Scope
|
|
13
|
+
<!-- GUIDANCE: Annex III §5(b) makes credit scoring AI high-risk. Scope must
|
|
14
|
+
cover all AI-assisted financial decisions, including fraud detection and insurance
|
|
15
|
+
underwriting. Include third-party models (e.g., bureau scores enhanced with AI).
|
|
16
|
+
Example: "Covers: credit scoring (FICO AI), fraud detection (Featurespace),
|
|
17
|
+
AML screening (Comply Advantage), insurance pricing (in-house ML model)." -->
|
|
18
|
+
|
|
19
|
+
This policy governs the use of [AI System Name] within [Organization]'s financial services operations. It establishes requirements for fair, transparent and accountable use of AI in creditworthiness assessment, insurance underwriting, fraud detection, and other financial decision-making processes, in accordance with the EU AI Act (Regulation 2024/1689).
|
|
20
|
+
|
|
21
|
+
This policy applies to all personnel and systems involved in operating, supervising, or relying on AI-assisted financial decisions.
|
|
22
|
+
|
|
23
|
+
## 2. Applicable Legislation
|
|
24
|
+
<!-- GUIDANCE: Financial AI has multiple overlapping regulatory frameworks.
|
|
25
|
+
Cross-reference Consumer Credit Directive, MiFID II (investment advice), IDD
|
|
26
|
+
(insurance), and PSD2 (payment fraud). National financial regulators may have
|
|
27
|
+
additional AI-specific guidance. Example: In Netherlands, reference DNB guidance
|
|
28
|
+
on AI in financial services (2019) alongside EU AI Act requirements. -->
|
|
29
|
+
|
|
30
|
+
- **EU AI Act** — Annex III §5(b): AI systems intended to be used for the evaluation of creditworthiness of natural persons or for establishing their credit score
|
|
31
|
+
- **Art. 6(2)** — High-risk AI system classification
|
|
32
|
+
- **Art. 9** — Risk management system requirements
|
|
33
|
+
- **Art. 10** — Data governance and management practices
|
|
34
|
+
- **Art. 13** — Transparency and provision of information to deployers
|
|
35
|
+
- **Art. 14** — Human oversight measures
|
|
36
|
+
- **Art. 26** — Obligations of deployers of high-risk AI systems
|
|
37
|
+
- **GDPR** — Art. 22 (automated individual decision-making), Art. 35 (DPIA)
|
|
38
|
+
- **Consumer Credit Directive** (2008/48/EC) — creditworthiness assessment obligations
|
|
39
|
+
- **MiFID II** / **IDD** — where applicable to investment/insurance AI
|
|
40
|
+
- **EU Charter of Fundamental Rights** — Art. 21 (non-discrimination)
|
|
41
|
+
|
|
42
|
+
## 3. AI System Description
|
|
43
|
+
<!-- GUIDANCE: For credit scoring, describe the model type, key features used,
|
|
44
|
+
score range, and decision boundaries. Specify whether the model makes or
|
|
45
|
+
recommends decisions. Example: "Gradient boosted model using 45 features
|
|
46
|
+
(income, employment history, credit utilization — no protected characteristics),
|
|
47
|
+
output: risk score 0-1000, threshold 450 for auto-approval, 300-449 for
|
|
48
|
+
manual review, <300 auto-decline." -->
|
|
49
|
+
|
|
50
|
+
- System name: [AI System Name]
|
|
51
|
+
- Description: [Description]
|
|
52
|
+
- Provider: [Provider]
|
|
53
|
+
- Model ID: [Model ID]
|
|
54
|
+
- Autonomy level: [Autonomy Level]
|
|
55
|
+
|
|
56
|
+
## 4. Risk Classification
|
|
57
|
+
<!-- GUIDANCE: Credit scoring/assessment AI is explicitly high-risk per Annex III
|
|
58
|
+
§5(b). Insurance underwriting AI may also be high-risk if it affects access to
|
|
59
|
+
essential services. Fraud detection may be limited-risk unless it affects individual
|
|
60
|
+
rights. Example: "Credit scoring: high-risk (Annex III §5(b)); fraud detection:
|
|
61
|
+
limited risk (flagging only, human reviews all blocks)." -->
|
|
62
|
+
|
|
63
|
+
This AI system is classified as **[Risk Class]** under the EU AI Act. AI systems used for creditworthiness assessment or credit scoring of natural persons are classified as high-risk under Annex III §5(b).
|
|
64
|
+
|
|
65
|
+
## 5. Data Governance
|
|
66
|
+
<!-- GUIDANCE: Art. 10 data governance is critical for financial AI. Historical
|
|
67
|
+
data often encodes redlining and other discriminatory patterns. Validate data
|
|
68
|
+
sources periodically. Prohibit use of protected characteristics as proxies.
|
|
69
|
+
Example: "Postcode removed as feature in v2.0 after analysis showed correlation
|
|
70
|
+
with ethnicity (r=0.72). Alternative: distance-to-branch feature (r=0.12)." -->
|
|
71
|
+
|
|
72
|
+
- Input data must be verified for accuracy, completeness and relevance before model consumption
|
|
73
|
+
- Historical data used for training must be assessed for embedded societal biases
|
|
74
|
+
- Data sources must be documented and their reliability periodically validated
|
|
75
|
+
- Special category data must not be used as direct or proxy inputs without explicit legal basis
|
|
76
|
+
- Data lineage must be maintained for all model inputs and outputs
|
|
77
|
+
|
|
78
|
+
## 6. Human Oversight
|
|
79
|
+
<!-- GUIDANCE: GDPR Art. 22 gives individuals the right not to be subject to
|
|
80
|
+
fully automated decisions with legal effects. Credit decisions have legal effects.
|
|
81
|
+
Ensure meaningful human review — not just clicking 'approve.' Define competency
|
|
82
|
+
requirements for reviewers. Example: "Credit officers must hold CFA Level 1+
|
|
83
|
+
and complete 8-hour AI oversight training. Manual review required for all
|
|
84
|
+
scores within 50 points of threshold." -->
|
|
85
|
+
|
|
86
|
+
- Autonomy level: [Autonomy Level]
|
|
87
|
+
- [Human Oversight Description]
|
|
88
|
+
- No credit decision with legal effects shall be made solely by the AI system without human review
|
|
89
|
+
- Credit officers must have the competence and authority to override AI-generated scores and recommendations
|
|
90
|
+
- Override decisions must be documented with rationale
|
|
91
|
+
|
|
92
|
+
## 7. Transparency and Disclosure
|
|
93
|
+
<!-- GUIDANCE: Consumer Credit Directive requires explanation of credit decisions.
|
|
94
|
+
Art. 86 EU AI Act adds right to explanation for AI-affected decisions. Provide
|
|
95
|
+
both the decision and the top contributing factors in plain language.
|
|
96
|
+
Example: "Rejection letter includes: 'Primary factors: insufficient credit history
|
|
97
|
+
(weighted 35%), high credit utilization (weighted 25%), short employment tenure
|
|
98
|
+
(weighted 20%).'" -->
|
|
99
|
+
|
|
100
|
+
- Applicants must be informed that AI is used in the assessment process before or at the time of application
|
|
101
|
+
- Rejected applicants must receive meaningful explanation of the principal factors affecting the decision
|
|
102
|
+
- The methodology for credit scoring must be explainable in terms understandable to the consumer
|
|
103
|
+
- Regulatory authorities must have access to model documentation upon request
|
|
104
|
+
|
|
105
|
+
## 8. Model Validation and Fairness Metrics
|
|
106
|
+
<!-- GUIDANCE: Financial regulators expect independent model validation (ECB Guide).
|
|
107
|
+
Use multiple fairness metrics — they can conflict, so document trade-offs explicitly.
|
|
108
|
+
Include stress testing under adverse scenarios. Example: "Annual independent
|
|
109
|
+
validation by Risk Model Validation team. Metrics: demographic parity (target >0.8),
|
|
110
|
+
equal opportunity (target >0.85), predictive parity (target >0.8). Gini >0.40
|
|
111
|
+
required for production deployment." -->
|
|
112
|
+
|
|
113
|
+
- The AI model must undergo independent validation before deployment and after significant changes
|
|
114
|
+
- Validation must include: back-testing, sensitivity analysis, and stress testing
|
|
115
|
+
- Fairness metrics must be computed across protected characteristics: demographic parity, equal opportunity, predictive parity
|
|
116
|
+
- Model performance must be benchmarked against established statistical methods
|
|
117
|
+
- Model drift monitoring must be in place with defined thresholds for re-validation triggers
|
|
118
|
+
|
|
119
|
+
## 9. Regulatory Reporting
|
|
120
|
+
<!-- GUIDANCE: National financial regulators may require model risk reports.
|
|
121
|
+
ECB/EBA expect documented model governance. Material model changes should be
|
|
122
|
+
reported through established channels. Example: "Annual Model Risk Report
|
|
123
|
+
submitted to BaFin (Germany) per MaRisk AT 4.3.5. Material model changes
|
|
124
|
+
reported within 30 days via standard regulatory template." -->
|
|
125
|
+
|
|
126
|
+
- All AI-assisted credit decisions must be traceable and reportable to regulatory authorities
|
|
127
|
+
- Model risk management documentation must comply with supervisory expectations (e.g., ECB Guide on internal models)
|
|
128
|
+
- Material model changes must be reported through established regulatory channels
|
|
129
|
+
- Annual model performance reports must be prepared for internal governance and regulatory review
|
|
130
|
+
|
|
131
|
+
## 10. Monitoring and Logging
|
|
132
|
+
<!-- GUIDANCE: Financial record-keeping typically requires 5+ year retention.
|
|
133
|
+
Monitor both model performance (Gini, KS) and fairness metrics continuously.
|
|
134
|
+
Alert on drift before it impacts decisions. Example: "Real-time monitoring:
|
|
135
|
+
Population Stability Index (PSI) threshold 0.2, Gini monitoring weekly,
|
|
136
|
+
fairness metrics monthly. Logs retained 7 years per MiFID II requirements." -->
|
|
137
|
+
|
|
138
|
+
- All AI-assisted financial decisions must be logged with complete audit trails
|
|
139
|
+
- System performance must be monitored continuously for accuracy, stability and fairness
|
|
140
|
+
- Key metrics: approval rates, default prediction accuracy, Gini coefficient, KS statistic, fairness ratios
|
|
141
|
+
- Anomaly detection must be in place for unusual patterns in AI outputs
|
|
142
|
+
- Logs must be retained in compliance with financial record-keeping requirements (minimum 5 years)
|
|
143
|
+
|
|
144
|
+
## 11. Incident Response
|
|
145
|
+
<!-- GUIDANCE: Financial AI incidents can trigger immediate regulatory notification.
|
|
146
|
+
Define "material model failure" with quantitative criteria. Customer remediation
|
|
147
|
+
must include reassessment and correction of affected decisions.
|
|
148
|
+
Example: "Material failure: >5% unexpected default rate deviation, or fairness
|
|
149
|
+
ratio <0.7 for any demographic group. Affected customers reassessed within
|
|
150
|
+
5 business days using alternative methodology." -->
|
|
151
|
+
|
|
152
|
+
- Any suspected unfair lending outcome or model malfunction must be escalated immediately
|
|
153
|
+
- The AI system must be suspended if systematic bias or material accuracy degradation is detected
|
|
154
|
+
- Affected customers must be notified and offered reassessment through alternative means
|
|
155
|
+
- Incidents must be reported to relevant financial regulators and market surveillance authorities
|
|
156
|
+
|
|
157
|
+
## 12. Training and Awareness
|
|
158
|
+
<!-- GUIDANCE: Credit officers need domain-specific AI training beyond general
|
|
159
|
+
AI literacy. Cover model interpretability, how to question AI recommendations,
|
|
160
|
+
and when to override. Example: "Credit officers: 8-hour domain training covering
|
|
161
|
+
feature importance interpretation, SHAP values reading, override justification
|
|
162
|
+
documentation, regulatory obligations. Annual refresh." -->
|
|
163
|
+
|
|
164
|
+
- All credit officers and risk analysts using the AI system must receive training on its operation, limitations and override procedures
|
|
165
|
+
- Training must cover: model interpretability, fairness assessment, regulatory obligations, and escalation procedures
|
|
166
|
+
- Refresher training must be provided at least annually and upon model updates
|
|
167
|
+
|
|
168
|
+
## 13. Review Schedule
|
|
169
|
+
<!-- GUIDANCE: Financial model governance typically requires annual full review
|
|
170
|
+
and quarterly performance monitoring. Align with existing model risk management
|
|
171
|
+
frameworks (MRM). Example: "Annual full review by Model Risk Committee. Quarterly
|
|
172
|
+
performance review by Risk Analytics. Ad-hoc review triggered by PSI >0.2
|
|
173
|
+
or fairness ratio <0.8." -->
|
|
174
|
+
|
|
175
|
+
- This policy shall be reviewed at least annually and upon any material model change
|
|
176
|
+
- Review must incorporate monitoring data, validation results, incident reports, and regulatory feedback
|
|
177
|
+
- Updates must be approved by the Model Risk Management Committee
|
|
178
|
+
|
|
179
|
+
## 14. Approval and Sign-off
|
|
180
|
+
<!-- GUIDANCE: Financial AI policy requires sign-off from risk management.
|
|
181
|
+
Consider including Head of Credit/Lending and Head of Compliance. Regulatory
|
|
182
|
+
expectation: senior management ownership of AI model risk.
|
|
183
|
+
Example: "CRO sign-off demonstrates senior management ownership per ECB
|
|
184
|
+
expectations. Compliance Officer confirms regulatory alignment." -->
|
|
185
|
+
|
|
186
|
+
| Role | Name | Date |
|
|
187
|
+
|------|------|------|
|
|
188
|
+
| Policy Owner | [Approver Name] | [Date] |
|
|
189
|
+
| Chief Risk Officer | _________________ | _________ |
|
|
190
|
+
| DPO | _________________ | _________ |
|
|
191
|
+
| Compliance Officer | _________________ | _________ |
|