Skip to content

Commit a8db23b

Browse files
content-botjohnnywilkesjulieschwartz18
authored
[CortexXpanse] XSUP-53412 (#40635) (#40650)
* fix bug * RN * fmt * Apply suggestions from code review --------- Co-authored-by: johnnywilkes <[email protected]> Co-authored-by: julieschwartz18 <[email protected]>
1 parent fdfce12 commit a8db23b

File tree

4 files changed

+19
-10
lines changed

4 files changed

+19
-10
lines changed

Packs/CortexXpanse/Integrations/FeedXpanse/FeedXpanse.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,15 @@ def fetch_indicators(client: Client, limit: Optional[int] = None, asset_type: li
245245
List: raw response from API.
246246
"""
247247
asset_list, asset_response = [], []
248-
if "Domain" in asset_type:
249-
asset_list.append("DOMAIN")
250-
if "Certificate" in asset_type:
251-
asset_list.append("CERTIFICATE")
252-
if "IP" in asset_type:
253-
asset_list.append("UNASSOCIATED_RESPONSIVE_IP")
248+
if asset_type == []:
249+
asset_list = ["DOMAIN", "CERTIFICATE", "UNASSOCIATED_RESPONSIVE_IP"]
250+
else:
251+
if "Domain" in asset_type:
252+
asset_list.append("DOMAIN")
253+
if "Certificate" in asset_type:
254+
asset_list.append("CERTIFICATE")
255+
if "IP" in asset_type:
256+
asset_list.append("UNASSOCIATED_RESPONSIVE_IP")
254257
if limit:
255258
# Had to add 1 to the limit to get the right return.
256259
asset_response = client.list_asset_internet_exposure_request(
@@ -326,7 +329,7 @@ def main() -> None: # pragma: no cover
326329
# Append default tags.
327330
feed_tags = list(set(argToList(params.get("feedTags", []))) | DEFAULT_FEED_TAGS)
328331
tlp_color = params.get("tlp_color", "")
329-
indicator_types = params.get("indicatorTypes")
332+
indicator_types = params.get("indicatorTypes", [])
330333
creds = params.get("credentials", {})
331334
api = creds.get("password", "")
332335
add_sensitive_log_strs(api)

Packs/CortexXpanse/Integrations/FeedXpanse/FeedXpanse.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ configuration:
119119
- display: Indicator types to fetch
120120
name: indicatorTypes
121121
type: 16
122-
required: true
122+
required: false
123123
options:
124124
- IP
125125
- Domain
126126
- Certificate
127-
additionalinfo: 'Indicator types to fetch.'
127+
additionalinfo: 'Indicator types to fetch. Default is to fetch all.'
128128
section: Collect
129129
description: Use this feed to retrieve the discovered IPs/domains/certificates from the Cortex Xpanse asset database.
130130
display: 'Xpanse Feed'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
#### Integrations
3+
4+
##### Xpanse Feed
5+
6+
Updated the **Xpanse Feed** integration *indicatorTypes* parameter to be optional.

Packs/CortexXpanse/pack_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Cortex Xpanse",
33
"description": "Content for working with Attack Surface Management (ASM).",
44
"support": "xsoar",
5-
"currentVersion": "1.2.10",
5+
"currentVersion": "1.2.11",
66
"author": "Cortex XSOAR",
77
"url": "https://www.paloaltonetworks.com/cortex",
88
"email": "",

0 commit comments

Comments
 (0)