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

Improper if Usage seems to miss a valid case #934

Closed
chriskuchin opened this issue Mar 28, 2024 · 1 comment · Fixed by #935
Closed

Improper if Usage seems to miss a valid case #934

chriskuchin opened this issue Mar 28, 2024 · 1 comment · Fixed by #935
Assignees
Labels
bug Something isn't working

Comments

@chriskuchin
Copy link

chriskuchin commented Mar 28, 2024

So this MR made a change it v0.49.0 to flag bad usages of the if keyword.

However I use conftest in my terraform pipelines and rolling to v0.49.0 caused my pipelines to all error with

  • policy_set: regula: conftest: Error: running test: load: loading policies: rule is using 'if' keyword without 'contains' keyword: rule in /opt/policies/regula/rules/tf/aws/security_groups/ingress_11215.rego at line 31

This points to this rule in the regula repository. From my understanding this is not a problem but the regex is failing on this case.

Happy to understand where I misunderstand the problem. I have rolled back to v0.48.0 for now.

FYI @boranx & @jalseth

@jalseth jalseth added the bug Something isn't working label Mar 31, 2024
@jalseth
Copy link
Member

jalseth commented Mar 31, 2024

This appears to be a bug with a bare deny without the [msg] portion which changes the Rego AST representation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants