aicertify 0.7.0__tar.gz
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.
- aicertify-0.7.0/LICENSE +211 -0
- aicertify-0.7.0/PKG-INFO +393 -0
- aicertify-0.7.0/README.md +315 -0
- aicertify-0.7.0/aicertify/__init__.py +51 -0
- aicertify-0.7.0/aicertify/api/__init__.py +40 -0
- aicertify-0.7.0/aicertify/api/core.py +117 -0
- aicertify-0.7.0/aicertify/api/evaluators.py +516 -0
- aicertify-0.7.0/aicertify/api/policy.py +322 -0
- aicertify-0.7.0/aicertify/api/reports.py +209 -0
- aicertify-0.7.0/aicertify/api/utils.py +95 -0
- aicertify-0.7.0/aicertify/api.py +39 -0
- aicertify-0.7.0/aicertify/application.py +275 -0
- aicertify-0.7.0/aicertify/assets/aic.png +0 -0
- aicertify-0.7.0/aicertify/assets/aicert.png +0 -0
- aicertify-0.7.0/aicertify/cli.py +183 -0
- aicertify-0.7.0/aicertify/context_helpers.py +328 -0
- aicertify-0.7.0/aicertify/evaluators/__init__.py +90 -0
- aicertify-0.7.0/aicertify/evaluators/accuracy_evaluator.py +221 -0
- aicertify-0.7.0/aicertify/evaluators/api.py +927 -0
- aicertify-0.7.0/aicertify/evaluators/base.py +11 -0
- aicertify-0.7.0/aicertify/evaluators/base_evaluator.py +208 -0
- aicertify-0.7.0/aicertify/evaluators/biometric_categorization_evaluator.py +472 -0
- aicertify-0.7.0/aicertify/evaluators/compliance_evaluator.py +407 -0
- aicertify-0.7.0/aicertify/evaluators/content_safety_evaluator.py +532 -0
- aicertify-0.7.0/aicertify/evaluators/documentation/__init__.py +11 -0
- aicertify-0.7.0/aicertify/evaluators/documentation/model_card_evaluator.py +449 -0
- aicertify-0.7.0/aicertify/evaluators/evaluator_registry.py +537 -0
- aicertify-0.7.0/aicertify/evaluators/fairness_evaluator.py +1035 -0
- aicertify-0.7.0/aicertify/evaluators/prohibited_practices/__init__.py +25 -0
- aicertify-0.7.0/aicertify/evaluators/prohibited_practices/emotion_recognition_evaluator.py +347 -0
- aicertify-0.7.0/aicertify/evaluators/prohibited_practices/manipulation_evaluator.py +326 -0
- aicertify-0.7.0/aicertify/evaluators/prohibited_practices/social_scoring_evaluator.py +280 -0
- aicertify-0.7.0/aicertify/evaluators/prohibited_practices/vulnerability_exploitation_evaluator.py +353 -0
- aicertify-0.7.0/aicertify/evaluators/risk_management_evaluator.py +309 -0
- aicertify-0.7.0/aicertify/evaluators/simple_evaluator.py +111 -0
- aicertify-0.7.0/aicertify/models/README.md +93 -0
- aicertify-0.7.0/aicertify/models/__init__.py +93 -0
- aicertify-0.7.0/aicertify/models/base.py +54 -0
- aicertify-0.7.0/aicertify/models/contract.py +328 -0
- aicertify-0.7.0/aicertify/models/contract_models.py +146 -0
- aicertify-0.7.0/aicertify/models/evaluation.py +264 -0
- aicertify-0.7.0/aicertify/models/evaluation_models.py +45 -0
- aicertify-0.7.0/aicertify/models/langfair_eval.py +80 -0
- aicertify-0.7.0/aicertify/models/model_card.py +229 -0
- aicertify-0.7.0/aicertify/models/opa_results.py +105 -0
- aicertify-0.7.0/aicertify/models/policy_models.py +146 -0
- aicertify-0.7.0/aicertify/models/report.py +203 -0
- aicertify-0.7.0/aicertify/opa_core/__init__.py +26 -0
- aicertify-0.7.0/aicertify/opa_core/compliance_evaluator.py +280 -0
- aicertify-0.7.0/aicertify/opa_core/evaluator.py +1141 -0
- aicertify-0.7.0/aicertify/opa_core/extraction.py +388 -0
- aicertify-0.7.0/aicertify/opa_core/flexible_extractor.py +218 -0
- aicertify-0.7.0/aicertify/opa_core/policy_loader.py +877 -0
- aicertify-0.7.0/aicertify/opa_core/rego_parser.py +126 -0
- aicertify-0.7.0/aicertify/opa_core/simple_policy.py +93 -0
- aicertify-0.7.0/aicertify/opa_policies/.git +1 -0
- aicertify-0.7.0/aicertify/opa_policies/.github/WORKFLOWS.md +40 -0
- aicertify-0.7.0/aicertify/opa_policies/.github/workflows/opa-ci.yaml +40 -0
- aicertify-0.7.0/aicertify/opa_policies/.gitignore +39 -0
- aicertify-0.7.0/aicertify/opa_policies/.pre-commit-config.yaml +24 -0
- aicertify-0.7.0/aicertify/opa_policies/.regal/config.yaml +12 -0
- aicertify-0.7.0/aicertify/opa_policies/COMPATIBILITY.md +27 -0
- aicertify-0.7.0/aicertify/opa_policies/LICENSE +201 -0
- aicertify-0.7.0/aicertify/opa_policies/README.md +99 -0
- aicertify-0.7.0/aicertify/opa_policies/VERSION +1 -0
- aicertify-0.7.0/aicertify/opa_policies/custom/README.md +166 -0
- aicertify-0.7.0/aicertify/opa_policies/custom/example/v1/compliance/basic_compliance.rego.wip +68 -0
- aicertify-0.7.0/aicertify/opa_policies/custom/example/v1/compliance/basic_compliance_test.rego.wip +86 -0
- aicertify-0.7.0/aicertify/opa_policies/global/README.md +34 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/accountability/accountability.rego +137 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/accountability/accountability_test.rego +188 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/common/common_rules.rego +96 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/common/common_rules_test.rego +175 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/common/compliance.rego +48 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/common/compliance_test.rego +89 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/common/content_safety.rego +36 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/common/fairness.rego +48 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/common/risk_management.rego +39 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/fairness/fairness.rego +133 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/fairness/fairness_test.rego +240 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/toxicity/toxicity.rego +53 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/toxicity/toxicity_test.rego +80 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/transparency/transparency.rego +129 -0
- aicertify-0.7.0/aicertify/opa_policies/global/v1/transparency/transparency_test.rego +172 -0
- aicertify-0.7.0/aicertify/opa_policies/helper_functions/reporting.rego +72 -0
- aicertify-0.7.0/aicertify/opa_policies/helper_functions/reporting_test.rego +147 -0
- aicertify-0.7.0/aicertify/opa_policies/helper_functions/validation.rego +21 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/README.md +40 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/automotive/v1/vehicle_safety/vehicle_safety.rego +48 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/bfs/v1/loan_evaluation/README.md +54 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/bfs/v1/loan_evaluation/fair_lending.rego +150 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/bfs/v1/loan_evaluation/fair_lending_test.rego +144 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/bfs/v1/model_risk/model_risk.rego +60 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/bfs/v1/model_risk/model_risk_test.rego +34 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/healthcare/v1/diagnostic_safety/README.md +53 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/healthcare/v1/diagnostic_safety/diagnostic_safety.rego +158 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/healthcare/v1/diagnostic_safety/diagnostic_safety_test.rego +207 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/healthcare/v1/patient_safety/patient_safety.rego +69 -0
- aicertify-0.7.0/aicertify/opa_policies/industry_specific/healthcare/v1/patient_safety/patient_safety_test.rego +34 -0
- aicertify-0.7.0/aicertify/opa_policies/international/README.md +39 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/compliance/ce_marking.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/compliance/conformity_assessment.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/compliance/declaration_conformity.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/compliance/registration.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/data_governance/data_quality.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/data_governance/training_data.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/documentation/automated_logs.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/documentation/record_keeping.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/documentation/technical_documentation.rego +125 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/eu_fairness/eu_fairness.rego +113 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/eu_fairness/eu_fairness_test.rego +167 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/eu_fairness/test_input.json +17 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/gpai/downstream_transparency.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/gpai/systemic_risk_classification.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/gpai/technical_documentation.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/human_oversight/human_oversight.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/obligations/deployer_obligations.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/obligations/distributor_obligations.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/obligations/importer_obligations.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/obligations/provider_obligations.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/prohibited_practices/biometric_categorization.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/prohibited_practices/biometric_identification.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/prohibited_practices/criminal_profiling.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/prohibited_practices/emotion_recognition.rego +111 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/prohibited_practices/facial_recognition_scraping.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/prohibited_practices/manipulation.rego +56 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/prohibited_practices/social_scoring.rego +111 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/prohibited_practices/vulnerability_exploitation.rego +7 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/risk_management/risk_management.rego +155 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/technical_robustness/robustness.rego +6 -0
- aicertify-0.7.0/aicertify/opa_policies/international/eu_ai_act/v1/transparency/transparency.rego +127 -0
- aicertify-0.7.0/aicertify/opa_policies/international/india/v1/digital_india_policy/digital_india_policy.rego +42 -0
- aicertify-0.7.0/aicertify/opa_policies/international/nist/v1/ai_600_1/ai_600_1.rego +42 -0
- aicertify-0.7.0/aicertify/opa_policies/operational/README.md +41 -0
- aicertify-0.7.0/aicertify/opa_policies/operational/aiops/v1/scalability/scalability.rego +39 -0
- aicertify-0.7.0/aicertify/opa_policies/operational/corporate/v1/governance/governance.rego +45 -0
- aicertify-0.7.0/aicertify/opa_policies/operational/corporate/v1/infosec/infosec.rego +45 -0
- aicertify-0.7.0/aicertify/opa_policies/operational/cost/v1/resource_efficiency/resource_efficiency.rego +45 -0
- aicertify-0.7.0/aicertify/opa_policies/pyproject.toml +32 -0
- aicertify-0.7.0/aicertify/regulations.py +185 -0
- aicertify-0.7.0/aicertify/report_generation/README.md +157 -0
- aicertify-0.7.0/aicertify/report_generation/__init__.py +0 -0
- aicertify-0.7.0/aicertify/report_generation/config.py +66 -0
- aicertify-0.7.0/aicertify/report_generation/custom_extractors.py +164 -0
- aicertify-0.7.0/aicertify/report_generation/data_extraction.py +557 -0
- aicertify-0.7.0/aicertify/report_generation/flexible_extraction.py +268 -0
- aicertify-0.7.0/aicertify/report_generation/metric_configs.py +350 -0
- aicertify-0.7.0/aicertify/report_generation/policy_metric_extraction.py +325 -0
- aicertify-0.7.0/aicertify/report_generation/report_generator.py +712 -0
- aicertify-0.7.0/aicertify/report_generation/report_models.py +140 -0
- aicertify-0.7.0/aicertify/report_generation/report_template.html +313 -0
- aicertify-0.7.0/aicertify/report_generation/test_policy_metric_extraction.py +191 -0
- aicertify-0.7.0/aicertify/report_generation/test_report_generator.py +214 -0
- aicertify-0.7.0/aicertify/utils/logging_config.py +328 -0
- aicertify-0.7.0/pyproject.toml +139 -0
aicertify-0.7.0/LICENSE
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
|
203
|
+
-----------------------------------------------
|
|
204
|
+
Additional Disclaimer:
|
|
205
|
+
This software and any reports generated by it are provided on an "AS IS" basis, without any express or implied warranties.
|
|
206
|
+
The generated reports include a full disclaimer as follows:
|
|
207
|
+
|
|
208
|
+
"Disclaimer: This assessment is provided for informational and illustrative purposes only. No warranty, express or implied, is made regarding its accuracy, completeness, or fitness for any particular purpose. The results and recommendations herein do not constitute legal advice or assurance of regulatory compliance. Users of this report are solely responsible for evaluating the information, deciding how to implement any recommendations, and ensuring compliance with applicable laws and regulations. By using this report, you agree that [Project/Company Name] shall not be held liable for any direct, indirect, or consequential losses, damages, or claims arising from the use of or reliance on this information."
|
|
209
|
+
|
|
210
|
+
Please consult professional legal counsel for definitive guidance on compliance and legal matters.
|
|
211
|
+
-----------------------------------------------
|
aicertify-0.7.0/PKG-INFO
ADDED
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: aicertify
|
|
3
|
+
Version: 0.7.0
|
|
4
|
+
Summary: Compliance-as-code for AI systems. Audit your AI against the EU AI Act, NIST AI RMF, and 13+ regulatory frameworks using Open Policy Agent (OPA) — and produce audit-ready PDF, Markdown, JSON, or HTML reports.
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Keywords: ai-governance,ai-compliance,ai-act,eu-ai-act,nist-ai-rmf,responsible-ai,open-policy-agent,opa,rego,regulatory-compliance,ai-audit,ai-safety,fairness,policy-as-code,ai-evaluation,ai-certification
|
|
7
|
+
Author: Kapil Madan
|
|
8
|
+
Author-email: kapil.madan@gmail.com
|
|
9
|
+
Requires-Python: >=3.12,<3.13
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Information Technology
|
|
13
|
+
Classifier: Intended Audience :: Legal Industry
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Classifier: Topic :: Security
|
|
22
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
|
+
Classifier: Topic :: Software Development :: Testing
|
|
24
|
+
Requires-Dist: Pygments (>=2.20.0)
|
|
25
|
+
Requires-Dist: aiohttp (>=3.13.4)
|
|
26
|
+
Requires-Dist: banks (>=2.4.2)
|
|
27
|
+
Requires-Dist: black (>=26.3.1,<27.0.0)
|
|
28
|
+
Requires-Dist: brotli (>=1.2.0)
|
|
29
|
+
Requires-Dist: colorlog (>=6.9.0,<7.0.0)
|
|
30
|
+
Requires-Dist: datasets (>=3.3.2,<4.0.0)
|
|
31
|
+
Requires-Dist: deepeval (>=2.4.8,<3.0.0)
|
|
32
|
+
Requires-Dist: fastapi (>=0.119.0,<1.0)
|
|
33
|
+
Requires-Dist: filelock (>=3.20.3)
|
|
34
|
+
Requires-Dist: h11 (>=0.14.0)
|
|
35
|
+
Requires-Dist: huggingface-hub (>=0.34.0,<1.0)
|
|
36
|
+
Requires-Dist: langchain (>=1.0.0)
|
|
37
|
+
Requires-Dist: langchain-community (>=0.3.27)
|
|
38
|
+
Requires-Dist: langchain-core (>=1.2.22)
|
|
39
|
+
Requires-Dist: langchain-openai (>=1.1.14)
|
|
40
|
+
Requires-Dist: langchain-text-splitters (>=1.1.2)
|
|
41
|
+
Requires-Dist: langfair (>=0.8.0,<1.0)
|
|
42
|
+
Requires-Dist: langsmith (>=0.8.0)
|
|
43
|
+
Requires-Dist: markdown (>=3.8.1,<4.0)
|
|
44
|
+
Requires-Dist: marshmallow (>=3.26.2)
|
|
45
|
+
Requires-Dist: nltk (>=3.9.4)
|
|
46
|
+
Requires-Dist: opa-python-client (>=0.1.0)
|
|
47
|
+
Requires-Dist: orjson (>=3.11.6)
|
|
48
|
+
Requires-Dist: pandas (>=2.2.0)
|
|
49
|
+
Requires-Dist: pillow (>=12.2.0)
|
|
50
|
+
Requires-Dist: protobuf (>=5.29.6,<6)
|
|
51
|
+
Requires-Dist: pyasn1 (>=0.6.3)
|
|
52
|
+
Requires-Dist: pycares (>=4.9.0,<5.0.0)
|
|
53
|
+
Requires-Dist: pydantic (>=2.10.6,<3.0.0)
|
|
54
|
+
Requires-Dist: pydantic-ai (>=0.0.24,<0.0.25)
|
|
55
|
+
Requires-Dist: pypdf (>=6.10.2)
|
|
56
|
+
Requires-Dist: pytest (>=9.0.3,<10.0.0)
|
|
57
|
+
Requires-Dist: python-dotenv (>=1.2.2)
|
|
58
|
+
Requires-Dist: reportlab (>=4.3.1,<5.0.0)
|
|
59
|
+
Requires-Dist: requests (>=2.33.0,<3.0.0)
|
|
60
|
+
Requires-Dist: rich (>=13.8.0,<14.0.0)
|
|
61
|
+
Requires-Dist: sentencepiece (>=0.2.1)
|
|
62
|
+
Requires-Dist: setuptools (>=78.1.1)
|
|
63
|
+
Requires-Dist: starlette (>=0.49.1)
|
|
64
|
+
Requires-Dist: torch (>=2.7.0)
|
|
65
|
+
Requires-Dist: transformers (>=4.53.0)
|
|
66
|
+
Requires-Dist: urllib3 (>=2.7.0)
|
|
67
|
+
Requires-Dist: uvicorn (>=0.34.0,<0.35.0)
|
|
68
|
+
Requires-Dist: virtualenv (>=20.36.1)
|
|
69
|
+
Requires-Dist: yfinance (>=0.2.54,<0.3.0)
|
|
70
|
+
Project-URL: Changelog, https://github.com/Principled-Evolution/aicertify/blob/main/CHANGELOG.md
|
|
71
|
+
Project-URL: Documentation, https://github.com/Principled-Evolution/aicertify#readme
|
|
72
|
+
Project-URL: Homepage, https://github.com/Principled-Evolution/aicertify
|
|
73
|
+
Project-URL: Issues, https://github.com/Principled-Evolution/aicertify/issues
|
|
74
|
+
Project-URL: Policy Library (gopal), https://github.com/Principled-Evolution/gopal
|
|
75
|
+
Project-URL: Repository, https://github.com/Principled-Evolution/aicertify
|
|
76
|
+
Description-Content-Type: text/markdown
|
|
77
|
+
|
|
78
|
+
<div align="center">
|
|
79
|
+
<img src="aicertify/assets/aic.png" alt="AICertify" width="180"/>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<h1 align="center">AICertify</h1>
|
|
83
|
+
|
|
84
|
+
<p align="center">
|
|
85
|
+
<a href="README.md">English</a> |
|
|
86
|
+
<a href="README.zh-CN.md">简体中文</a> |
|
|
87
|
+
<a href="README.ja-JP.md">日本語</a> |
|
|
88
|
+
<a href="README.ko-KR.md">한국어</a> |
|
|
89
|
+
<a href="README.hi-IN.md">हिन्दी</a>
|
|
90
|
+
</p>
|
|
91
|
+
|
|
92
|
+
<p align="center">
|
|
93
|
+
<strong>Compliance-as-code for AI systems.</strong>
|
|
94
|
+
</p>
|
|
95
|
+
|
|
96
|
+
<p align="center">
|
|
97
|
+
<em>Audit your AI against the EU AI Act, NIST AI RMF, and 13 more frameworks — one contract, one command, one report.</em>
|
|
98
|
+
</p>
|
|
99
|
+
|
|
100
|
+
<p align="center">
|
|
101
|
+
<a href="https://github.com/Principled-Evolution/aicertify/actions/workflows/aicertify-ci.yaml"><img src="https://github.com/Principled-Evolution/aicertify/actions/workflows/aicertify-ci.yaml/badge.svg" alt="CI"></a>
|
|
102
|
+
<a href="https://github.com/Principled-Evolution/aicertify/stargazers"><img src="https://img.shields.io/github/stars/Principled-Evolution/aicertify?style=flat-square" alt="Stars"></a>
|
|
103
|
+
<a href="https://github.com/Principled-Evolution/aicertify/releases"><img src="https://img.shields.io/badge/version-0.7.0-brightgreen.svg?style=flat-square" alt="Version 0.7.0"></a>
|
|
104
|
+
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.12%2B-blue.svg?style=flat-square" alt="Python 3.12+"></a>
|
|
105
|
+
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square" alt="Apache 2.0"></a>
|
|
106
|
+
<a href="https://www.openpolicyagent.org/"><img src="https://img.shields.io/badge/built%20on-OPA-7D4698.svg?style=flat-square" alt="Built on OPA"></a>
|
|
107
|
+
<a href="https://github.com/Principled-Evolution/gopal"><img src="https://img.shields.io/badge/policies-94%20rego-orange.svg?style=flat-square" alt="94 Rego Policies"></a>
|
|
108
|
+
<a href="https://github.com/Principled-Evolution/aicertify#status"><img src="https://img.shields.io/badge/status-beta-orange.svg?style=flat-square" alt="Beta"></a>
|
|
109
|
+
<a href="https://makeapullrequest.com"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs Welcome"></a>
|
|
110
|
+
</p>
|
|
111
|
+
|
|
112
|
+
<p align="center">
|
|
113
|
+
<img src="diagrams/diagram1_hero_flow.png" alt="From AI app to audit-ready report: AI Application -> AICertify Contract -> OPA Policy Evaluation -> Compliance Report" width="85%" />
|
|
114
|
+
</p>
|
|
115
|
+
|
|
116
|
+
<br>
|
|
117
|
+
|
|
118
|
+
Regulators are moving faster than your governance docs. The EU AI Act is in force. NIST AI RMF is the de-facto US standard. India, Brazil, and Singapore are next. `AICertify` lets you encode those obligations as executable [Open Policy Agent](https://www.openpolicyagent.org/) policies, run them against captured AI interactions, and produce audit-ready reports in PDF, Markdown, JSON, or HTML.
|
|
119
|
+
|
|
120
|
+
It's the missing link between *"we have a responsible-AI policy"* and *"we can prove it."*
|
|
121
|
+
|
|
122
|
+
**Use it when you need to:**
|
|
123
|
+
|
|
124
|
+
- turn AI governance policies into executable checks
|
|
125
|
+
- produce audit-ready compliance evidence on every release
|
|
126
|
+
- evaluate AI interactions against named regulatory frameworks (EU AI Act, NIST AI RMF, FERPA, fair-lending, FAA/EASA aviation, …)
|
|
127
|
+
- generate Markdown, JSON, HTML, or PDF reports your auditor can read
|
|
128
|
+
- integrate AI compliance checks into CI/CD
|
|
129
|
+
|
|
130
|
+
AICertify is part of the [Open Policy Agent ecosystem](https://www.openpolicyagent.org/ecosystem/entry/principled-evolution) — built on the same policy engine that powers Kubernetes admission, microservice authorisation, and infrastructure governance at scale.
|
|
131
|
+
|
|
132
|
+
> ⭐ **If AICertify helps you, please star the repo.** It helps AI governance and policy-as-code practitioners discover the project.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Quick Start
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
git clone https://github.com/Principled-Evolution/aicertify.git
|
|
140
|
+
cd aicertify
|
|
141
|
+
pip install -e .
|
|
142
|
+
python examples/quickstart.py
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The quickstart wires a sample AI application through the EU AI Act policy set and writes a compliance report into `reports/`. Open it. That's what your audit deliverable looks like — generated, not handwritten.
|
|
146
|
+
|
|
147
|
+
### Minimal Python usage
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
from aicertify import regulations, application
|
|
151
|
+
|
|
152
|
+
# 1. Pick the regulations you want to certify against
|
|
153
|
+
regs = regulations.create("my_regulations")
|
|
154
|
+
regs.add("eu_ai_act")
|
|
155
|
+
|
|
156
|
+
# 2. Wrap your AI app
|
|
157
|
+
app = application.create(
|
|
158
|
+
name="customer-support-bot",
|
|
159
|
+
model_name="gpt-4o",
|
|
160
|
+
model_version="2024-08-06",
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
# 3. Feed it real interactions
|
|
164
|
+
app.add_interaction(
|
|
165
|
+
input_text="I want a refund for my order",
|
|
166
|
+
output_text="I can help with that. Could you share your order number?",
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
# 4. Evaluate and get reports back
|
|
170
|
+
await app.evaluate(regulations=regs, report_format="pdf", output_dir="reports")
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
That's the whole loop. **Contract → interactions → evaluate → report.**
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Why AICertify
|
|
178
|
+
|
|
179
|
+
Most AI-governance tooling is either:
|
|
180
|
+
|
|
181
|
+
- **A vendor SaaS** that locks your audit trail behind a login (Credo AI, Holistic AI), or
|
|
182
|
+
- **A research toolkit** focused on a single dimension — fairness metrics (Fairlearn, AI Fairness 360) or explainability (Microsoft RAI Toolbox).
|
|
183
|
+
|
|
184
|
+
Neither produces the document a regulator actually asks for: *evidence that you tested this AI system against a named regulation, with reproducible policies and a dated report.*
|
|
185
|
+
|
|
186
|
+
AICertify is built for that artifact.
|
|
187
|
+
|
|
188
|
+
<p align="center">
|
|
189
|
+
<img src="diagrams/diagram4_comparison.png" alt="AICertify vs alternatives: AICertify is the only open-source, policy-as-code option with named regulatory frameworks, industry verticals, and audit-ready reports out of the box" width="85%" />
|
|
190
|
+
</p>
|
|
191
|
+
|
|
192
|
+
| | AICertify | Fairlearn / AIF360 | MS RAI Toolbox | Credo AI |
|
|
193
|
+
|---|---|---|---|---|
|
|
194
|
+
| Open source | ✅ Apache 2.0 | ✅ MIT | ✅ MIT | ❌ Closed |
|
|
195
|
+
| On-prem / air-gapped | ✅ | ✅ | ✅ | ❌ |
|
|
196
|
+
| Named regulatory frameworks | **EU AI Act, NIST RMF, Brazil AI Bill, India DPDP, +11 more** | ❌ (fairness only) | ❌ (toolkit) | ✅ |
|
|
197
|
+
| Policy-as-code (auditable, diff-able) | ✅ OPA / Rego | ❌ | ❌ | ❌ |
|
|
198
|
+
| Industry verticals out of the box | Aviation, Banking, Healthcare, Automotive, Education | ❌ | ❌ | Partial |
|
|
199
|
+
| Generates audit-ready reports | ✅ PDF / MD / JSON / HTML | ❌ | Partial | ✅ |
|
|
200
|
+
| Custom policies | ✅ Drop a `.rego` file | ❌ | N/A | ✅ (paid) |
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## How It Works
|
|
205
|
+
|
|
206
|
+
<p align="center">
|
|
207
|
+
<img src="diagrams/diagram2_architecture.png" alt="AICertify architecture: Your AI App feeds a Contract, which flows through Evaluators (Fairness, ContentSafety, RiskManagement, Compliance) into the OPA Engine with 94 Rego policies, producing an audit deliverable via the Report Generator" width="85%" />
|
|
208
|
+
</p>
|
|
209
|
+
|
|
210
|
+
1. **Contract** — A JSON description of your AI application: model, version, captured interactions, metadata.
|
|
211
|
+
2. **Evaluators** — Pluggable Python evaluators (Fairness, ContentSafety, RiskManagement, Compliance) extract metrics from your interactions.
|
|
212
|
+
3. **OPA policies** — The metrics get evaluated against the regulation's Rego policies (sourced from the [gopal](https://github.com/Principled-Evolution/gopal) policy library).
|
|
213
|
+
4. **Report** — A formatted, dated artifact you can hand to legal, an auditor, or your AI risk committee.
|
|
214
|
+
|
|
215
|
+
Because the policies are declarative Rego, they version, diff, and review like any other code. When a regulation changes, you bump the policy — not your evaluation harness.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Regulatory Coverage
|
|
220
|
+
|
|
221
|
+
<p align="center">
|
|
222
|
+
<img src="diagrams/diagram3_regulatory_coverage.png" alt="Regulatory coverage: 94 policies across 15+ frameworks and 5 industries -- EU AI Act, NIST AI RMF, India DPDP, Brazil AI Bill, RTCA DO-365/366, FAA Part 107, EASA SORA, ICAO Doc 10019, Healthcare, Banking and Financial Services, Automotive, Education, Global, Aviation, AIOps, Corporate" width="85%" />
|
|
223
|
+
</p>
|
|
224
|
+
|
|
225
|
+
AICertify runs against the [gopal](https://github.com/Principled-Evolution/gopal) policy library — **94 production OPA policies** across these frameworks:
|
|
226
|
+
|
|
227
|
+
### International
|
|
228
|
+
- **EU AI Act** — 29 policies covering prohibited practices, biometric ID, manipulation, transparency, technical documentation, human oversight, GPAI obligations
|
|
229
|
+
- **NIST AI RMF** — Govern, Map, Measure, Manage + AI 600-1
|
|
230
|
+
- **India Digital Policy** — DPDP-aligned obligations
|
|
231
|
+
- **Brazil AI Governance Bill** — Algorithmic governance requirements
|
|
232
|
+
- **Aviation standards** — ICAO Doc 10019, RTCA DO-365/366, ASTM F3442, ISO 21384, FAA Part 107, EASA SORA
|
|
233
|
+
|
|
234
|
+
### Industry-specific
|
|
235
|
+
- **Aviation** (17 policies) — Detect-and-avoid, certification, design, integration validation
|
|
236
|
+
- **Education** (12 policies) — FERPA, COPPA, proctoring, human-in-the-loop grading
|
|
237
|
+
- **Banking & Financial Services** — Model risk, fair lending
|
|
238
|
+
- **Healthcare** — Patient safety, diagnostic safety
|
|
239
|
+
- **Automotive** — Vehicle safety integration
|
|
240
|
+
|
|
241
|
+
### Global & Operational
|
|
242
|
+
- **Global** — Accountability, fairness, transparency, explainability, content safety, risk management, security
|
|
243
|
+
- **Corporate** — InfoSec, governance
|
|
244
|
+
- **AIOps & Cost** — Scalability, resource efficiency
|
|
245
|
+
|
|
246
|
+
Don't see your regulation? [Add a Rego file](https://github.com/Principled-Evolution/gopal/blob/main/CONTRIBUTING.md). The library is designed to be extended.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## CLI
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
python -m aicertify.cli \
|
|
254
|
+
--contract path/to/contract.json \
|
|
255
|
+
--policy aicertify/opa_policies/international/eu_ai_act/v1 \
|
|
256
|
+
--report-format pdf \
|
|
257
|
+
--output-dir reports/
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Useful flags:
|
|
261
|
+
|
|
262
|
+
| Flag | Purpose |
|
|
263
|
+
|---|---|
|
|
264
|
+
| `--contract` | Path to the AI application contract JSON |
|
|
265
|
+
| `--policy` | Path to the OPA policy folder to evaluate against |
|
|
266
|
+
| `--report-format` | `pdf`, `markdown`, `json`, `html` (default: `pdf`) |
|
|
267
|
+
| `--evaluators` | Restrict to specific evaluators (e.g. `Fairness ContentSafety`) |
|
|
268
|
+
| `--output-dir` | Where reports land (default: `./reports`) |
|
|
269
|
+
| `--verbose` | Verbose logging |
|
|
270
|
+
|
|
271
|
+
See [`examples/quickstart.py`](examples/quickstart.py) for the full Python API.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## See the output
|
|
276
|
+
|
|
277
|
+
You don't have to install anything to see what AICertify produces. Pre-generated reports are committed to the repo:
|
|
278
|
+
|
|
279
|
+
- **[demo-report-eu-ai-act.pdf](docs/demo-report-eu-ai-act.pdf)** — a customer-support agent evaluated against the EU AI Act
|
|
280
|
+
- [examples/outputs/eu_ai_act/](examples/outputs/eu_ai_act/) — the canonical full output
|
|
281
|
+
- [examples/outputs/loan_evaluation/](examples/outputs/loan_evaluation/) — a credit-scoring model evaluated for fair lending
|
|
282
|
+
- [examples/outputs/medical_diagnosis/](examples/outputs/medical_diagnosis/) — a clinical-decision-support model evaluated for patient safety
|
|
283
|
+
|
|
284
|
+
<p align="center">
|
|
285
|
+
<img src="diagrams/diagram5_report_anatomy.png" alt="Anatomy of an audit-ready report: header with framework name, application, model and date; executive summary; policy results table; risk assessment bar chart; remediation guidance; footer attributing AICertify v0.7.0" width="85%" />
|
|
286
|
+
</p>
|
|
287
|
+
|
|
288
|
+
Open the PDFs. That's what your auditor wants.
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## Status
|
|
293
|
+
|
|
294
|
+
AICertify is in **beta (v0.7.0)** — the API may evolve before the 1.0 release. Production-ready frameworks today:
|
|
295
|
+
|
|
296
|
+
- ✅ EU AI Act
|
|
297
|
+
- ✅ Global evaluators (fairness, content safety, transparency)
|
|
298
|
+
- ✅ Healthcare, BFS, Automotive industry policies
|
|
299
|
+
- ✅ Aviation policy set (RTCA, ASTM, FAA, EASA)
|
|
300
|
+
- 🚧 NIST AI RMF — partial coverage
|
|
301
|
+
- 🚧 India Digital Policy — early stage
|
|
302
|
+
|
|
303
|
+
Track progress in the [policy library roadmap](https://github.com/Principled-Evolution/gopal).
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## For OPA / Rego users
|
|
308
|
+
|
|
309
|
+
If you already use OPA for Kubernetes admission, microservice authorisation, or infrastructure governance, AICertify is the AI-system slot in your existing policy strategy.
|
|
310
|
+
|
|
311
|
+
- **Bring your own Rego policies.** Drop a `.rego` file into the policy folder and it evaluates alongside the bundled set.
|
|
312
|
+
- **Evaluate AI interactions through OPA.** Captured inputs, outputs, and metrics flow into your policies via the standard OPA `input` document.
|
|
313
|
+
- **Generate audit-ready evidence.** PDF / Markdown / JSON / HTML, one command.
|
|
314
|
+
- **Use [gopal](https://github.com/Principled-Evolution/gopal) as the policy library underneath.** 94 production Rego policies covering EU AI Act, NIST AI RMF, aviation safety, FERPA, fair lending, and more.
|
|
315
|
+
|
|
316
|
+
AICertify is listed in the [Open Policy Agent ecosystem](https://www.openpolicyagent.org/ecosystem/entry/principled-evolution) as the AI-governance entry alongside Gopal.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Why AICertify?
|
|
321
|
+
|
|
322
|
+
Most AI governance programs live in PDFs, spreadsheets, and policy documents. They describe what *should* happen but do not prove what *did*.
|
|
323
|
+
|
|
324
|
+
AICertify turns governance rules into executable policy checks.
|
|
325
|
+
|
|
326
|
+
Instead of saying:
|
|
327
|
+
|
|
328
|
+
> "Our chatbot follows our responsible AI policy."
|
|
329
|
+
|
|
330
|
+
You can produce:
|
|
331
|
+
|
|
332
|
+
> "Here is the captured interaction, the policy version, the OPA evaluation result, and the generated audit report."
|
|
333
|
+
|
|
334
|
+
AICertify is for AI teams, governance teams, auditors, and platform engineers who need AI compliance evidence that can be **read, run, reviewed, and repeated**.
|
|
335
|
+
|
|
336
|
+
See the full positioning in [docs/why-aicertify.md](docs/why-aicertify.md).
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Who should contribute?
|
|
341
|
+
|
|
342
|
+
AICertify is especially useful for:
|
|
343
|
+
|
|
344
|
+
- **AI engineers** building regulated AI systems
|
|
345
|
+
- **Governance, risk, and compliance (GRC) teams** producing audit evidence
|
|
346
|
+
- **Auditors and model risk professionals** evaluating third-party AI
|
|
347
|
+
- **OPA / Rego users** interested in AI-specific policy authoring
|
|
348
|
+
- **Responsible AI researchers** wanting reproducible benchmarks
|
|
349
|
+
- **Python developers** interested in compliance automation
|
|
350
|
+
|
|
351
|
+
**Non-code contributions are welcome:** examples, policy mappings, docs, tests, report templates, and regulatory notes.
|
|
352
|
+
|
|
353
|
+
A good place to start is the [`good first issue`](https://github.com/Principled-Evolution/aicertify/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) and [`help wanted`](https://github.com/Principled-Evolution/aicertify/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) labels.
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## Contributing
|
|
358
|
+
|
|
359
|
+
We welcome:
|
|
360
|
+
|
|
361
|
+
- New regulatory frameworks (open an issue first to align scope)
|
|
362
|
+
- Industry-specific policies you've battle-tested
|
|
363
|
+
- New evaluators (fairness, safety, robustness — see `aicertify/evaluators/`)
|
|
364
|
+
- Bug reports with a minimal reproducing contract
|
|
365
|
+
- Documentation, examples, and tutorials
|
|
366
|
+
|
|
367
|
+
Start with [CONTRIBUTING.md](CONTRIBUTING.md), the [Code of Conduct](CODE_OF_CONDUCT.md), and the open [contributor issues](https://github.com/Principled-Evolution/aicertify/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
|
|
368
|
+
|
|
369
|
+
For security issues, please follow the [Security Policy](SECURITY.md) — report privately to [security@principledevolution.ai](mailto:security@principledevolution.ai), not via public issue.
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## Related Projects
|
|
374
|
+
|
|
375
|
+
- **[gopal](https://github.com/Principled-Evolution/gopal)** — The OPA policy library AICertify uses under the hood. Use it standalone with the OPA CLI if you don't need the Python framework.
|
|
376
|
+
- **[Open Policy Agent](https://www.openpolicyagent.org/)** — The policy engine.
|
|
377
|
+
- **[Regal](https://github.com/StyraInc/regal)** — Rego linter used to keep policies clean.
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## License
|
|
382
|
+
|
|
383
|
+
Apache License 2.0 — see [LICENSE](LICENSE).
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
<p align="center">
|
|
388
|
+
<strong>⭐ If AICertify is useful to you, please star the repo and share it with one colleague.</strong><br>
|
|
389
|
+
<sub>Every star helps AI governance and policy-as-code practitioners discover the project.</sub>
|
|
390
|
+
</p>
|
|
391
|
+
|
|
392
|
+
<p align="center"><sub>Built by <a href="https://github.com/Principled-Evolution">Principled Evolution</a> · Policies you can read, run, and prove.</sub></p>
|
|
393
|
+
|