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

[VirusTotal] Fix error when optional parameter extended_data is not present in command calls #27411

Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 5 additions & 5 deletions Packs/VirusTotal/Integrations/VirusTotalV3/VirusTotalV3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ def ip_command(client: Client, score_calculator: ScoreCalculator, args: dict, re
continue
execution_metrics.success += 1
results.append(
build_ip_output(client, score_calculator, ip, raw_response, argToBoolean(args.get('extended_data'))))
build_ip_output(client, score_calculator, ip, raw_response, argToBoolean(args.get('extended_data', False))))
if len(results) == 0:
result = CommandResults(readable_output='No IPs were found.').to_context()
results.append(result)
Expand All @@ -1713,7 +1713,7 @@ def file_command(client: Client, score_calculator: ScoreCalculator, args: dict,
1 API Call
"""
files = argToList(args['file'])
extended_data = argToBoolean(args.get('extended_data'))
extended_data = argToBoolean(args.get('extended_data', False))
results: List[CommandResults] = list()
execution_metrics = ExecutionMetrics()

Expand Down Expand Up @@ -1789,7 +1789,7 @@ def url_command(client: Client, score_calculator: ScoreCalculator, args: dict, r
1-4 API Calls for premium subscriptions
"""
urls = argToList(args['url'])
extended_data = argToBoolean(args.get('extended_data'))
extended_data = argToBoolean(args.get('extended_data', False))
results: List[CommandResults] = list()
execution_metrics = ExecutionMetrics()
for url in urls:
Expand Down Expand Up @@ -1840,7 +1840,7 @@ def domain_command(client: Client, score_calculator: ScoreCalculator, args: dict
continue
execution_metrics.success += 1
result = build_domain_output(client, score_calculator, domain, raw_response,
argToBoolean(args.get('extended_data')))
argToBoolean(args.get('extended_data', False)))
results.append(result)
if len(results) == 0:
result = CommandResults(readable_output='No domains were found.')
Expand Down Expand Up @@ -2302,7 +2302,7 @@ def search_command(client: Client, args: dict) -> CommandResults:
limit = arg_to_number_must_int(args.get('limit'), 'limit', required=True)
raw_response = client.search(query, limit)
data = raw_response.get('data', [])
if not argToBoolean(args.get('extended_data')):
if not argToBoolean(args.get('extended_data', False)):
data = decrease_data_size(data)
return CommandResults(
f'{INTEGRATION_ENTRY_CONTEXT}.SearchResults',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,7 @@ script:
type: String

runonce: false
dockerimage: demisto/python3:3.10.11.56082
dockerimage: demisto/python3:3.10.12.62631
tests:
- VirusTotalV3-test
- VirusTotal (API v3) Detonate Test
3 changes: 3 additions & 0 deletions Packs/VirusTotal/ReleaseNotes/2_6_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#### Integrations
##### VirusTotal (API v3)
- Fix 'Argument is neither a string nor a boolean' error when extended_data param is not present in command calls.
4 changes: 2 additions & 2 deletions Packs/VirusTotal/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "VirusTotal",
"description": "Analyze suspicious hashes, URLs, domains and IP addresses",
"support": "partner",
"currentVersion": "2.6.2",
"currentVersion": "2.6.3",
"author": "VirusTotal",
"url": "https://www.virustotal.com",
"email": "contact@virustotal.com",
Expand All @@ -18,4 +18,4 @@
"xsoar",
"marketplacev2"
]
}
}