-
Notifications
You must be signed in to change notification settings - Fork 73
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
Allow security_rule objects to have rule IDs different from the object IDs #463
Conversation
0cc0050
to
e46da14
Compare
🌐 Coverage report
|
code/go/internal/validator/semantic/validate_kibana_matching_object_ids.go
Outdated
Show resolved
Hide resolved
e46da14
to
60354cb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a note about avoiding possible panics in some type assertions.
code/go/internal/validator/semantic/validate_kibana_matching_object_ids.go
Outdated
Show resolved
Hide resolved
60354cb
to
0c9b8f7
Compare
0c9b8f7
to
886dc69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
LGTM! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for adding in the .HasPrefix()
check @xcrzx 🙂
@mrodm It seems like this PR has all the required approves. How could I merge it? The merge button is inactive, saying, |
What does this PR do?
Change validation check that enforces saved object ID to match
rule_id
for security solution prebuilt detection rules. Allow saved object IDs to have arbitrary suffixes.Why is it important?
Security Solution migrates the detection rules package from storing a single saved object per rule to multiple saved objects. See elastic/kibana#137420 for more context regarding the change.
The package will contain rule saved objects with rule id and version in the name (
security_rule/[ruleId]_[ruleVersion].json
) with the following content:So the saved object ID and the rule ID do not match anymore, making this validation check always return an error.
Checklist
test/packages
that prove my change is effective.spec/changelog.yml
.Related issues