Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: support passing inputs and bundles to rego modules #348

Open
ChaosInTheCRD opened this issue Sep 12, 2024 · 0 comments
Open

[Feat]: support passing inputs and bundles to rego modules #348

ChaosInTheCRD opened this issue Sep 12, 2024 · 0 comments
Labels
feature New feature (larger than enhancement)

Comments

@ChaosInTheCRD
Copy link
Collaborator

ChaosInTheCRD commented Sep 12, 2024

Describe the solution you'd like:

Currently witness policies support embedding base64 encoded rego packages to evaluate predicates found in a witness collection for a particular step:

         {
            "type": "https://witness.dev/attestations/command-run/v0.1",
            "regopolicies": [
              {
                "name": "expected command",
                "module": "cGFja2FnZSBjb21tY..."
              }
            ]
          },

What currently isn't possible though, is to provide extra inputs to configure parts of the rego policy to evaluate (or not):

          {
            "type": "https://witness.dev/attestations/command-run/v0.1",
            "regopolicies": [
              {
                "name": "expected command",
                 "inputs": {
                      "expect_sarif": true,
                      "deny_no_fail": true
                 },
                "module": "cGFja2FnZSBjb21tY..."
              }
            ]
          },

Also, rego bundles could be a way of supporting common logic to be written that can be shared across multiple rego packages.

@ChaosInTheCRD ChaosInTheCRD added the feature New feature (larger than enhancement) label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature (larger than enhancement)
Projects
None yet
Development

No branches or pull requests

1 participant