Rego is the declarative policy language used by Open Policy Agent (OPA). This tile covers writing and testing Rego policies for Kubernetes admission control, Terraform and infrastructure-as-code plan validation, Docker container authorization, HTTP API authorization, RBAC and role-based access control, data filtering, metadata annotations with opa inspect, and OPA policy testing with opa test.
99
Quality
Pending
Does it follow best practices?
Impact
99%
1.19xAverage score across 31 eval scenarios
Pending
The risk profile of this skill
{
"context": "Evaluates whether the agent implements a correct required tags enforcement policy. Key patterns: action != \"delete\" exclusion (rather than positive action check), a supports_tags helper with a set of taggable resource types, object.get with empty map default for safe tag access, iteration over a required_tags array constant, and a second deny rule for empty tag values.",
"type": "weighted_checklist",
"checklist": [
{
"name": "action != delete exclusion pattern",
"description": "The deny rules filter using `action != \"delete\"` (iterating over actions and excluding deletes) rather than only checking for create/update, so that no-op and read actions are also correctly handled",
"max_score": 23
},
{
"name": "supports_tags helper",
"description": "A `supports_tags` (or equivalent) helper rule limits tag checking to the specified taggable resource types using set membership",
"max_score": 17
},
{
"name": "Safe tag access with object.get",
"description": "Tags are accessed via `object.get(r.change.after, \"tags\", {})` (or equivalent) so that resources with no tags block defined do not cause undefined errors",
"max_score": 17
},
{
"name": "Deny for missing and empty tags",
"description": "There are two deny rules: one for missing required tags (tag key absent) and one for empty tag values (tag key present but value is empty string)",
"max_score": 18
},
{
"name": "Tests pass",
"description": "All tests pass when running `opa test . -v`",
"max_score": 25
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
scenario-27
scenario-28
scenario-29
scenario-30
scenario-31