-
Notifications
You must be signed in to change notification settings - Fork 515
[integrations][o365] - Added guardrails to various array accessors to prevent out-of-bounds errors and cleaned up some existing code #11329
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
Conversation
…errors and cleaned up some existing code.
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
|
@kcreddy, addressed all the comments |
🚀 Benchmarks reportTo see the full report comment with |
kcreddy
left a comment
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.
There are also few more cases where arrays indices are being used, which could have checks:
content_type_state[0]
.filter(e, e.content_type == content_type)[0]
|
@kcreddy, I noticed that content_type_state already has a size check in place before entering the block, do we need another one here ? |
Don't think there is a check here: https://github.com/elastic/integrations/blob/main/packages/o365/data_stream/audit/agent/stream/cel.yml.hbs#L97 Also I think the issue with SDH is no check on |
|
@kcreddy, I've added further checks as suggested |
|
@efd6, addressed all PR suggestions |
|
@efd6, I've removed the extra spaces, if all looks good atm, could you approve ? |
efd6
left a comment
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.
Some time soon, this should be refactored to remove the embedded handlebars templating that's in the CEL code and then be properly formatted.
💚 Build Succeeded
History
cc @ShourieG |
|
|
Package o365 - 2.6.3 containing this change is available at https://epr.elastic.co/search?package=o365 |
… prevent out-of-bounds errors and cleaned up some existing code (elastic#11329) * Added guardrails to various array accessors to prevent out-of-bounds errors and cleaned up some existing code. * updated changelog * updated with PR suggestions * added further array checks as suggested * addressed PR suggestions * removed additional spaces * removed additional spaces
… prevent out-of-bounds errors and cleaned up some existing code (elastic#11329) * Added guardrails to various array accessors to prevent out-of-bounds errors and cleaned up some existing code. * updated changelog * updated with PR suggestions * added further array checks as suggested * addressed PR suggestions * removed additional spaces * removed additional spaces




Type of change
Please label this PR with one of the following labels, depending on the scope of your change:
Proposed commit message
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots