Skip to content

Commit

Permalink
Changed headers for fireeye-nx-get-artifacts-by-alert command (demist…
Browse files Browse the repository at this point in the history
…o#24480)

* Changed headers for fireeye-nx-get-artifacts-by-alert command

* commit

* RN correction

* RN 1.1.10 correction

* comment corrections

* comment correction

* update docker
  • Loading branch information
israelpoli authored and xsoar-bot committed Feb 16, 2023
1 parent eaff6c5 commit 566197f
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 19 deletions.
5 changes: 4 additions & 1 deletion Packs/FireEyeNX/.pack-ignore
Expand Up @@ -71,4 +71,7 @@ ignore=RM104
ignore=BA101

[file:classifier-FireEye_NX.json]
ignore=BA101
ignore=BA101

[known_words]
NX
9 changes: 4 additions & 5 deletions Packs/FireEyeNX/Integrations/FireEyeNX/FireEyeNX.py
Expand Up @@ -220,13 +220,12 @@ def is_supported_context_type(content_type: str):
:param content_type: content type of header.
:return: boolean flag, whether content type is supported or not.
"""
if (
return (
content_type == 'application/pdf'
or content_type == 'text/csv'
or content_type == CONTENT_TYPE_ZIP
):
return True
return False
or content_type == 'application/octet-stream'
)

@staticmethod
def handle_demisto_exception(e):
Expand Down Expand Up @@ -1166,7 +1165,7 @@ def get_artifacts_by_alert_command(

# Preparing header
headers = {
'accept': CONTENT_TYPE_ZIP,
'Content-Type': CONTENT_TYPE_ZIP,
'X-FeApi-Token': client.get_api_token(),
}

Expand Down
2 changes: 1 addition & 1 deletion Packs/FireEyeNX/Integrations/FireEyeNX/FireEyeNX.yml
Expand Up @@ -1254,7 +1254,7 @@ script:
- contextPath: FireEyeNX.Event.IncidentId
description: The incident ID of the event on FireEye.
type: Number
dockerimage: demisto/python3:3.10.8.37753
dockerimage: demisto/python3:3.10.10.47713
feed: false
isfetch: true
longRunning: false
Expand Down
17 changes: 13 additions & 4 deletions Packs/FireEyeNX/Integrations/FireEyeNX/FireEyeNX_test.py
Expand Up @@ -1026,16 +1026,25 @@ def test_is_supported_context_type_failure(client):
"""
When is_supported_context_type() method called invalid argument then should return False.
"""
assert (
client.is_supported_context_type('application/octet-stream') is False
assert not (
client.is_supported_context_type('image/png')
)


def test_is_supported_context_type_success(client):
@pytest.mark.parametrize(
'context_type',
[
CONTENT_TYPE_ZIP,
"text/csv",
"application/pdf",
'application/octet-stream'
]
)
def test_is_supported_context_type_success(client, context_type):
"""
When is_supported_context_type() method called valid argument then should return True.
"""
assert client.is_supported_context_type(CONTENT_TYPE_ZIP) is True
assert client.is_supported_context_type(context_type)


@patch('FireEyeNX.Client.http_request')
Expand Down
7 changes: 0 additions & 7 deletions Packs/FireEyeNX/ReleaseNotes/1_1_10.md
@@ -1,10 +1,3 @@
<<<<<<< HEAD
#### Parsing Rules
##### New: FireEyeNX Parsing Rule
- Added parsing rule for _time extraction (Available from Cortex XSOAR 6.10.0).
=======

#### Modeling Rules
##### FireEye NX Modeling Rule
- Fixed invalid types in schema file.
>>>>>>> master
4 changes: 4 additions & 0 deletions Packs/FireEyeNX/ReleaseNotes/1_1_14.md
@@ -0,0 +1,4 @@
#### Integrations
##### FireEye NX
- Fixed an issue where the ***fireeye-nx-get-artifacts-by-alert*** command did not work.
- Updated the Docker image to: *demisto/python3:3.10.10.47713*.
2 changes: 1 addition & 1 deletion Packs/FireEyeNX/pack_metadata.json
Expand Up @@ -2,7 +2,7 @@
"name": "FireEye Network Security (NX)",
"description": "FireEye Network Security is an effective cyber threat protection solution that helps organizations minimize the risk of costly breaches by accurately detecting and immediately stopping advanced, targeted, and other evasive attacks hiding in Internet traffic.",
"support": "xsoar",
"currentVersion": "1.1.13",
"currentVersion": "1.1.14",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 566197f

Please sign in to comment.