regscale-cli 6.20.6.0__py3-none-any.whl → 6.20.7.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/_version.py +1 -1
- regscale/integrations/commercial/qualys/__init__.py +7 -7
- regscale/models/app_models/import_validater.py +5 -1
- regscale/models/app_models/mapping.py +3 -1
- regscale/models/integration_models/cisa_kev_data.json +94 -4
- regscale/models/integration_models/flat_file_importer/__init__.py +2 -3
- regscale/models/integration_models/qualys.py +24 -4
- regscale/models/integration_models/synqly_models/capabilities.json +1 -1
- {regscale_cli-6.20.6.0.dist-info → regscale_cli-6.20.7.0.dist-info}/METADATA +1 -1
- {regscale_cli-6.20.6.0.dist-info → regscale_cli-6.20.7.0.dist-info}/RECORD +14 -14
- {regscale_cli-6.20.6.0.dist-info → regscale_cli-6.20.7.0.dist-info}/LICENSE +0 -0
- {regscale_cli-6.20.6.0.dist-info → regscale_cli-6.20.7.0.dist-info}/WHEEL +0 -0
- {regscale_cli-6.20.6.0.dist-info → regscale_cli-6.20.7.0.dist-info}/entry_points.txt +0 -0
- {regscale_cli-6.20.6.0.dist-info → regscale_cli-6.20.7.0.dist-info}/top_level.txt +0 -0
regscale/_version.py
CHANGED
|
@@ -791,7 +791,7 @@ def export_past_scans(save_output_to: Path, days: int, export: bool = True):
|
|
|
791
791
|
|
|
792
792
|
@qualys.command(name="import_scans")
|
|
793
793
|
@FlatFileImporter.common_scanner_options(
|
|
794
|
-
message="File path to the folder containing Qualys .csv files to process to RegScale.",
|
|
794
|
+
message="File path to the folder containing Qualys .csv or .xlsx files to process to RegScale.",
|
|
795
795
|
prompt="File path for Qualys files",
|
|
796
796
|
import_name="qualys",
|
|
797
797
|
)
|
|
@@ -814,16 +814,16 @@ def import_scans(
|
|
|
814
814
|
upload_file: bool,
|
|
815
815
|
):
|
|
816
816
|
"""
|
|
817
|
-
Import vulnerability scans from Qualys CSV files.
|
|
817
|
+
Import vulnerability scans from Qualys CSV or Excel (.xlsx) files.
|
|
818
818
|
|
|
819
|
-
This command processes Qualys CSV export files and imports assets and vulnerabilities
|
|
820
|
-
into RegScale. The
|
|
819
|
+
This command processes Qualys CSV or Excel export files and imports assets and vulnerabilities
|
|
820
|
+
into RegScale. The files must contain specific required headers.
|
|
821
821
|
|
|
822
822
|
TROUBLESHOOTING:
|
|
823
823
|
If you encounter "No columns to parse from file" errors, try:
|
|
824
824
|
1. Run 'regscale qualys validate_csv -f <file_path>' first
|
|
825
825
|
2. Adjust the --skip_rows parameter (default: 129)
|
|
826
|
-
3. Check that your
|
|
826
|
+
3. Check that your file has the required headers
|
|
827
827
|
|
|
828
828
|
REQUIRED HEADERS:
|
|
829
829
|
Severity, Title, Exploitability, CVE ID, Solution, DNS, IP,
|
|
@@ -861,7 +861,7 @@ def import_qualys_scans(
|
|
|
861
861
|
"""
|
|
862
862
|
Import scans from Qualys
|
|
863
863
|
|
|
864
|
-
:param os.PathLike[str] folder_path: File path to the folder containing Qualys .csv files to process to RegScale
|
|
864
|
+
:param os.PathLike[str] folder_path: File path to the folder containing Qualys .csv or .xlsx files to process to RegScale
|
|
865
865
|
:param int regscale_ssp_id: The RegScale SSP ID
|
|
866
866
|
:param datetime scan_date: The date of the scan
|
|
867
867
|
:param os.PathLike[str] mappings_path: The path to the mappings file
|
|
@@ -876,7 +876,7 @@ def import_qualys_scans(
|
|
|
876
876
|
FlatFileImporter.import_files(
|
|
877
877
|
import_type=Qualys,
|
|
878
878
|
import_name="Qualys",
|
|
879
|
-
file_types=".csv",
|
|
879
|
+
file_types=[".csv", ".xlsx"],
|
|
880
880
|
folder_path=folder_path,
|
|
881
881
|
regscale_ssp_id=regscale_ssp_id,
|
|
882
882
|
scan_date=scan_date,
|
|
@@ -133,9 +133,13 @@ class ImportValidater:
|
|
|
133
133
|
:param Union[list, pd.Index] headers: List of headers from the file
|
|
134
134
|
"""
|
|
135
135
|
import re
|
|
136
|
+
from pandas import Index
|
|
136
137
|
|
|
137
138
|
from regscale.models import Mapping
|
|
138
139
|
|
|
140
|
+
if isinstance(headers, Index):
|
|
141
|
+
headers = [str(header) for header in headers] # Convert pd.Index to list of strings
|
|
142
|
+
|
|
139
143
|
if not self.ignore_unnamed and any(re.search(r"unnamed", header, re.IGNORECASE) for header in headers): # type: ignore
|
|
140
144
|
raise ValidationException(
|
|
141
145
|
f"Unable to parse headers from the file. Please ensure the headers are named in {self.file_path}"
|
|
@@ -227,7 +231,7 @@ class ImportValidater:
|
|
|
227
231
|
elif self.worksheet_name:
|
|
228
232
|
df = pandas.read_excel(file_path, sheet_name=self.worksheet_name)
|
|
229
233
|
elif self.skip_rows:
|
|
230
|
-
df = pandas.read_excel(file_path, skiprows=self.skip_rows)
|
|
234
|
+
df = pandas.read_excel(file_path, skiprows=self.skip_rows - 1)
|
|
231
235
|
else:
|
|
232
236
|
df = pandas.read_excel(file_path)
|
|
233
237
|
except Exception as e:
|
|
@@ -121,8 +121,10 @@ class Mapping(BaseModel):
|
|
|
121
121
|
mapping = values.data.get("mapping")
|
|
122
122
|
if mapping is not None and expected_field_names is not None:
|
|
123
123
|
if missing_fields := [field for field in expected_field_names if field not in mapping]:
|
|
124
|
+
# Get file_path_for_prompt from values instead of cls
|
|
125
|
+
file_path = values.data.get("file_path_for_prompt")
|
|
124
126
|
for field in missing_fields:
|
|
125
|
-
cls._prompt_for_field(field, mapping,
|
|
127
|
+
cls._prompt_for_field(field, mapping, file_path)
|
|
126
128
|
return expected_field_names
|
|
127
129
|
|
|
128
130
|
@field_validator("expected_field_names")
|
|
@@ -1,9 +1,99 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "CISA Catalog of Known Exploited Vulnerabilities",
|
|
3
|
-
"catalogVersion": "2025.07.
|
|
4
|
-
"dateReleased": "2025-07-
|
|
5
|
-
"count":
|
|
3
|
+
"catalogVersion": "2025.07.22",
|
|
4
|
+
"dateReleased": "2025-07-22T17:01:26.7198Z",
|
|
5
|
+
"count": 1388,
|
|
6
6
|
"vulnerabilities": [
|
|
7
|
+
{
|
|
8
|
+
"cveID": "CVE-2025-2775",
|
|
9
|
+
"vendorProject": "SysAid",
|
|
10
|
+
"product": "SysAid On-Prem",
|
|
11
|
+
"vulnerabilityName": "SysAid On-Prem Improper Restriction of XML External Entity Reference Vulnerability",
|
|
12
|
+
"dateAdded": "2025-07-22",
|
|
13
|
+
"shortDescription": "SysAid On-Prem contains an improper restriction of XML external entity reference vulnerability in the Checkin processing functionality, allowing for administrator account takeover and file read primitives.",
|
|
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-08-12",
|
|
16
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
17
|
+
"notes": "https:\/\/documentation.sysaid.com\/docs\/24-40-60 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-2775",
|
|
18
|
+
"cwes": [
|
|
19
|
+
"CWE-611"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"cveID": "CVE-2025-2776",
|
|
24
|
+
"vendorProject": "SysAid",
|
|
25
|
+
"product": "SysAid On-Prem",
|
|
26
|
+
"vulnerabilityName": "SysAid On-Prem Improper Restriction of XML External Entity Reference Vulnerability",
|
|
27
|
+
"dateAdded": "2025-07-22",
|
|
28
|
+
"shortDescription": "SysAid On-Prem contains an improper restriction of XML external entity reference vulnerability in the Server URL processing functionality, allowing for administrator account takeover and file read primitives.",
|
|
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-08-12",
|
|
31
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
32
|
+
"notes": "https:\/\/documentation.sysaid.com\/docs\/24-40-60 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-2776",
|
|
33
|
+
"cwes": [
|
|
34
|
+
"CWE-611"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"cveID": "CVE-2025-6558",
|
|
39
|
+
"vendorProject": "Google",
|
|
40
|
+
"product": "Chromium",
|
|
41
|
+
"vulnerabilityName": "Google Chromium ANGLE and GPU Improper Input Validation Vulnerability",
|
|
42
|
+
"dateAdded": "2025-07-22",
|
|
43
|
+
"shortDescription": "Google Chromium contains an improper input validation vulnerability in ANGLE and GPU. This vulnerability could allow a remote attacker to potentially perform a sandbox escape via a crafted HTML page. This vulnerability could affect multiple web browsers that utilize Chromium, including, but not limited to, Google Chrome, Microsoft Edge, and Opera.",
|
|
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-08-12",
|
|
46
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
47
|
+
"notes": "https:\/\/chromereleases.googleblog.com\/2025\/07\/stable-channel-update-for-desktop_15.html ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-6558",
|
|
48
|
+
"cwes": [
|
|
49
|
+
"CWE-20"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"cveID": "CVE-2025-54309",
|
|
54
|
+
"vendorProject": "CrushFTP",
|
|
55
|
+
"product": "CrushFTP",
|
|
56
|
+
"vulnerabilityName": " CrushFTP Unprotected Alternate Channel Vulnerability",
|
|
57
|
+
"dateAdded": "2025-07-22",
|
|
58
|
+
"shortDescription": "CrushFTP contains an unprotected alternate channel vulnerability. When the DMZ proxy feature is not used, mishandles AS2 validation and consequently allows remote attackers to obtain admin access via HTTPS.",
|
|
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-08-12",
|
|
61
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
62
|
+
"notes": "https:\/\/www.crushftp.com\/crush11wiki\/Wiki.jsp?page=CompromiseJuly2025 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-54309 ",
|
|
63
|
+
"cwes": [
|
|
64
|
+
"CWE-420"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"cveID": "CVE-2025-49704",
|
|
69
|
+
"vendorProject": "Microsoft",
|
|
70
|
+
"product": "SharePoint",
|
|
71
|
+
"vulnerabilityName": "Microsoft SharePoint Code Injection Vulnerability",
|
|
72
|
+
"dateAdded": "2025-07-22",
|
|
73
|
+
"shortDescription": "Microsoft SharePoint contains a code injection vulnerability that could allow an authorized attacker to execute code over a network. This vulnerability could be chained with CVE-2025-49706. The update for CVE-2025-53770 includes more robust protections than the update for CVE-2025-49704.",
|
|
74
|
+
"requiredAction": "CISA recommends disconnecting public-facing versions of SharePoint Server that have reached their end-of-life (EOL) or end-of-service (EOS). For example, SharePoint Server 2013 and earlier versions are end-of-life and should be discontinued if still in use. For supported versions, please follow the mitigations according to CISA and vendor instructions. Adhere to the applicable BOD 22-01 guidance for cloud services or discontinue use of the product if mitigations are not available.",
|
|
75
|
+
"dueDate": "2025-07-23",
|
|
76
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
77
|
+
"notes": "CISA Mitigation Instructions: https:\/\/www.cisa.gov\/news-events\/alerts\/2025\/07\/20\/microsoft-releases-guidance-exploitation-sharepoint-vulnerability-cve-2025-53770; https:\/\/www.microsoft.com\/en-us\/security\/blog\/2025\/07\/22\/disrupting-active-exploitation-of-on-premises-sharepoint-vulnerabilities\/ ; https:\/\/msrc.microsoft.com\/update-guide\/vulnerability\/CVE-2025-49704 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-49704",
|
|
78
|
+
"cwes": [
|
|
79
|
+
"CWE-94"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"cveID": "CVE-2025-49706",
|
|
84
|
+
"vendorProject": "Microsoft",
|
|
85
|
+
"product": "SharePoint",
|
|
86
|
+
"vulnerabilityName": "Microsoft SharePoint Improper Authentication Vulnerability",
|
|
87
|
+
"dateAdded": "2025-07-22",
|
|
88
|
+
"shortDescription": "Microsoft SharePoint contains an improper authentication vulnerability that allows an authorized attacker to perform spoofing over a network. Successfully exploitation could allow an attacker to view sensitive information and make some changes to disclosed information. This vulnerability could be chained with CVE-2025-49704. The update for CVE-2025-53771 includes more robust protections than the update for CVE-2025-49706.",
|
|
89
|
+
"requiredAction": "CISA recommends disconnecting public-facing versions of SharePoint Server that have reached their end-of-life (EOL) or end-of-service (EOS). For example, SharePoint Server 2013 and earlier versions are end-of-life and should be discontinued if still in use. For supported versions, please follow the mitigations according to CISA and vendor instructions. Adhere to the applicable BOD 22-01 guidance for cloud services or discontinue use of the product if mitigations are not available.",
|
|
90
|
+
"dueDate": "2025-07-23",
|
|
91
|
+
"knownRansomwareCampaignUse": "Unknown",
|
|
92
|
+
"notes": "CISA Mitigation Instructions: https:\/\/www.cisa.gov\/news-events\/alerts\/2025\/07\/20\/microsoft-releases-guidance-exploitation-sharepoint-vulnerability-cve-2025-53770; https:\/\/www.microsoft.com\/en-us\/security\/blog\/2025\/07\/22\/disrupting-active-exploitation-of-on-premises-sharepoint-vulnerabilities\/ ; https:\/\/msrc.microsoft.com\/update-guide\/vulnerability\/CVE-2025-49706 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-49706",
|
|
93
|
+
"cwes": [
|
|
94
|
+
"CWE-287"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
7
97
|
{
|
|
8
98
|
"cveID": "CVE-2025-53770",
|
|
9
99
|
"vendorProject": "Microsoft",
|
|
@@ -14,7 +104,7 @@
|
|
|
14
104
|
"requiredAction": "CISA recommends configuring AMSI integration in SharePoint and deploying Defender AV on all SharePoint servers. If AMSI cannot be enabled, CISA recommends disconnecting affected products that are public-facing on the internet from service until official mitigations are available. Once mitigations are provided, apply them according to CISA and vendor instructions. Follow the applicable BOD 22-01 guidance for cloud services or discontinue use of the product if mitigations are not available. ",
|
|
15
105
|
"dueDate": "2025-07-21",
|
|
16
106
|
"knownRansomwareCampaignUse": "Unknown",
|
|
17
|
-
"notes": "CISA Mitigation Instructions: https:\/\/www.cisa.gov\/news-events\/alerts\/2025\/07\/20\/microsoft-releases-guidance-exploitation-sharepoint-vulnerability-cve-2025-53770
|
|
107
|
+
"notes": "CISA Mitigation Instructions: https:\/\/www.cisa.gov\/news-events\/alerts\/2025\/07\/20\/microsoft-releases-guidance-exploitation-sharepoint-vulnerability-cve-2025-53770; https:\/\/www.microsoft.com\/en-us\/security\/blog\/2025\/07\/22\/disrupting-active-exploitation-of-on-premises-sharepoint-vulnerabilities\/ ; https:\/\/msrc.microsoft.com\/update-guide\/vulnerability\/CVE-2025-53770 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-53770",
|
|
18
108
|
"cwes": [
|
|
19
109
|
"CWE-502"
|
|
20
110
|
]
|
|
@@ -391,11 +391,10 @@ class FlatFileImporter(ABC):
|
|
|
391
391
|
# Skip lines until the start line is reached
|
|
392
392
|
for _ in range(start_line_number):
|
|
393
393
|
next(file)
|
|
394
|
-
if file.name.endswith(".csv"):
|
|
394
|
+
if file.name.endswith((".csv", ".xlsx")):
|
|
395
|
+
# Use the validater data for CSV and XLSX files to ensure proper mapping validation
|
|
395
396
|
data = self.validater.data.to_dict("records")
|
|
396
397
|
header = list(self.validater.parsed_headers)
|
|
397
|
-
elif file.name.endswith(".xlsx"):
|
|
398
|
-
data, header = self.convert_xlsx_to_dict(file, start_line_number)
|
|
399
398
|
elif file.name.endswith(".json"):
|
|
400
399
|
try:
|
|
401
400
|
# Filter possible null values
|
|
@@ -7,10 +7,12 @@ import logging
|
|
|
7
7
|
|
|
8
8
|
# pylint: disable=C0415
|
|
9
9
|
import re
|
|
10
|
+
from calendar import firstweekday
|
|
10
11
|
from datetime import datetime
|
|
11
12
|
from typing import Any, Iterator, Optional, TypeVar, TextIO, Union
|
|
12
13
|
|
|
13
14
|
from openpyxl.reader.excel import load_workbook
|
|
15
|
+
from pandas import Timestamp
|
|
14
16
|
|
|
15
17
|
from regscale.core.app import create_logger
|
|
16
18
|
from regscale.core.app.application import Application
|
|
@@ -124,12 +126,27 @@ class Qualys(FlatFileImporter):
|
|
|
124
126
|
}
|
|
125
127
|
)
|
|
126
128
|
|
|
127
|
-
def
|
|
129
|
+
def _convert_datetime_to_str(self, input_date: Union[Timestamp, datetime]) -> str:
|
|
130
|
+
"""
|
|
131
|
+
Convert a datetime or Timestamp object to a string in the specified format.
|
|
132
|
+
|
|
133
|
+
:param Union[Timestamp, datetime] input_date: The date to convert.
|
|
134
|
+
:return: The date as a string in the format '%Y-%m-%d %H:%M:%S'.
|
|
135
|
+
:rtype: str
|
|
136
|
+
"""
|
|
137
|
+
if isinstance(input_date, Timestamp):
|
|
138
|
+
input_date = input_date.to_pydatetime()
|
|
139
|
+
elif isinstance(input_date, str):
|
|
140
|
+
return input_date
|
|
141
|
+
return input_date.strftime(self.dt_format)
|
|
142
|
+
|
|
143
|
+
def create_vuln(self, dat: Optional[dict] = None, **kwargs) -> Optional[Vulnerability]:
|
|
128
144
|
"""
|
|
129
145
|
Create a vuln from a row in the Qualys file
|
|
130
146
|
|
|
131
147
|
:param Optional[dict] dat: Data row from CSV file, defaults to None
|
|
132
|
-
:
|
|
148
|
+
:return: RegScale Vulnerability object or None
|
|
149
|
+
:rtype: Optional[Vulnerability]
|
|
133
150
|
"""
|
|
134
151
|
from regscale.integrations.commercial.qualys import map_qualys_severity_to_regscale
|
|
135
152
|
|
|
@@ -145,6 +162,9 @@ class Qualys(FlatFileImporter):
|
|
|
145
162
|
config = self.attributes.app.config
|
|
146
163
|
asset_match = [asset for asset in self.data["assets"] if asset.name == dns]
|
|
147
164
|
asset = asset_match[0] if asset_match else None
|
|
165
|
+
last_seen = self._convert_datetime_to_str(self.mapping.get_value(dat, "Last Detected"))
|
|
166
|
+
first_seen = self._convert_datetime_to_str(self.mapping.get_value(dat, "First Detected"))
|
|
167
|
+
|
|
148
168
|
if dat and asset_match:
|
|
149
169
|
regscale_vuln = Vulnerability(
|
|
150
170
|
id=0,
|
|
@@ -152,8 +172,8 @@ class Qualys(FlatFileImporter):
|
|
|
152
172
|
parentId=asset.id,
|
|
153
173
|
parentModule="assets",
|
|
154
174
|
ipAddress=self.mapping.get_value(dat, IP),
|
|
155
|
-
lastSeen=
|
|
156
|
-
firstSeen=
|
|
175
|
+
lastSeen=last_seen,
|
|
176
|
+
firstSeen=first_seen,
|
|
157
177
|
daysOpen=None,
|
|
158
178
|
dns=self.mapping.get_value(dat, DNS, other_id),
|
|
159
179
|
mitigated=None,
|