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: trivy should not fail if one rego policy fails #4183

Closed
simar7 opened this issue May 5, 2023 · 2 comments · Fixed by aquasecurity/defsec#1317 or #4474
Closed

feat: trivy should not fail if one rego policy fails #4183

simar7 opened this issue May 5, 2023 · 2 comments · Fixed by aquasecurity/defsec#1317 or #4474
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. scan/misconfiguration Issues relating to misconfiguration scanning

Comments

@simar7
Copy link
Member

simar7 commented May 5, 2023

Today trivy fails out on a scan even if one policy has an issue. An example of this is here: #4124

We should handle this more gracefully, for instance show an error to the user about the failing policy and continue with scanning the rest of the policies.

@simar7 simar7 added the kind/feature Categorizes issue or PR as related to a new feature. label May 5, 2023
@knqyf263 knqyf263 added priority/backlog Higher priority than priority/awaiting-more-evidence. scan/misconfiguration Issues relating to misconfiguration scanning labels May 7, 2023
@simar7
Copy link
Member Author

simar7 commented May 9, 2023

Related discussion as this pertains more to the behaviour OPA has when a rego policy fails during compile phase - https://github.com/orgs/open-policy-agent/discussions/417

simar7 added a commit to aquasecurity/defsec that referenced this issue May 9, 2023
@simar7 simar7 self-assigned this May 9, 2023
simar7 added a commit to aquasecurity/defsec that referenced this issue May 16, 2023
simar7 added a commit to aquasecurity/defsec that referenced this issue May 19, 2023
* feat(rego): Retry if some policies are broken

Fixes: aquasecurity/trivy#4183

Signed-off-by: Simar <[email protected]>

* update all interfaces and fix tests

Signed-off-by: Simar <[email protected]>

* beef up tests

Signed-off-by: Simar <[email protected]>

---------

Signed-off-by: Simar <[email protected]>
@simar7
Copy link
Member Author

simar7 commented May 19, 2023

Will be included in the next defsec dependency update for Trivy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. scan/misconfiguration Issues relating to misconfiguration scanning
Projects
Status: No status
2 participants