9 open-source Rego policies encoding Advanced Metering Infrastructure and smart grid security. Apache 2.0, Rego v1, ready to load into OPA or Enterprise OPA.
9 Rego policy files encoding Advanced Metering Infrastructure and smart grid security, 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/ami -f pretty 'data'
Or load into a running OPA:
for f in rego_policy_libraries/frameworks/critical_infrastructure/ami/*.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.
ami_device_compliance.rego ami.device.complianceami_headend_security.rego ami.headend.securitynist_ir7628_access_control.rego ami.nist_ir7628.access_controlnist_ir7628_audit.rego ami.nist_ir7628.auditnist_ir7628_complete.rego ami.nist_ir7628.completenist_ir7628_config_management.rego ami.nist_ir7628.config_managementnist_ir7628_identification_auth.rego ami.nist_ir7628.identification_authnist_ir7628_incident_response.rego ami.nist_ir7628.incident_responsenist_ir7628_system_comms.rego ami.nist_ir7628.system_commsTest 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.