Skip to content

Commit

Permalink
Dra-cvss-color-fix (#29757)
Browse files Browse the repository at this point in the history
* Fixed a small issue when indicator had no custom fields

* RN

* docker bump

* RN

* Update CVECVSSColor.py

* docker bump

* RN
  • Loading branch information
Ni-Knight committed Sep 20, 2023
1 parent 4693823 commit d6496e8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Packs/CommonScripts/ReleaseNotes/1_12_24.md
@@ -0,0 +1,8 @@

#### Scripts

##### cvss_color
- Updated the Docker image to: *demisto/python3:3.10.13.74666*.


- Fixed an issue where the script failed if the indicator had no custom fields.
4 changes: 2 additions & 2 deletions Packs/CommonScripts/Scripts/CVECVSSColor/CVECVSSColor.py
Expand Up @@ -42,8 +42,8 @@ def get_color(cvss: int | float) -> str:


def main():
indicator = demisto.callingContext.get('args', '').get('indicator', '')
cvss = indicator.get('CustomFields', '').get('cvssscore', '')
indicator = demisto.callingContext.get('args', {}).get('indicator', {})
cvss = indicator.get('CustomFields', {}).get('cvssscore', '')
theme = demisto.callingContext.get('context', 'light').get('User', 'light').get('theme', 'light')
cvss = 0 if not cvss else float(cvss)

Expand Down
2 changes: 1 addition & 1 deletion Packs/CommonScripts/Scripts/CVECVSSColor/CVECVSSColor.yml
Expand Up @@ -11,7 +11,7 @@ enabled: true
scripttarget: 0
subtype: python3
runonce: false
dockerimage: demisto/python3:3.10.12.63474
dockerimage: demisto/python3:3.10.13.74666
runas: DBotWeakRole
fromversion: 6.5.0
tests:
Expand Down
2 changes: 1 addition & 1 deletion Packs/CommonScripts/pack_metadata.json
Expand Up @@ -2,7 +2,7 @@
"name": "Common Scripts",
"description": "Frequently used scripts pack.",
"support": "xsoar",
"currentVersion": "1.12.23",
"currentVersion": "1.12.24",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit d6496e8

Please sign in to comment.