regscale-cli 6.21.0.0__py3-none-any.whl → 6.21.1.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.

Files changed (37) hide show
  1. regscale/_version.py +1 -1
  2. regscale/integrations/commercial/__init__.py +1 -2
  3. regscale/integrations/commercial/amazon/common.py +79 -2
  4. regscale/integrations/commercial/aws/cli.py +183 -9
  5. regscale/integrations/commercial/aws/scanner.py +544 -9
  6. regscale/integrations/commercial/cpe.py +18 -1
  7. regscale/integrations/commercial/tenablev2/jsonl_scanner.py +2 -1
  8. regscale/integrations/commercial/wizv2/async_client.py +10 -3
  9. regscale/integrations/commercial/wizv2/click.py +102 -26
  10. regscale/integrations/commercial/wizv2/constants.py +249 -1
  11. regscale/integrations/commercial/wizv2/issue.py +2 -2
  12. regscale/integrations/commercial/wizv2/parsers.py +3 -2
  13. regscale/integrations/commercial/wizv2/policy_compliance.py +1858 -0
  14. regscale/integrations/commercial/wizv2/scanner.py +15 -21
  15. regscale/integrations/commercial/wizv2/utils.py +258 -85
  16. regscale/integrations/commercial/wizv2/variables.py +4 -3
  17. regscale/integrations/compliance_integration.py +1455 -0
  18. regscale/integrations/public/fedramp/fedramp_five.py +1 -1
  19. regscale/integrations/public/fedramp/markdown_parser.py +7 -1
  20. regscale/integrations/scanner_integration.py +30 -2
  21. regscale/models/app_models/__init__.py +1 -0
  22. regscale/models/integration_models/cisa_kev_data.json +73 -4
  23. regscale/models/integration_models/synqly_models/capabilities.json +1 -1
  24. regscale/{integrations/commercial/wizv2/models.py → models/integration_models/wizv2.py} +4 -12
  25. regscale/models/regscale_models/file.py +4 -0
  26. regscale/models/regscale_models/issue.py +123 -0
  27. regscale/models/regscale_models/regscale_model.py +4 -2
  28. regscale/models/regscale_models/security_plan.py +1 -1
  29. regscale/utils/graphql_client.py +3 -1
  30. {regscale_cli-6.21.0.0.dist-info → regscale_cli-6.21.1.0.dist-info}/METADATA +9 -9
  31. {regscale_cli-6.21.0.0.dist-info → regscale_cli-6.21.1.0.dist-info}/RECORD +37 -34
  32. tests/regscale/core/test_version_regscale.py +5 -3
  33. tests/regscale/integrations/test_wiz_policy_compliance_affected_controls.py +154 -0
  34. {regscale_cli-6.21.0.0.dist-info → regscale_cli-6.21.1.0.dist-info}/LICENSE +0 -0
  35. {regscale_cli-6.21.0.0.dist-info → regscale_cli-6.21.1.0.dist-info}/WHEEL +0 -0
  36. {regscale_cli-6.21.0.0.dist-info → regscale_cli-6.21.1.0.dist-info}/entry_points.txt +0 -0
  37. {regscale_cli-6.21.0.0.dist-info → regscale_cli-6.21.1.0.dist-info}/top_level.txt +0 -0
