16 open-source Rego policies encoding NERC Critical Infrastructure Protection, CIP-002 to CIP-015. Apache 2.0, Rego v1, ready to load into OPA or Enterprise OPA.
16 Rego policy files encoding NERC Critical Infrastructure Protection, CIP-002 to CIP-015, 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/critical_infrastructure/nerc_cip -f pretty 'data'
Or load into a running OPA:
for f in rego_policy_libraries/frameworks/critical_infrastructure/nerc_cip/*.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.
cip_002_asset_identification.rego nerc_cip.cip_002cip_003_security_management.rego nerc_cip.cip_003cip_004_personnel_training.rego nerc_cip.cip_004cip_005_electronic_security.rego nerc_cip.cip_005cip_006_physical_security.rego nerc_cip.cip_006cip_007_systems_security.rego nerc_cip.cip_007cip_008_incident_response.rego nerc_cip.cip_008cip_009_recovery_plans.rego nerc_cip.cip_009cip_010_configuration_management.rego nerc_cip.cip_010cip_011_information_protection.rego nerc_cip.cip_011cip_012_communications.rego nerc_cip.cip_012cip_013_supply_chain.rego nerc_cip.cip_013cip_014_physical_security_transmission.rego nerc_cip.cip_014cip_015_insm.rego nerc_cip_cip015nerc_cip_main.rego nerc_cip_mainnerc_cip_simplified.rego nerc.cip.simplifiedTest 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.