# open-policy-agent/opa

Open Policy Agent (OPA) is an open source, general-purpose policy engine.

Repository: https://github.com/open-policy-agent/opa
Canonical: https://ross.abutalabs.com/products/opa
Homepage: https://www.openpolicyagent.org
Language: Go
License: Apache-2.0
License Family: permissive
Topics: opa, policy, declarative, json, compliance, cloud-native, authorization, open-policy-agent
Last push: 2026-08-27T00:04:37+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 98, longevity 100
- inputs: {"age_days": 3901, "days_push": 7, "days_rel": 16, "gap_med": 16.5, "n_releases_24m": 43}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 12164, forks 1663 (observed 2026-08-28T04:10:51.877919+00:00)

## What it is
Open Policy Agent (OPA) is a general-purpose, open-source policy engine that unifies policy enforcement across the stack using a high-level declarative language called Rego. It decouples policy decision-making from enforcement, letting applications, Kubernetes, API gateways, and CI/CD pipelines query OPA for context-aware authorization and compliance decisions.

## Use cases
- enforce fine-grained authorization for microservices and APIs
- write Kubernetes admission control policies
- offload authorization decisions from Envoy proxies
- define policy as code for CI/CD pipelines
- audit and replay policy decisions for compliance
- filter data with partial evaluation for SQL and other systems
- validate Terraform or infrastructure-as-code configurations

## When to choose
- you need unified, declarative policy enforcement across services, Kubernetes, and CI/CD
- you want to decouple authorization logic from application code
- you need audit trails and replayable policy decisions for compliance
- you want a CNCF-graduated, widely adopted policy engine with strong ecosystem support

## When to avoid
- you only need simple role-based access control built into a single app
- your team cannot invest in learning the Rego language
- you need a database-backed identity and permission system rather than a policy decision engine

## Facets
- artifact type: service
- maturity: stable
- function: authorization, security, api-framework, cli
- domain: security, cloud-computing, infrastructure-as-code, developer-tools, microservices
- platform: go, windows, self-hosted, cloud
- tags: rego, policy-as-code, cncf, admission-control, compliance, audit, envoy, kubernetes-admission, policy-decision-point, policy-engine, devops, docker, kubernetes, linux, macos

## Member repositories
- open-policy-agent/opa (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:51.877919+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:14:53.384571+00:00, confidence not recorded.
  - readme: https://github.com/open-policy-agent/opa (fetched 2026-08-28T04:10:51.877919+00:00, sha 84083be24a81)
  - homepage: https://www.openpolicyagent.org (fetched 2026-08-29T08:12:04.605037+00:00, sha ce2e89799e85)
  - site_page: https://www.openpolicyagent.org/docs (fetched 2026-08-29T08:12:04.608737+00:00, sha fea7a606930a)
  - site_page: https://www.openpolicyagent.org/docs/rest-api (fetched 2026-08-29T08:12:04.612024+00:00, sha ab83322baa35)
  - site_page: https://www.openpolicyagent.org/docs/envoy (fetched 2026-08-29T08:12:04.615073+00:00, sha af26afc8d494)
  - site_page: https://www.openpolicyagent.org/docs/contributing (fetched 2026-08-29T08:12:04.616927+00:00, sha 2dd2a9f10e32)
- Data as of 2026-08-30T08:39:29.467469+00:00.
