Skip to content
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

[Microsoft Defender for Endpoint]: Fix bug be able to use different operators in filter #30481

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2918,6 +2918,7 @@ def get_machine_action_by_id_command(client: MsClient, args: dict):
machine_id = remove_duplicates_from_list_arg(args, 'machine_id')
type = args.get('type', '')
requestor = args.get('requestor', '')
filters = args.get('filters', '')
limit = arg_to_number(args.get('limit', 50))
if action_id:
for index in range(3):
Expand All @@ -2943,7 +2944,7 @@ def get_machine_action_by_id_command(client: MsClient, args: dict):
'type': type,
'requestor': requestor
}
filter_req = reformat_filter_with_list_arg(fields_to_filter_by, "machineId")
filter_req = filters if filters else reformat_filter_with_list_arg(fields_to_filter_by, "machineId")
MosheEichler marked this conversation as resolved.
Show resolved Hide resolved
response = client.get_machine_actions(filter_req, limit)
machine_actions_list = []
for machine_action in response['value']:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,8 @@ script:
- deprecated: true
description: Flag for the rate limit retry.
name: ran_once_flag
- name: filters
description: String representation of filters.
MosheEichler marked this conversation as resolved.
Show resolved Hide resolved
description: |-
Return the machine's actions. If you set an action ID, it returns the info on the specific action.
Filtering can be done only on one argument.
Expand Down Expand Up @@ -1495,7 +1497,7 @@ script:
name: machine_id
required: true
- description: |-
The file SHA1 hash to stop and quarantine on the machine.
The file SHA1 hash to stop and quarantine on the machine.
When providing multiple values, each value is checked for the same machine_id.
isArray: true
name: file_hash
Expand Down Expand Up @@ -5532,7 +5534,7 @@ script:
execution: false
name: microsoft-atp-auth-reset
arguments: []
dockerimage: demisto/crypto:1.0.0.79207
dockerimage: demisto/crypto:1.0.0.79610
isfetch: true
runonce: false
script: '-'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,7 @@ Machine.ReadWrite.All
| type | The machine action type. Possible values are: RunAntiVirusScan, Offboard, CollectInvestigationPackage, Isolate, Unisolate, StopAndQuarantineFile, RestrictCodeExecution, UnrestrictCodeExecution. | Optional |
| requestor | The ID of the user that executed the action, only one can be added. | Optional |
| limit | The maximum number of machines to return. Default is 50. | Optional |
| filters | String representation of filters (Override every other filters). | Optional |

#### Context Output

Expand Down Expand Up @@ -7172,4 +7173,4 @@ There are no input arguments for this command.

#### Context Output

There is no context output for this command.
There is no context output for this command.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#### Integrations
##### Microsoft Defender for Endpoint
- Added *filters* argument for the command `microsoft-atp-list-machine-actions-details`.
MosheEichler marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Microsoft Defender for Endpoint",
"description": "Microsoft Defender for Endpoint (previously Microsoft Defender Advanced Threat Protection (ATP)) is a unified platform for preventative protection, post-breach detection, automated investigation, and response.",
"support": "xsoar",
"currentVersion": "1.16.15",
"currentVersion": "1.16.16",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down Expand Up @@ -66,4 +66,4 @@
"CommonPlaybooks",
"CommonTypes"
]
}
}