-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] Fixes exception item comment validation on newline chars \n
#202063
[Security Solution] Fixes exception item comment validation on newline chars \n
#202063
Conversation
…bana into fix-exception-comment-regex
👀 |
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
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.
Threat Hunting changes lgtm
/ci |
CI failing due to this test: #203477 |
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.
@dhurley14 Thanks for addressing the comments 🙏
It looks good to go. @xcrzx do you have any objections?
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 👍
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
History
cc @dhurley14 |
This appears to be a change to some SIEM rule type parameters, where the schema is now a little more lenient? Basically, the schema bits In terms of serverless BWC/ZDT, this seems "safe" from an upgrade POV (making this less lenient can be a problem). But roll back? What happens if this updated is deployed for some amount of time, and then we determine we need to roll back to the previous code. I'm guessing they would see the same errors they saw before, which is obviously fine. Thought I'd double-check those assumptions before approving. |
@pmuellr great questions!
Yes we have a better system in place for ensuring strings passed to certain parameters are not empty strings and do not fail validation when newline chars are included. This same regex was used in places where free-text fields were not used, however the team felt it better to replace all of the instances of the regex with this new trim function. Which I suppose could be considered more lenient!
Great question - If these changes are deployed and then subsequently rolled back, we would enter into a similar situation as an upgrade from 8.15 to 8.16 where customers who had previously added newline chars would have errors in the UI, specifically in the exceptions UI. |
Ya, so if you go back to the buggy release, you'll see the bugs. Hard to imagine that's fixable, really, even with an "intermediate" release - or it would not be easy (probably involving some backward-compatible migration). Seems fine to me. thx! |
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.
ResponseOps changes LGTM, based on comments posted.
Starting backport for target branches: 8.16, 8.17, 8.x https://github.com/elastic/kibana/actions/runs/12265712482 |
…e chars `\n` (elastic#202063) ## Summary Fixes: elastic#201820 Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 35aeac1) # Conflicts: # oas_docs/output/kibana.serverless.yaml
…e chars `\n` (elastic#202063) ## Summary Fixes: elastic#201820 Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 35aeac1) # Conflicts: # oas_docs/output/kibana.serverless.yaml # x-pack/plugins/security_solution/common/siem_migrations/model/common.schema.yaml
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…e chars `\n` (elastic#202063) ## Summary Fixes: elastic#201820 Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 35aeac1) # Conflicts: # oas_docs/output/kibana.serverless.yaml # x-pack/plugins/security_solution/common/siem_migrations/model/common.gen.ts # x-pack/plugins/security_solution/common/siem_migrations/model/common.schema.yaml
… newline chars `\n` (#202063) (#203709) # Backport This will backport the following commits from `main` to `8.16`: - [[Security Solution] Fixes exception item comment validation on newline chars `\n` (#202063)](#202063) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Devin W. Hurley","email":"devin.hurley@elastic.co"},"sourceCommit":{"committedDate":"2024-12-10T22:19:32Z","message":"[Security Solution] Fixes exception item comment validation on newline chars `\\n` (#202063)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/201820\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"35aeac104359eae81a233d0b8a9acaa97119d006","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","review","release_note:fix","v9.0.0","Team:Detections and Resp","Feature:Rule Exceptions","backport:version","v8.18.0","v8.16.2","v8.17.1"],"number":202063,"url":"https://github.com/elastic/kibana/pull/202063","mergeCommit":{"message":"[Security Solution] Fixes exception item comment validation on newline chars `\\n` (#202063)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/201820\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"35aeac104359eae81a233d0b8a9acaa97119d006"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202063","number":202063,"mergeCommit":{"message":"[Security Solution] Fixes exception item comment validation on newline chars `\\n` (#202063)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/201820\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"35aeac104359eae81a233d0b8a9acaa97119d006"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…newline chars `\n` (#202063) (#203707) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution] Fixes exception item comment validation on newline chars `\n` (#202063)](#202063) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Devin W. Hurley","email":"devin.hurley@elastic.co"},"sourceCommit":{"committedDate":"2024-12-10T22:19:32Z","message":"[Security Solution] Fixes exception item comment validation on newline chars `\\n` (#202063)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/201820\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"35aeac104359eae81a233d0b8a9acaa97119d006","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","review","release_note:fix","v9.0.0","Team:Detections and Resp","Feature:Rule Exceptions","backport:version","v8.18.0","v8.16.2","v8.17.1"],"number":202063,"url":"https://github.com/elastic/kibana/pull/202063","mergeCommit":{"message":"[Security Solution] Fixes exception item comment validation on newline chars `\\n` (#202063)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/201820\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"35aeac104359eae81a233d0b8a9acaa97119d006"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202063","number":202063,"mergeCommit":{"message":"[Security Solution] Fixes exception item comment validation on newline chars `\\n` (#202063)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/201820\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"35aeac104359eae81a233d0b8a9acaa97119d006"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…e chars `\n` (elastic#202063) ## Summary Fixes: elastic#201820 Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
Fixes: #201820
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breaking
label should be applied in these situations.release_note:*
label is applied per the guidelines