@@ -1764,7 +1764,7 @@ def update_existing_control(
1764
1764
 
1765
1765
  # Convert the model to a dict and back to a model to workaround these odd 400 errors.
1766
1766
  try:
1767
- ControlImplementation(**control.dict()).save()
1767
+ control.save()
1768
1768
  except Exception as e:
1769
1769
  logger.warning(f"Error updating control: {control.id} - {e}")
1770
1770
 
@@ -7,6 +7,7 @@ import re
7
7
  import logging
8
8
  import zipfile # Assuming you need this for other file handling
9
9
  import pypandoc
10
+ import re
10
11
  from collections import defaultdict
11
12
  from typing import Dict, TextIO, Optional, Tuple
12
13
  from regscale.models import ProfileMapping
@@ -108,7 +109,12 @@ class MDDocParser:
108
109
  """
109
110
  # Extract control ID and clean it
110
111
  html_free_line = self.clean_html_and_newlines(line)
111
- clean_line = html_free_line.replace(FULL_SUMMARY_TOKEN, "")
112
+ # Use regex to find "what" case-insensitively and split
113
+ pattern = re.compile(r"what", re.IGNORECASE)
114
+ if pattern.search(html_free_line):
115
+ clean_line = pattern.split(html_free_line)[0].strip()
116
+ else:
117
+ clean_line = html_free_line
112
118
  if not clean_line:
113
119
  return None
114
120
  clean_control_id_from_line = clean_line.strip()
@@ -423,6 +423,9 @@ class IntegrationFinding:
423
423
  planned_milestone_changes: Optional[str] = None
424
424
  adjusted_risk_rating: Optional[str] = None
425
425
  risk_adjustment: str = "No"
426
+
427
+ # Compliance fields
428
+ assessment_id: Optional[int] = None
426
429
  operational_requirements: Optional[str] = None
427
430
  deviation_rationale: Optional[str] = None
428
431
  is_cwe: bool = False
@@ -456,7 +459,7 @@ class IntegrationFinding:
456
459
  source_rule_id: Optional[str] = None
457
460
  vulnerability_type: Optional[str] = None
458
461
 
459
- # CoalFre POAM
462
+ # CoalFire POAM
460
463
  basis_for_adjustment: Optional[str] = None
461
464
  poam_id: Optional[str] = None
462
465
 
@@ -1612,6 +1615,23 @@ class ScannerIntegration(ABC):
1612
1615
  issue.securityPlanId = self.plan_id if not self.is_component else None
1613
1616
  issue.identification = finding.identification
1614
1617
  issue.dateFirstDetected = finding.first_seen
1618
+ # Ensure a due date is always set using configured policy defaults (e.g., FedRAMP)
1619
+ if not finding.due_date:
1620
+ try:
1621
+ base_created = finding.date_created or issue.dateCreated
1622
+ finding.due_date = issue_due_date(
1623
+ severity=finding.severity,
1624
+ created_date=base_created,
1625
+ title=self.title,
1626
+ )
1627
+ except Exception:
1628
+ # Final fallback to a Low severity default if anything goes wrong
1629
+ base_created = finding.date_created or issue.dateCreated
1630
+ finding.due_date = issue_due_date(
1631
+ severity=regscale_models.IssueSeverity.Low,
1632
+ created_date=base_created,
1633
+ title=self.title,
1634
+ )
1615
1635
  issue.dueDate = finding.due_date
1616
1636
  issue.description = description
1617
1637
  issue.sourceReport = finding.source_report or self.title
@@ -1622,15 +1642,21 @@ class ScannerIntegration(ABC):
1622
1642
  issue.integrationFindingId = self.get_finding_identifier(finding)
1623
1643
  issue.poamComments = finding.poam_comments
1624
1644
  issue.cve = finding.cve
1645
+ issue.assessmentId = finding.assessment_id
1625
1646
  control_id = self.get_control_implementation_id_for_cci(finding.cci_ref) if finding.cci_ref else None
1626
1647
  issue.controlId = control_id # TODO REMOVE
1627
1648
  # Add the control implementation ids and the cci ref if it exists
1628
1649
  # Get control implementation ID for CCI if it exists
1629
1650
  # Only add CCI control ID if it exists
1630
1651
  cci_control_ids = [control_id] if control_id is not None else []
1631
- issue.affectedControls = finding.affected_controls
1652
+ # Ensure failed control labels (e.g., AC-4(21)) are present in affectedControls
1653
+ if finding.affected_controls:
1654
+ issue.affectedControls = finding.affected_controls
1655
+ elif finding.control_labels:
1656
+ issue.affectedControls = ", ".join(sorted({cl for cl in finding.control_labels if cl}))
1632
1657
 
1633
1658
  issue.controlImplementationIds = list(set(finding._control_implementation_ids + cci_control_ids)) # noqa
1659
+ # Always ensure isPoam reflects current settings, even when updating existing issues
1634
1660
  issue.isPoam = is_poam
1635
1661
  issue.basisForAdjustment = (
1636
1662
  finding.basis_for_adjustment if finding.basis_for_adjustment else f"{self.title} import"
@@ -1647,6 +1673,8 @@ class ScannerIntegration(ABC):
1647
1673
  issue.operationalRequirement = finding.operational_requirements
1648
1674
  issue.deviationRationale = finding.deviation_rationale
1649
1675
  issue.dateLastUpdated = get_current_datetime()
1676
+ ## set affected controls if they exist
1677
+ issue.affectedControls = finding.affected_controls
1650
1678
 
1651
1679
  if finding.cve:
1652
1680
  issue = self.lookup_kev_and_update_issue(cve=finding.cve, issue=issue, cisa_kevs=self._kev_data)
@@ -3,3 +3,4 @@
3
3
  from .mapping import Mapping
4
4
  from .import_validater import ImportValidater
5
5
  from .datetime_encoder import DateTimeEncoder
6
+ from .click import NotRequiredIf, regscale_id, regscale_module
@@ -1,9 +1,78 @@
1
1
  {
2
2
  "title": "CISA Catalog of Known Exploited Vulnerabilities",
3
- "catalogVersion": "2025.08.05",
4
- "dateReleased": "2025-08-05T18:03:16.7522Z",
5
- "count": 1394,
3
+ "catalogVersion": "2025.08.14",
4
+ "dateReleased": "2025-08-14T18:46:32.7331Z",
5
+ "count": 1399,
6
6
  "vulnerabilities": [
7
+ {
8
+ "cveID": "CVE-2025-8876",
9
+ "vendorProject": "N-able",
10
+ "product": "N-Central",
11
+ "vulnerabilityName": "N-able N-Central Command Injection Vulnerability",
12
+ "dateAdded": "2025-08-13",
13
+ "shortDescription": "N-able N-Central contains a command injection vulnerability via improper sanitization of user input.",
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-20",
16
+ "knownRansomwareCampaignUse": "Unknown",
17
+ "notes": "https:\/\/status.n-able.com\/2025\/08\/13\/announcing-the-ga-of-n-central-2025-3-1\/ ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-8876",
18
+ "cwes": []
19
+ },
20
+ {
21
+ "cveID": "CVE-2025-8875",
22
+ "vendorProject": "N-able",
23
+ "product": "N-Central",
24
+ "vulnerabilityName": "N-able N-Central Insecure Deserialization Vulnerability",
25
+ "dateAdded": "2025-08-13",
26
+ "shortDescription": "N-able N-Central contains an insecure deserialization vulnerability that could lead to command execution.",
27
+ "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.",
28
+ "dueDate": "2025-08-20",
29
+ "knownRansomwareCampaignUse": "Unknown",
30
+ "notes": "https:\/\/status.n-able.com\/2025\/08\/13\/announcing-the-ga-of-n-central-2025-3-1\/ ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-8875",
31
+ "cwes": []
32
+ },
33
+ {
34
+ "cveID": "CVE-2025-8088",
35
+ "vendorProject": "RARLAB",
36
+ "product": "WinRAR",
37
+ "vulnerabilityName": "RARLAB WinRAR Path Traversal Vulnerability",
38
+ "dateAdded": "2025-08-12",
39
+ "shortDescription": "RARLAB WinRAR contains a path traversal vulnerability affecting the Windows version of WinRAR. This vulnerability could allow an attacker to execute arbitrary code by crafting malicious archive files.",
40
+ "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.",
41
+ "dueDate": "2025-09-02",
42
+ "knownRansomwareCampaignUse": "Unknown",
43
+ "notes": "https:\/\/www.win-rar.com\/singlenewsview.html?&L=0&tx_ttnews%5Btt_news%5D=283&cHash=a64b4a8f662d3639dec8d65f47bc93c5 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-8088",
44
+ "cwes": [
45
+ "CWE-35"
46
+ ]
47
+ },
48
+ {
49
+ "cveID": "CVE-2007-0671",
50
+ "vendorProject": "Microsoft",
51
+ "product": "Office",
52
+ "vulnerabilityName": "Microsoft Office Excel Remote Code Execution Vulnerability",
53
+ "dateAdded": "2025-08-12",
54
+ "shortDescription": "Microsoft Office Excel contains a remote code execution vulnerability that can be exploited when a specially crafted Excel file is opened. This malicious file could be delivered as an email attachment or hosted on a malicious website. An attacker could leverage this vulnerability by creating a specially crafted Excel file, which, when opened, allowing an attacker to execute remote code on the affected system.",
55
+ "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.",
56
+ "dueDate": "2025-09-02",
57
+ "knownRansomwareCampaignUse": "Unknown",
58
+ "notes": "https:\/\/learn.microsoft.com\/en-us\/security-updates\/securitybulletins\/2007\/ms07-015 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2007-0671",
59
+ "cwes": []
60
+ },
61
+ {
62
+ "cveID": "CVE-2013-3893",
63
+ "vendorProject": "Microsoft",
64
+ "product": "Internet Explorer",
65
+ "vulnerabilityName": "Microsoft Internet Explorer Resource Management Errors Vulnerability",
66
+ "dateAdded": "2025-08-12",
67
+ "shortDescription": "Microsoft Internet Explorer contains a memory corruption vulnerability that allows for remote code execution. The impacted products could be end-of-life (EoL) and\/or end-of-service (EoS). Users should discontinue product utilization.",
68
+ "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.",
69
+ "dueDate": "2025-09-02",
70
+ "knownRansomwareCampaignUse": "Unknown",
71
+ "notes": "https:\/\/learn.microsoft.com\/en-us\/security-updates\/securitybulletins\/2013\/ms13-080 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2013-3893",
72
+ "cwes": [
73
+ "CWE-399"
74
+ ]
75
+ },
7
76
  {
8
77
  "cveID": "CVE-2020-25078",
9
78
  "vendorProject": "D-Link",
@@ -236,7 +305,7 @@
236
305
  "shortDescription": "Citrix NetScaler ADC and Gateway contain an out-of-bounds read vulnerability due to insufficient input validation. This vulnerability can lead to memory overread when the NetScaler is configured as a Gateway (VPN virtual server, ICA Proxy, CVPN, RDP Proxy) OR AAA virtual server.",
237
306
  "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.",
238
307
  "dueDate": "2025-07-11",
239
- "knownRansomwareCampaignUse": "Unknown",
308
+ "knownRansomwareCampaignUse": "Known",
240
309
  "notes": "https:\/\/support.citrix.com\/support-home\/kbsearch\/article?articleNumber=CTX693420 ; https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2025-5777",
241
310
  "cwes": [
242
311
  "CWE-125"