Rego policy engine implemented in Rust (gordon-to fork of microsoft/regorus).
Project description
regorus
Regorus is
- Rego-Rus(t) - A fast, light-weight Rego interpreter written in Rust.
- Rigorous - A rigorous enforcer of well-defined Rego semantics.
Regorus can be used in Python via regorus package. (It is not yet available in PyPI, but can be manually built.)
See Repository.
Automation
Run cargo xtask build-python to produce wheels via maturin, or cargo xtask test-python to reinstall the package locally and execute the sample script and pytest suite.
To build this binding, see building
Usage
import regorus
# Create engine
engine = regorus.Engine()
# Load policies
engine.add_policy_from_file('../../tests/aci/framework.rego')
engine.add_policy_from_file('../../tests/aci/api.rego')
engine.add_policy_from_file('../../tests/aci/policy.rego')
# Add policy data
data = {
"metadata": {
"devices": {
"/run/layers/p0-layer0": "1b80f120dbd88e4355d6241b519c3e25290215c469516b49dece9cf07175a766",
"/run/layers/p0-layer1": "e769d7487cc314d3ee748a4440805317c19262c7acd2fdbdb0d47d2e4613a15c",
"/run/layers/p0-layer2": "eb36921e1f82af46dfe248ef8f1b3afb6a5230a64181d960d10237a08cd73c79",
"/run/layers/p0-layer3": "41d64cdeb347bf236b4c13b7403b633ff11f1cf94dbc7cf881a44d6da88c5156",
"/run/layers/p0-layer4": "4dedae42847c704da891a28c25d32201a1ae440bce2aecccfa8e6f03b97a6a6c",
"/run/layers/p0-layer5": "fe84c9d5bfddd07a2624d00333cf13c1a9c941f3a261f13ead44fc6a93bc0e7a"
}
}
}
engine.add_data(data)
# Set input
input = {
"containerID": "container0",
"layerPaths": [
"/run/layers/p0-layer0",
"/run/layers/p0-layer1",
"/run/layers/p0-layer2",
"/run/layers/p0-layer3",
"/run/layers/p0-layer4",
"/run/layers/p0-layer5"
],
"target": "/run/gcs/c/container0/rootfs"
}
engine.set_input(input)
# Eval rule
value = engine.eval_rule('data.framework.mount_overlay')
# Print value
print(value)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gordon_to_regorus-0.10.1.tar.gz.
File metadata
- Download URL: gordon_to_regorus-0.10.1.tar.gz
- Upload date:
- Size: 3.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcc06002bb6056b15e34a300130045b56895c91842803aaaaa26bc398f0f07cc
|
|
| MD5 |
4693febccb3acaf0597650d0aaca44c4
|
|
| BLAKE2b-256 |
cae07ccd52d83a695f5be020c17fead6715963567bd02a2e1d7e06935498acdf
|
Provenance
The following attestation bundles were made for gordon_to_regorus-0.10.1.tar.gz:
Publisher:
publish-python.yml on gordon-to/gordon-to-regorus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gordon_to_regorus-0.10.1.tar.gz -
Subject digest:
bcc06002bb6056b15e34a300130045b56895c91842803aaaaa26bc398f0f07cc - Sigstore transparency entry: 1614408368
- Sigstore integration time:
-
Permalink:
gordon-to/gordon-to-regorus@e2239e2899d2586b3cd2f584190c6a612483936d -
Branch / Tag:
refs/heads/publish - Owner: https://github.com/gordon-to
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@e2239e2899d2586b3cd2f584190c6a612483936d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file gordon_to_regorus-0.10.1-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: gordon_to_regorus-0.10.1-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a24dce2ad911516aff6c829e35ea5886d035fa1a27f77eb964414c7cba80877
|
|
| MD5 |
00139ff1f9fdd574040d4f76e7aa14ed
|
|
| BLAKE2b-256 |
05ca8c19bcc013ad9f9d3847f8e7980ed61feaef662b07b1d0e262e22e5c5766
|
Provenance
The following attestation bundles were made for gordon_to_regorus-0.10.1-cp310-abi3-win_amd64.whl:
Publisher:
publish-python.yml on gordon-to/gordon-to-regorus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gordon_to_regorus-0.10.1-cp310-abi3-win_amd64.whl -
Subject digest:
1a24dce2ad911516aff6c829e35ea5886d035fa1a27f77eb964414c7cba80877 - Sigstore transparency entry: 1614408632
- Sigstore integration time:
-
Permalink:
gordon-to/gordon-to-regorus@e2239e2899d2586b3cd2f584190c6a612483936d -
Branch / Tag:
refs/heads/publish - Owner: https://github.com/gordon-to
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@e2239e2899d2586b3cd2f584190c6a612483936d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file gordon_to_regorus-0.10.1-cp310-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: gordon_to_regorus-0.10.1-cp310-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.10+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2727b22fb4bb063d013b52071f176f4fac9c66dfb9710d119ac33447d570d9e1
|
|
| MD5 |
949a8655dd965ca8379effdcd41655d7
|
|
| BLAKE2b-256 |
d262022cfdf44170f20fd01badf04ebc226ce8d1b040814f7913177acc94a764
|
Provenance
The following attestation bundles were made for gordon_to_regorus-0.10.1-cp310-abi3-manylinux_2_34_x86_64.whl:
Publisher:
publish-python.yml on gordon-to/gordon-to-regorus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gordon_to_regorus-0.10.1-cp310-abi3-manylinux_2_34_x86_64.whl -
Subject digest:
2727b22fb4bb063d013b52071f176f4fac9c66dfb9710d119ac33447d570d9e1 - Sigstore transparency entry: 1614408703
- Sigstore integration time:
-
Permalink:
gordon-to/gordon-to-regorus@e2239e2899d2586b3cd2f584190c6a612483936d -
Branch / Tag:
refs/heads/publish - Owner: https://github.com/gordon-to
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@e2239e2899d2586b3cd2f584190c6a612483936d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file gordon_to_regorus-0.10.1-cp310-abi3-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: gordon_to_regorus-0.10.1-cp310-abi3-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.10+, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4467c2c44054df4ec2a521d731b70db8b26025536a8d0930e8a2f033bfd4b071
|
|
| MD5 |
67c74e72209ced352cae20ddaaa26860
|
|
| BLAKE2b-256 |
5b096a590cc75d056644c0f106d1b897091d582f9fabd046edf7560a5b0c20af
|
Provenance
The following attestation bundles were made for gordon_to_regorus-0.10.1-cp310-abi3-manylinux_2_34_aarch64.whl:
Publisher:
publish-python.yml on gordon-to/gordon-to-regorus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gordon_to_regorus-0.10.1-cp310-abi3-manylinux_2_34_aarch64.whl -
Subject digest:
4467c2c44054df4ec2a521d731b70db8b26025536a8d0930e8a2f033bfd4b071 - Sigstore transparency entry: 1614408438
- Sigstore integration time:
-
Permalink:
gordon-to/gordon-to-regorus@e2239e2899d2586b3cd2f584190c6a612483936d -
Branch / Tag:
refs/heads/publish - Owner: https://github.com/gordon-to
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@e2239e2899d2586b3cd2f584190c6a612483936d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file gordon_to_regorus-0.10.1-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: gordon_to_regorus-0.10.1-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47d0843ae5704e26fd85a96087e088617c2687573efa7395ae3d7f019d5086d6
|
|
| MD5 |
47db337ff334d1a9bb2db0b997a85370
|
|
| BLAKE2b-256 |
3c9c5ed6154bf346b934db1fad148cc047816113a86a0c08747fa2f7d339fad9
|
Provenance
The following attestation bundles were made for gordon_to_regorus-0.10.1-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
publish-python.yml on gordon-to/gordon-to-regorus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gordon_to_regorus-0.10.1-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
47d0843ae5704e26fd85a96087e088617c2687573efa7395ae3d7f019d5086d6 - Sigstore transparency entry: 1614408518
- Sigstore integration time:
-
Permalink:
gordon-to/gordon-to-regorus@e2239e2899d2586b3cd2f584190c6a612483936d -
Branch / Tag:
refs/heads/publish - Owner: https://github.com/gordon-to
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@e2239e2899d2586b3cd2f584190c6a612483936d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file gordon_to_regorus-0.10.1-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: gordon_to_regorus-0.10.1-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9c26d73f67ea9669bdc329eed4a121122623b501de16ef9f65cfd01c1e4b36d
|
|
| MD5 |
844247e243ab2015cf595574c20df8c5
|
|
| BLAKE2b-256 |
e39f490f73b3fe0b6f0eb58809c7cb1235ee151483845165788deab2b7b469fa
|
Provenance
The following attestation bundles were made for gordon_to_regorus-0.10.1-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
publish-python.yml on gordon-to/gordon-to-regorus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gordon_to_regorus-0.10.1-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
e9c26d73f67ea9669bdc329eed4a121122623b501de16ef9f65cfd01c1e4b36d - Sigstore transparency entry: 1614408575
- Sigstore integration time:
-
Permalink:
gordon-to/gordon-to-regorus@e2239e2899d2586b3cd2f584190c6a612483936d -
Branch / Tag:
refs/heads/publish - Owner: https://github.com/gordon-to
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@e2239e2899d2586b3cd2f584190c6a612483936d -
Trigger Event:
workflow_dispatch
-
Statement type: