regscale-cli 6.16.0.0__py3-none-any.whl → 6.16.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of regscale-cli might be problematic. Click here for more details.
- regscale/__init__.py +1 -1
- regscale/core/app/application.py +1 -0
- regscale/core/app/internal/login.py +1 -1
- regscale/core/app/internal/poam_editor.py +1 -1
- regscale/core/app/utils/app_utils.py +1 -1
- regscale/core/app/utils/parser_utils.py +2 -2
- regscale/integrations/commercial/__init__.py +2 -2
- regscale/integrations/commercial/ad.py +1 -1
- regscale/integrations/commercial/azure/intune.py +1 -0
- regscale/integrations/commercial/grype/__init__.py +3 -0
- regscale/integrations/commercial/grype/commands.py +72 -0
- regscale/integrations/commercial/grype/scanner.py +390 -0
- regscale/integrations/commercial/import_all/import_all_cmd.py +2 -2
- regscale/integrations/commercial/nessus/scanner.py +3 -0
- regscale/integrations/commercial/opentext/__init__.py +6 -0
- regscale/integrations/commercial/opentext/commands.py +77 -0
- regscale/integrations/commercial/opentext/scanner.py +449 -85
- regscale/integrations/commercial/sap/sysdig/sysdig_scanner.py +4 -0
- regscale/integrations/commercial/sap/tenable/click.py +1 -1
- regscale/integrations/commercial/sap/tenable/scanner.py +8 -2
- regscale/integrations/commercial/tenablev2/click.py +39 -16
- regscale/integrations/commercial/trivy/__init__.py +5 -0
- regscale/integrations/commercial/trivy/commands.py +74 -0
- regscale/integrations/commercial/trivy/scanner.py +276 -0
- regscale/integrations/commercial/wizv2/click.py +9 -21
- regscale/integrations/commercial/wizv2/scanner.py +2 -1
- regscale/integrations/commercial/wizv2/utils.py +146 -70
- regscale/integrations/jsonl_scanner_integration.py +869 -0
- regscale/integrations/public/fedramp/fedramp_common.py +4 -4
- regscale/integrations/public/fedramp/import_workbook.py +1 -1
- regscale/integrations/public/fedramp/inventory_items.py +3 -3
- regscale/integrations/public/fedramp/poam/scanner.py +51 -44
- regscale/integrations/public/fedramp/ssp_logger.py +6 -6
- regscale/integrations/scanner_integration.py +268 -64
- regscale/models/app_models/mapping.py +3 -3
- regscale/models/integration_models/amazon_models/inspector.py +15 -17
- regscale/models/integration_models/aqua.py +1 -5
- regscale/models/integration_models/cisa_kev_data.json +100 -10
- regscale/models/integration_models/ecr_models/ecr.py +2 -6
- regscale/models/integration_models/{flat_file_importer.py → flat_file_importer/__init__.py} +7 -4
- regscale/models/integration_models/grype_import.py +3 -3
- regscale/models/integration_models/prisma.py +3 -3
- regscale/models/integration_models/synqly_models/capabilities.json +1 -1
- regscale/models/integration_models/synqly_models/connectors/assets.py +1 -0
- regscale/models/integration_models/synqly_models/connectors/vulnerabilities.py +2 -0
- regscale/models/integration_models/tenable_models/integration.py +46 -10
- regscale/models/integration_models/trivy_import.py +1 -1
- regscale/models/integration_models/xray.py +1 -1
- regscale/models/regscale_models/__init__.py +2 -0
- regscale/models/regscale_models/control_implementation.py +18 -44
- regscale/models/regscale_models/inherited_control.py +61 -0
- regscale/models/regscale_models/issue.py +3 -2
- regscale/models/regscale_models/mixins/parent_cache.py +1 -1
- regscale/models/regscale_models/regscale_model.py +73 -7
- regscale/models/regscale_models/vulnerability.py +61 -8
- {regscale_cli-6.16.0.0.dist-info → regscale_cli-6.16.2.0.dist-info}/METADATA +3 -3
- {regscale_cli-6.16.0.0.dist-info → regscale_cli-6.16.2.0.dist-info}/RECORD +62 -56
- tests/regscale/core/test_logz.py +8 -0
- regscale/integrations/commercial/grype.py +0 -165
- regscale/integrations/commercial/opentext/click.py +0 -99
- regscale/integrations/commercial/trivy.py +0 -162
- {regscale_cli-6.16.0.0.dist-info → regscale_cli-6.16.2.0.dist-info}/LICENSE +0 -0
- {regscale_cli-6.16.0.0.dist-info → regscale_cli-6.16.2.0.dist-info}/WHEEL +0 -0
- {regscale_cli-6.16.0.0.dist-info → regscale_cli-6.16.2.0.dist-info}/entry_points.txt +0 -0
- {regscale_cli-6.16.0.0.dist-info → regscale_cli-6.16.2.0.dist-info}/top_level.txt +0 -0
|
@@ -1,9 +1,99 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "CISA Catalog of Known Exploited Vulnerabilities",
|
|
3
|
-
"catalogVersion": "2025.03.
|
|
4
|
-
"dateReleased": "2025-03-
|
|
5
|
-
"count":
|
|
3
|
+
"catalogVersion": "2025.03.24",
|
|
4
|
+
"dateReleased": "2025-03-24T18:01:34.066Z",
|
|
5
|
+
"count": 1308,
|
|
6
6
|
"vulnerabilities": [
|
|
7
|
+
{
|
|
8
|
+
"cveID": "CVE-2025-30154",
|
|
9
|
+
"vendorProject": "reviewdog",
|
|
10
|
+
"product": "action-setup GitHub Action",
|
|
11
|
+
"vulnerabilityName": "reviewdog\/action-setup GitHub Action Embedded Malicious Code Vulnerability",
|
|
12
|
+
"dateAdded": "2025-03-24",
|
|
13
|
+
"shortDescription": "reviewdog action-setup GitHub Action contains an embedded malicious code vulnerability that dumps exposed secrets to Github Actions Workflow Logs.",
|
|
14
|
+
"requiredAction": "Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.",
|
|
15
|
+
"dueDate": "2025-04-14",
|
|
16
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
17
|
+
"notes": "This vulnerability affects a common open-source project, third-party library, or a protocol used by different products. For more information, please see: https:\/\/github.com\/reviewdog\/reviewdog\/security\/advisories\/GHSA-qmg3-hpqr-gqvc ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-30154",
|
|
18
|
+
"cwes": [
|
|
19
|
+
"CWE-506"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"cveID": "CVE-2017-12637",
|
|
24
|
+
"vendorProject": "SAP",
|
|
25
|
+
"product": "NetWeaver",
|
|
26
|
+
"vulnerabilityName": "SAP NetWeaver Directory Traversal Vulnerability",
|
|
27
|
+
"dateAdded": "2025-03-19",
|
|
28
|
+
"shortDescription": "SAP NetWeaver Application Server (AS) Java contains a directory traversal vulnerability in scheduler\/ui\/js\/ffffffffbca41eb4\/UIUtilJavaScriptJS that allows a remote attacker to read arbitrary files via a .. (dot dot) in the query string.",
|
|
29
|
+
"requiredAction": "Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.",
|
|
30
|
+
"dueDate": "2025-04-09",
|
|
31
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
32
|
+
"notes": "SAP users must have an account to log in and access the patch: https:\/\/me.sap.com\/notes\/3476549 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2017-12637",
|
|
33
|
+
"cwes": [
|
|
34
|
+
"CWE-22"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"cveID": "CVE-2024-48248",
|
|
39
|
+
"vendorProject": "NAKIVO",
|
|
40
|
+
"product": "Backup and Replication",
|
|
41
|
+
"vulnerabilityName": "NAKIVO Backup and Replication Absolute Path Traversal Vulnerability",
|
|
42
|
+
"dateAdded": "2025-03-19",
|
|
43
|
+
"shortDescription": "NAKIVO Backup and Replication contains an absolute path traversal vulnerability that enables an attacker to read arbitrary files.",
|
|
44
|
+
"requiredAction": "Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.",
|
|
45
|
+
"dueDate": "2025-04-09",
|
|
46
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
47
|
+
"notes": "https:\/\/helpcenter.nakivo.com\/Release-Notes\/Content\/Release-Notes.htm ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-48248",
|
|
48
|
+
"cwes": [
|
|
49
|
+
"CWE-36"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"cveID": "CVE-2025-1316",
|
|
54
|
+
"vendorProject": "Edimax",
|
|
55
|
+
"product": "IC-7100 IP Camera",
|
|
56
|
+
"vulnerabilityName": "Edimax IC-7100 IP Camera OS Command Injection Vulnerability",
|
|
57
|
+
"dateAdded": "2025-03-19",
|
|
58
|
+
"shortDescription": "Edimax IC-7100 IP camera contains an OS command injection vulnerability due to improper input sanitization that allows an attacker to achieve remote code execution via specially crafted requests. The impacted product could be end-of-life (EoL) and\/or end-of-service (EoS). Users should discontinue product utilization.",
|
|
59
|
+
"requiredAction": "Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.",
|
|
60
|
+
"dueDate": "2025-04-09",
|
|
61
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
62
|
+
"notes": "https:\/\/www.edimax.com\/edimax\/post\/post\/data\/edimax\/global\/press_releases\/4801\/ ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-1316",
|
|
63
|
+
"cwes": [
|
|
64
|
+
"CWE-78"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"cveID": "CVE-2025-30066",
|
|
69
|
+
"vendorProject": "tj-actions",
|
|
70
|
+
"product": "changed-files GitHub Action",
|
|
71
|
+
"vulnerabilityName": "tj-actions\/changed-files GitHub Action Embedded Malicious Code Vulnerability",
|
|
72
|
+
"dateAdded": "2025-03-18",
|
|
73
|
+
"shortDescription": "tj-actions\/changed-files GitHub Action contains an embedded malicious code vulnerability that allows a remote attacker to discover secrets by reading Github Actions Workflow Logs. These secrets may include, but are not limited to, valid AWS access keys, GitHub personal access tokens (PATs), npm tokens, and private RSA keys.",
|
|
74
|
+
"requiredAction": "Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.",
|
|
75
|
+
"dueDate": "2025-04-08",
|
|
76
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
77
|
+
"notes": "This vulnerability affects a common open-source project, third-party library, or a protocol used by different products. For more information, please see: https:\/\/github.com\/tj-actions\/changed-files\/blob\/45fb12d7a8bedb4da42342e52fe054c6c2c3fd73\/README.md?plain=1#L20-L28 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-30066",
|
|
78
|
+
"cwes": [
|
|
79
|
+
"CWE-506"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"cveID": "CVE-2025-24472",
|
|
84
|
+
"vendorProject": "Fortinet",
|
|
85
|
+
"product": "FortiOS and FortiProxy",
|
|
86
|
+
"vulnerabilityName": "Fortinet FortiOS and FortiProxy Authentication Bypass Vulnerability",
|
|
87
|
+
"dateAdded": "2025-03-18",
|
|
88
|
+
"shortDescription": " Fortinet FortiOS and FortiProxy contain an authentication bypass vulnerability that allows a remote attacker to gain super-admin privileges via crafted CSF proxy requests.",
|
|
89
|
+
"requiredAction": "Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.",
|
|
90
|
+
"dueDate": "2025-04-08",
|
|
91
|
+
"knownRansomwareCampaignUse": "Known",
|
|
92
|
+
"notes": "https:\/\/fortiguard.fortinet.com\/psirt\/FG-IR-24-535 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-24472",
|
|
93
|
+
"cwes": [
|
|
94
|
+
"CWE-288"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
7
97
|
{
|
|
8
98
|
"cveID": "CVE-2025-21590",
|
|
9
99
|
"vendorProject": "Juniper",
|
|
@@ -733,7 +823,7 @@
|
|
|
733
823
|
"requiredAction": "Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.",
|
|
734
824
|
"dueDate": "2025-02-25",
|
|
735
825
|
"knownRansomwareCampaignUse": "Unknown",
|
|
736
|
-
"notes": "https:\/\/ofbiz.apache.org\/security.html ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-45195",
|
|
826
|
+
"notes": "This vulnerability affects a common open-source component, third-party library, or a protocol used by different products. For more information, please see: https:\/\/ofbiz.apache.org\/security.html ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-45195",
|
|
737
827
|
"cwes": [
|
|
738
828
|
"CWE-425"
|
|
739
829
|
]
|
|
@@ -852,7 +942,7 @@
|
|
|
852
942
|
"shortDescription": "Fortinet FortiOS and FortiProxy contain an authentication bypass vulnerability that may allow an unauthenticated, remote attacker to gain super-admin privileges via crafted requests to Node.js websocket module.",
|
|
853
943
|
"requiredAction": "Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.",
|
|
854
944
|
"dueDate": "2025-01-21",
|
|
855
|
-
"knownRansomwareCampaignUse": "
|
|
945
|
+
"knownRansomwareCampaignUse": "Known",
|
|
856
946
|
"notes": "https:\/\/fortiguard.fortinet.com\/psirt\/FG-IR-24-535 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-55591",
|
|
857
947
|
"cwes": [
|
|
858
948
|
"CWE-288"
|
|
@@ -867,7 +957,7 @@
|
|
|
867
957
|
"shortDescription": "Qlik Sense contains an HTTP tunneling vulnerability that allows an attacker to escalate privileges and execute HTTP requests on the backend server hosting the software.",
|
|
868
958
|
"requiredAction": "Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.",
|
|
869
959
|
"dueDate": "2025-02-03",
|
|
870
|
-
"knownRansomwareCampaignUse": "
|
|
960
|
+
"knownRansomwareCampaignUse": "Known",
|
|
871
961
|
"notes": "https:\/\/community.qlik.com\/t5\/Official-Support-Articles\/Critical-Security-fixes-for-Qlik-Sense-Enterprise-for-Windows\/tac-p\/2120510 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2023-48365",
|
|
872
962
|
"cwes": [
|
|
873
963
|
"CWE-444"
|
|
@@ -2454,7 +2544,7 @@
|
|
|
2454
2544
|
{
|
|
2455
2545
|
"cveID": "CVE-2024-5217",
|
|
2456
2546
|
"vendorProject": "ServiceNow",
|
|
2457
|
-
"product": "Utah, Vancouver, and Washington DC Now",
|
|
2547
|
+
"product": "Utah, Vancouver, and Washington DC Now Platform",
|
|
2458
2548
|
"vulnerabilityName": "ServiceNow Incomplete List of Disallowed Inputs Vulnerability",
|
|
2459
2549
|
"dateAdded": "2024-07-29",
|
|
2460
2550
|
"shortDescription": "ServiceNow Washington DC, Vancouver, and earlier Now Platform releases contain an incomplete list of disallowed inputs vulnerability in the GlideExpression script. An unauthenticated user could exploit this vulnerability to execute code remotely.",
|
|
@@ -2469,10 +2559,10 @@
|
|
|
2469
2559
|
{
|
|
2470
2560
|
"cveID": "CVE-2024-4879",
|
|
2471
2561
|
"vendorProject": "ServiceNow",
|
|
2472
|
-
"product": "Utah, Vancouver, and Washington DC Now",
|
|
2562
|
+
"product": "Utah, Vancouver, and Washington DC Now Platform",
|
|
2473
2563
|
"vulnerabilityName": "ServiceNow Improper Input Validation Vulnerability",
|
|
2474
2564
|
"dateAdded": "2024-07-29",
|
|
2475
|
-
"shortDescription": "ServiceNow Utah, Vancouver, and Washington DC Now releases contain a jelly template injection vulnerability in UI macros. An unauthenticated user could exploit this vulnerability to execute code remotely. ",
|
|
2565
|
+
"shortDescription": "ServiceNow Utah, Vancouver, and Washington DC Now Platform releases contain a jelly template injection vulnerability in UI macros. An unauthenticated user could exploit this vulnerability to execute code remotely. ",
|
|
2476
2566
|
"requiredAction": "Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.",
|
|
2477
2567
|
"dueDate": "2024-08-19",
|
|
2478
2568
|
"knownRansomwareCampaignUse": "Unknown",
|
|
@@ -6309,7 +6399,7 @@
|
|
|
6309
6399
|
"shortDescription": "Microsoft Windows Common Log File System (CLFS) driver contains an unspecified vulnerability that allows for privilege escalation.",
|
|
6310
6400
|
"requiredAction": "Apply updates per vendor instructions.",
|
|
6311
6401
|
"dueDate": "2023-03-07",
|
|
6312
|
-
"knownRansomwareCampaignUse": "
|
|
6402
|
+
"knownRansomwareCampaignUse": "Known",
|
|
6313
6403
|
"notes": "https:\/\/msrc.microsoft.com\/update-guide\/en-US\/vulnerability\/CVE-2023-23376; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2023-23376",
|
|
6314
6404
|
"cwes": [
|
|
6315
6405
|
"CWE-122"
|
|
@@ -89,9 +89,7 @@ class ECR(FlatFileImporter):
|
|
|
89
89
|
:rtype: Asset
|
|
90
90
|
"""
|
|
91
91
|
name = self.mapping.get_value(dat, "Name") or self.mapping.get_value(dat, "name")
|
|
92
|
-
if repository_name := self.mapping.get_value(
|
|
93
|
-
dat, "repositoryName", self.raw_dict.get("repositoryName", ""), warnings=False
|
|
94
|
-
):
|
|
92
|
+
if repository_name := self.mapping.get_value(dat, "repositoryName", self.raw_dict.get("repositoryName", "")):
|
|
95
93
|
if (image_id_data := self.raw_dict.get("imageId", {}).get("imageDigest", "").split(":")) and len(
|
|
96
94
|
image_id_data
|
|
97
95
|
) > 1:
|
|
@@ -134,9 +132,7 @@ class ECR(FlatFileImporter):
|
|
|
134
132
|
"""
|
|
135
133
|
vulns: List[Vulnerability] = []
|
|
136
134
|
hostname = dat.get("Name") or dat.get("name")
|
|
137
|
-
if repository_name := self.mapping.get_value(
|
|
138
|
-
dat, "repositoryName", self.raw_dict.get("repositoryName", ""), warnings=False
|
|
139
|
-
):
|
|
135
|
+
if repository_name := self.mapping.get_value(dat, "repositoryName", self.raw_dict.get("repositoryName", "")):
|
|
140
136
|
image_id_data = self.raw_dict.get("imageId", {}).get("imageDigest", "").split(":")
|
|
141
137
|
if len(image_id_data) > 1:
|
|
142
138
|
image_id = image_id_data[1]
|
|
@@ -192,7 +192,7 @@ class FlatFileImporter(ABC):
|
|
|
192
192
|
finding_severity_map=self.finding_severity_map,
|
|
193
193
|
)
|
|
194
194
|
flat_int.asset_identifier_field = self.asset_identifier_field
|
|
195
|
-
logger.
|
|
195
|
+
logger.debug(f"Asset Identifier Field: {flat_int.asset_identifier_field}")
|
|
196
196
|
flat_int.title = self.attributes.name
|
|
197
197
|
self.create_assets(kwargs["asset_func"]) # type: ignore # Pass in the function to create an asset
|
|
198
198
|
self.create_vulns(kwargs["vuln_func"]) # type: ignore # Pass in the function to create a vuln
|
|
@@ -430,7 +430,7 @@ class FlatFileImporter(ABC):
|
|
|
430
430
|
:return: Tuple of header and data from csv file
|
|
431
431
|
:rtype: tuple
|
|
432
432
|
"""
|
|
433
|
-
logger.
|
|
433
|
+
logger.debug("flatfileimporter: Converting csv to dict")
|
|
434
434
|
# if file is empty, error and exit
|
|
435
435
|
if not file.read(1):
|
|
436
436
|
error_and_exit("File is empty")
|
|
@@ -446,6 +446,7 @@ class FlatFileImporter(ABC):
|
|
|
446
446
|
self.handle_extra_headers(header=header)
|
|
447
447
|
|
|
448
448
|
data = list(reader)
|
|
449
|
+
logger.debug("flatfileimporter: Done converting csv to dict.")
|
|
449
450
|
return data, header
|
|
450
451
|
|
|
451
452
|
def convert_xlsx_to_dict(self, file: TextIO, start_line_number: int = 0) -> tuple:
|
|
@@ -457,7 +458,7 @@ class FlatFileImporter(ABC):
|
|
|
457
458
|
:return: Tuple of data and header from xlsx file
|
|
458
459
|
:rtype: tuple
|
|
459
460
|
"""
|
|
460
|
-
logger.
|
|
461
|
+
logger.debug("flatfileimporter: Converting xlsx to dict")
|
|
461
462
|
# Load the workbook
|
|
462
463
|
workbook = load_workbook(filename=file.name)
|
|
463
464
|
|
|
@@ -485,6 +486,7 @@ class FlatFileImporter(ABC):
|
|
|
485
486
|
except SyntaxError as rex:
|
|
486
487
|
# Object is probably not a list, so just leave it as a string
|
|
487
488
|
self.attributes.app.logger.debug("SyntaxError: %s", rex)
|
|
489
|
+
logger.debug("flatfileimporter: Done converting xlsx to dict.")
|
|
488
490
|
return data_dict, header
|
|
489
491
|
|
|
490
492
|
def count_vuln_by_severity(self, severity: str, asset_id: int) -> int:
|
|
@@ -531,6 +533,7 @@ class FlatFileImporter(ABC):
|
|
|
531
533
|
:param Callable func: The function to process the data
|
|
532
534
|
:rtype: None
|
|
533
535
|
"""
|
|
536
|
+
from regscale.integrations.scanner_integration import IntegrationAsset
|
|
534
537
|
|
|
535
538
|
res = func(dat)
|
|
536
539
|
if not res:
|
|
@@ -744,7 +747,7 @@ class FlatFileImporter(ABC):
|
|
|
744
747
|
check_file_path(str(processed_dir.absolute()))
|
|
745
748
|
try:
|
|
746
749
|
self.attributes.logger.info(
|
|
747
|
-
"Renaming %s to %s
|
|
750
|
+
"Renaming %s to %s...",
|
|
748
751
|
file_path.name,
|
|
749
752
|
new_file_path.name,
|
|
750
753
|
)
|
|
@@ -48,12 +48,12 @@ class GrypeImport(FlatFileImporter):
|
|
|
48
48
|
if kwargs.get("scan_date"):
|
|
49
49
|
self.scan_date = kwargs.pop("scan_date")
|
|
50
50
|
else:
|
|
51
|
-
self.scan_date = safe_datetime_str(self.mapping.get_value(self.validater.data, "timestamp"
|
|
51
|
+
self.scan_date = safe_datetime_str(self.mapping.get_value(self.validater.data, "timestamp"))
|
|
52
52
|
# even if a user doesn't specify a scan_date, we want to remove it from the kwargs and use the scan_date from
|
|
53
53
|
# the attributes after the scan_date is set in the previous logic
|
|
54
54
|
if "scan_date" in kwargs:
|
|
55
55
|
kwargs.pop("scan_date")
|
|
56
|
-
source_target_data = self.mapping.get_value(self.validater.data, "source", {}
|
|
56
|
+
source_target_data = self.mapping.get_value(self.validater.data, "source", {}).get("target", {})
|
|
57
57
|
|
|
58
58
|
if "sha256-" in kwargs["file_name"]:
|
|
59
59
|
logger.debug("found sha256 in file name %s", kwargs["file_name"])
|
|
@@ -66,7 +66,7 @@ class GrypeImport(FlatFileImporter):
|
|
|
66
66
|
self.other_tracking_number = source_target_data.get("userInput", "Unknown")
|
|
67
67
|
self.os = source_target_data.get("os", "Linux")
|
|
68
68
|
self.notes = f"{kwargs['file_name']}"
|
|
69
|
-
vuln_count = len(self.mapping.get_value(self.validater.data, "matches", []
|
|
69
|
+
vuln_count = len(self.mapping.get_value(self.validater.data, "matches", []))
|
|
70
70
|
super().__init__(
|
|
71
71
|
logger=logger,
|
|
72
72
|
headers=self.headers,
|
|
@@ -80,7 +80,7 @@ class Prisma(FlatFileImporter):
|
|
|
80
80
|
**{
|
|
81
81
|
"id": 0,
|
|
82
82
|
"name": hostname,
|
|
83
|
-
"ipAddress": self.mapping.get_value(dat, "IP Address"
|
|
83
|
+
"ipAddress": self.mapping.get_value(dat, "IP Address"),
|
|
84
84
|
"isPublic": True,
|
|
85
85
|
"status": "Active (On Network)",
|
|
86
86
|
"assetCategory": "Hardware",
|
|
@@ -132,8 +132,8 @@ class Prisma(FlatFileImporter):
|
|
|
132
132
|
severity=severity,
|
|
133
133
|
plugInName=self.mapping.get_value(dat, self.vuln_title),
|
|
134
134
|
plugInId=(
|
|
135
|
-
self.mapping.get_value(dat, VULNERABILITY_ID
|
|
136
|
-
if self.mapping.get_value(dat, VULNERABILITY_ID
|
|
135
|
+
self.mapping.get_value(dat, VULNERABILITY_ID)
|
|
136
|
+
if self.mapping.get_value(dat, VULNERABILITY_ID)
|
|
137
137
|
else None
|
|
138
138
|
),
|
|
139
139
|
cve=cve,
|