18 open-source Rego policies encoding Regulation (EU) 2024/2847. Apache 2.0, Rego v1, ready to load into OPA or Enterprise OPA.
18 Rego policy files encoding Regulation (EU) 2024/2847, part of the Rego Policy Libraries — a standalone, dependency-free collection of Open Policy Agent policies for published security and compliance standards. No orchestrator, no agent, no vendor runtime.
git clone https://github.com/ynotbhatc/rego_policy_libraries.git
opa eval -d rego_policy_libraries/frameworks/compliance/cra -f pretty 'data'
Or load into a running OPA:
for f in rego_policy_libraries/frameworks/compliance/cra/*.rego; do
curl -X PUT --data-binary @"$f" "$OPA/v1/policies/$(basename $f .rego)"
done
Gating a change of state — evaluate a proposed action before it proceeds, and refuse it if it violates the standard. Measuring state — evaluate collected facts about an environment against the standard to produce compliance evidence. The same policy content serves both; only the integration differs.
cra_authorised_representative.rego cra.authorised_representativecra_conformity_assessment.rego cra.conformity_assessmentcra_main.rego cra.maincra_crypto_evidence.rego cra.crypto_evidencecra_declaration_of_conformity.rego cra.declaration_of_conformitycra_distributor_obligations.rego cra.distributor_obligationscra_essential_requirements.rego cra.essential_requirementscra_foss_exclusion.rego cra.foss_exclusioncra_importer_obligations.rego cra.importer_obligationscra_incident_reporting.rego cra.incident_reportingcra_manufacturer_obligations.rego cra.manufacturer_obligationscra_online_marketplace.rego cra.online_marketplacecra_oss_steward.rego cra.oss_stewardcra_substantial_modification.rego cra.substantial_modificationcra_supply_chain_evidence.rego cra.supply_chain_evidencecra_technical_documentation.rego cra.technical_documentationcra_user_information.rego cra.user_informationcra_vulnerability_handling.rego cra.vulnerability_handlingTest coverage is published in
COVERAGE.md, and uncovered policies are the best
first contribution — each is small, self-contained, and either passes
opa test or does not. See
CONTRIBUTING.md.