Pex 552/on demand detection triggers#416
Conversation
Code Changes
Test Outcome
|
Code Changes
Test Outcome
|
cmcginley-splunk
left a comment
There was a problem hiding this comment.
Looks great Xiaonan! And the performance improvement is so so exciting; great job
Have a couple of structural changes requested, as well as sompoints for clarification
cmcginley-splunk
left a comment
There was a problem hiding this comment.
Looks great! A few more small tweaks and some points for conversation. @pyth0n1c please weigh in where appropriate :)
| f'search index=risk search_name="{self.name}" [search index=risk search ' | ||
| f'search_name="{self.name}" | tail 1 | fields orig_sid] | tojson' | ||
| ) | ||
| if self.sid is None: |
There was a problem hiding this comment.
For option 2, I was only suggesting that bool field in the case we still wanted to do cleanup pre-test. But I agree with Eric for all the reasons mentioned. I would remove this code path (or throw on self.sid is None) and remove the pre-test cleanup
| f'search index=notable search_name="{self.name}" [search index=notable search ' | ||
| f'search_name="{self.name}" | tail 1 | fields orig_sid] | tojson' | ||
| ) | ||
| if self.sid is None: |
There was a problem hiding this comment.
See my comment above
cmcginley-splunk
left a comment
There was a problem hiding this comment.
Looks great xiaonan :) approved
For integration testing, instead of scheduling a savedsearch to run and waiting a predefined amount of time, use the API to call the search right away. This can be a significant improvement in terms of the amount of time spent waiting for RBA/Notable artifacts to be generated.