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

alerts: update rule type and profile definitions #1164

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

rdimitrov
Copy link
Member

The following PR updates the relevant definitions to support alerts:

  • Rule Types - adds alert field and type of alerts (security-advisory)
  • Profiles - adds alert field for configuring alerts per profile, i.e. on, off, dry-run

Fixes #1153

Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
@JAORMX JAORMX requested a review from jhrozek October 11, 2023 05:14
Copy link
Contributor

@jhrozek jhrozek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I like that you wrapped the alert in a message of its own despite having only a single attribute.

message AlertTypeSA {
string severity = 1;
}
optional AlertTypeSA security_advisory = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this patch and not your fault, but I think we should have been using oneof for a lot of these types.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't manage to get json marshal/unmarshal working with oneof. That's the reason we're not using. Feel free to give it another try.

@rdimitrov rdimitrov merged commit 1a377ec into mindersec:main Oct 11, 2023
13 checks passed
@rdimitrov rdimitrov deleted the alert-types branch October 11, 2023 07:03
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.

alerts: update rule and profile type definitions to support configuring alerts
3 participants