-
Notifications
You must be signed in to change notification settings - Fork 55
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
[SOAR-18543] Palo Alto Cortex XDR #3040
Conversation
82083d8
to
6c7ef56
Compare
plugins/palo_alto_cortex_xdr/unit_test/expected/monitor_alerts_full_page_state.json.exp
Outdated
Show resolved
Hide resolved
dafd15d
to
d275283
Compare
d275283
to
a26e0fa
Compare
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/tasks/monitor_alerts/task.py
Outdated
Show resolved
Hide resolved
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/tasks/monitor_alerts/task.py
Outdated
Show resolved
Hide resolved
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/tasks/monitor_alerts/task.py
Outdated
Show resolved
Hide resolved
a26e0fa
to
0524e64
Compare
ad96ae3
to
cbd1a06
Compare
cbd1a06
to
8c4a548
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.
It's such a big update so sorry if some of the questions aren't needed! just want to make sure I'm following everything and we're not using resources/time when we don't need to be
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/tasks/monitor_alerts/task.py
Outdated
Show resolved
Hide resolved
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/tasks/monitor_alerts/task.py
Outdated
Show resolved
Hide resolved
max_lookback_unix = self.convert_datetime_to_unix(max_lookback_date_time) | ||
if start_time < max_lookback_unix: | ||
self.logger.info( | ||
f"Start time of {self.convert_unix_to_datetime(start_time)} exceeds cutoff of {max_lookback_date_time}" |
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.
we seem to be doing a lot of converting back and forward. would it be easier to follow keeping this as a datetime obj up until we then decide what start_time we want to keep? and then one conversion of datetime_obj -> unix?
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.
Yes! I've cut down some but there is more I can do. I've moved some of the conversion around. Unfortunately we do still need to use some of it as we use unix in queries.
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 - definitely is a much more readable now!
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/tasks/monitor_alerts/task.py
Outdated
Show resolved
Hide resolved
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/tasks/monitor_alerts/task.py
Show resolved
Hide resolved
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/tasks/monitor_alerts/task.py
Show resolved
Hide resolved
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/tasks/monitor_alerts/task.py
Show resolved
Hide resolved
0204a05
to
e268e95
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 - just one minor around the typing has now changing
plugins/palo_alto_cortex_xdr/icon_palo_alto_cortex_xdr/tasks/monitor_alerts/task.py
Outdated
Show resolved
Hide resolved
…hange how custom config is named in line with other plugins | Update SDK | Update error handling to return response data in data field
e268e95
to
5c334e1
Compare
Proposed Changes
Description
Describe the proposed changes:
PR Requirements
Developers, verify you have completed the following items by checking them off:
Testing
Unit Tests
Review our documentation on generating and writing plugin unit tests
In-Product Tests
If you are an InsightConnect customer or have access to an InsightConnect instance, the following in-product tests should be done:
Style
Review the style guide
USER nobody
in theDockerfile
when possiblerapid7/insightconnect-python-3-38-slim-plugin:{sdk-version-num}
andrapid7/insightconnect-python-3-38-plugin:{sdk-version-num}
insight-plugin validate
which callsicon_validate
to linthelp.md
Functional Checklist
tests/
directory created withinsight-plugin samples
tests/$action_bad.json
insight-plugin run -T tests/example.json --debug --jq
insight-plugin run -T all --debug --jq
(use PR format at end)insight-plugin run -R tests/example.json --debug --jq
insight-plugin run --debug --jq
(use PR format at end)Assessment
You must validate your work to reviewers:
insight-plugin validate
and make sure everything passesinsight-plugin run -A
. For single action validation:insight-plugin run tests/{file}.json -A
insight-plugin ... | pbcopy
) and paste the output in a new post on this PR