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

Policy violation notifications based on the violation state #4375

Open
2 tasks done
otbe opened this issue Nov 13, 2024 · 4 comments
Open
2 tasks done

Policy violation notifications based on the violation state #4375

otbe opened this issue Nov 13, 2024 · 4 comments
Labels
enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/M Medium effort

Comments

@otbe
Copy link

otbe commented Nov 13, 2024

Current Behavior

Lets assume we define 2 policies.

Policy 1:
violation state: fail
conditions: severity is CRITICAL

Policy 2:
violation state: warn
conditions: severity is HIGH

If we now setup a notification for policy violations we will receive notifications for both types of violations. My current use case would be something like: if polciy2 is violated just display the violation in the UI , if policy1 is violated send a notification. Currently we recieve notifications either for both policies or for none.

Proposed Behavior

It would be nice to be able to configure a violation state for an alert or if notifications are enabled for one policy at all.

Checklist

@otbe otbe added the enhancement New feature or request label Nov 13, 2024
@nscuro
Copy link
Member

nscuro commented Nov 13, 2024

I think this would be (is?) addressed by #2673. IMO the need to keep state across policies can largely be addressed by giving more flexibility in each condition.

A simpler stop-gap solution could be to allow numerical operators for the severity condition, such that you can have severity = CRITICAL for Policy 1, and severity <= HIGH for Policy 2.

@otbe
Copy link
Author

otbe commented Nov 13, 2024

Im not quite sure if I get your answer, sorry 😅

The way we define the policies right now is sufficient for us, however we want to distinguish by violation state if a notification is sent or not. So in the example above only notifications for policy1 shall be sent but not for policy2.

What did I miss?

@nscuro
Copy link
Member

nscuro commented Nov 15, 2024

Oh sorry I misunderstood what you were asking for.

We could allow filtering on violation state similar to how we do it for notification levels: https://docs.dependencytrack.org/integrations/notifications/#levels

Would that be sufficient?

@otbe
Copy link
Author

otbe commented Nov 15, 2024

Yes I think this would be awesome :)

@nscuro nscuro added p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/M Medium effort labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/M Medium effort
Projects
None yet
Development

No branches or pull requests

2 participants