open-policy-agent/swift-opa

Swift package for evaluating OPA IR Plans compiled from Rego policies.

Hosted by Cloud Native Computing Foundation · part of Linux Foundation

View on GitHub ↗Jump to charts ↓

open-policy-agent/swift-opa has 30+ stars and 10+ forks on GitHub, is written in Swift, and was last pushed on Sep 24, 2026. Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 1 hour ago
Type:Library / SDKCategory(s):Identity, Auth & SecretsSecurity & Privacy
Added to GitGenius on October 15th, 2026
Created on April 8th, 2025
Open Issues & Pull Requests: 14 (+0)
GitHub issues: Enabled
Number of forks: 18
Total Stargazers: 36 (+0)
Total Subscribers: 11 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.8 days
Mean response time: 62.4 days
90th percentile: 182.1 days
Tracked items: 35

Maintainer activity

2 people did triage or write work on this repository in the last 12 months.

Counts unlabeled, assigned, unassigned, milestoned, demilestoned, locked, unlocked over the last 12 months. These are issue and pull request events that require triage or write permission. Commits and code review are not counted. labeled and renamed are excluded because GitHub issue forms record the issue author as the actor. Figures from October 18, 2026. This count is not comparable across projects: each project's automation decides which of these events a person emits. How this is counted.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 10
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 213 days
Stale 30+ days: 9
Stale 90+ days: 9

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • new-feature (14)
  • bug (6)
  • builtin-impl (5)

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

Swift-OPA is a Swift package for evaluating Open Policy Agent IR Plans compiled from Rego policies.

The tool addresses the need to enforce policy decisions within Swift applications without external service calls. Rego is a declarative language designed for expressing authorization and other policies over structured data. Swift-OPA enables in-process evaluation by taking Rego policies, compiling them to an intermediate representation using the OPA build command with a plan target, and then evaluating those compiled plans directly within a Swift service or application. The package loads bundles from disk and executes queries against them, returning policy decisions as structured results.

Developers should choose this tool when they need to embed policy evaluation directly in a Swift application and want to avoid the latency and operational complexity of calling a remote OPA server. It suits projects where policies are known at build time and can be compiled ahead of time. The README notes that for use cases requiring metrics, logging, automatic bundle reloading over the network, and other management features, the Swift-OPA-SDK library provides a wrapper around this evaluator. The package offers optional traits to customize builds: the CLI trait can be disabled to drop the command-line tool and its dependencies, and the YAML trait can be disabled to exclude YAML builtin functions and their dependencies, allowing library-only consumers to minimize their dependency footprint.

The project maintains active engagement with reported issues, including documented limitations such as the inability to parse tar.gz files directly, requiring manual extraction before use. Development includes support for multiple optional features that can be independently toggled, indicating attention to flexibility and minimal dependency requirements for different use cases.