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

rego: Add option to skip for deny-by-default evaluator #903

Merged
merged 1 commit into from
Sep 8, 2023
Merged

Conversation

JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Sep 8, 2023

There are cases where a policy is not applicable for an entity. e.g. We shouldn't check for npm dependencies on a golang repository.

This PR allows us to skip a rule evaluation in the rego engine if we mark a skip expression in the rego policy.

An example was added to the dependabot rule. We may skip the rule if a certain dependency file doesn't exist.

The rule was renamed to dependabot_configured to reflect the name, and the policy may now take paramters that
define the package ecosystem, interval schedule, and finally the file that should exist for the rule to apply.

There are cases where a policy is not applicable for an entity. e.g. We shouldn't check for npm dependencies on a golang repository.

This PR allows us to skip a rule evaluation in the rego engine if we mark a `skip` expression in the rego policy.

An example was added to the dependabot rule. We may skip the rule if a certain dependency file doesn't exist.

The rule was renamed to `dependabot_configured` to reflect the name, and the policy may now take paramters that
define the package ecosystem, interval schedule, and finally the file that should exist for the rule to apply.
@lukehinds lukehinds merged commit 11f2fca into main Sep 8, 2023
12 checks passed
@lukehinds lukehinds deleted the rego-skip branch September 8, 2023 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants