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
[Netskope Event Collector] Add support for event type selection #32300
[Netskope Event Collector] Add support for event type selection #32300
Conversation
Updated logic to handle fetching specific events
…r-add-event-type-selection
…r-add-event-type-selection
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.
Nice work! See my comments.
def handle_event_types_to_fetch(event_types_to_fetch) -> list[str]: | ||
""" Handle event_types_to_fetch parameter. | ||
Transform the event_types_to_fetch parameter into a pythonic list with lowercase values. | ||
""" | ||
def format_event_type_name(event_name: str) -> str: | ||
return event_name.lower() | ||
|
||
return argToList( | ||
arg=event_types_to_fetch, | ||
transform=format_event_type_name, | ||
) |
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.
While I love functions, we can make this a one liner-
def handle_event_types_to_fetch(event_types_to_fetch) -> list[str]: | |
""" Handle event_types_to_fetch parameter. | |
Transform the event_types_to_fetch parameter into a pythonic list with lowercase values. | |
""" | |
def format_event_type_name(event_name: str) -> str: | |
return event_name.lower() | |
return argToList( | |
arg=event_types_to_fetch, | |
transform=format_event_type_name, | |
) | |
def handle_event_types_to_fetch(event_types_to_fetch) -> list[str]: | |
""" Handle event_types_to_fetch parameter. | |
Transform the event_types_to_fetch parameter into a pythonic list with lowercase values. | |
""" | |
return argToList( | |
arg=event_types_to_fetch, | |
transform=lambda x: x.lower(), | |
) |
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.
fixed.
name: event_types_to_fetch | ||
type: 16 | ||
required: false | ||
additionalinfo: 'Event types to be fetched by this instance. Default is: Application, Alert, Page, Audit, Network.' |
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.
additionalinfo: 'Event types to be fetched by this instance. Default is: Application, Alert, Page, Audit, Network.' | |
additionalinfo: 'Event types to fetch. Default is all available types: Application, Alert, Page, Audit, Network.' |
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.
fixed
Packs/Netskope/Integrations/NetskopeEventCollector/NetskopeEventCollector_test.py
Show resolved
Hide resolved
Packs/Netskope/Integrations/NetskopeEventCollector/NetskopeEventCollector_test.py
Show resolved
Hide resolved
Minor updates to logic and UT
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.
Looks good.
Add nextTrigger key-value pair to lastRun dictionary
…r-add-event-type-selection
docker image; release notes
Contributing to Cortex XSOAR Content
Make sure to register your contribution by filling the contribution registration form
The Pull Request will be reviewed only after the contribution registration form is filled.
Status
Related Issues
fixes: XSUP-32126
Description
Add the
Event Types To Fetch
parameter to support fetching of specific event types.Must have