DisplayCVEChartScript
Display bar chart based on cves count and trending cves count with the different colors.
python · RiskSense
Details
| ID | DisplayCVEChartScript |
|---|---|
| Language | python |
| From Version | 5.0.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
| Tags | RiskSense |
README
Display bar chart based on cves count and trending cves count with the different colors.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Cortex XSOAR Version | 5.0.0 |
Inputs
| Argument Name | Description |
|---|---|
| CvesCount | The number of CVEs. |
| TrendingCvesCount | The number of trending CVEs. |
Outputs
There are no outputs for this script.
from CommonServerPython import * from typing import Any def display_cve_chart() -> dict[str, Any]: cves_count = demisto.args().get("CvesCount", 0) trending_cves_count = demisto.args().get("TrendingCvesCount", 0) entry_result = { "Type": 17, "ContentsFormat": "bar", "Contents": { "stats": [ { "data": [ cves_count, ], "name": "CVEs that have ransomware threat", "label": "CVEs that have ransomware threat", "color": "rgb(0, 0, 255)", }, { "data": [trending_cves_count], "name": "CVEs that are ransomware trending", "label": "CVEs that are ransomware trending", "color": "rgb(255, 0, 0)", }, ], "params": {"layout": "horizontal"}, }, } return entry_result def main() -> None: entry_result = display_cve_chart() demisto.results(entry_result) if __name__ == "__builtin__" or __name__ == "builtins": main()