regscale-cli 6.17.0.0__py3-none-any.whl → 6.19.0.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 (48) hide show
  1. regscale/__init__.py +1 -1
  2. regscale/core/app/api.py +5 -0
  3. regscale/core/login.py +3 -0
  4. regscale/integrations/api_paginator.py +932 -0
  5. regscale/integrations/api_paginator_example.py +348 -0
  6. regscale/integrations/commercial/__init__.py +11 -10
  7. regscale/integrations/commercial/burp.py +4 -0
  8. regscale/integrations/commercial/{qualys.py → qualys/__init__.py} +756 -105
  9. regscale/integrations/commercial/qualys/scanner.py +1051 -0
  10. regscale/integrations/commercial/qualys/variables.py +21 -0
  11. regscale/integrations/commercial/sicura/api.py +1 -0
  12. regscale/integrations/commercial/stigv2/click_commands.py +36 -8
  13. regscale/integrations/commercial/stigv2/stig_integration.py +63 -9
  14. regscale/integrations/commercial/tenablev2/__init__.py +9 -0
  15. regscale/integrations/commercial/tenablev2/authenticate.py +23 -2
  16. regscale/integrations/commercial/tenablev2/commands.py +779 -0
  17. regscale/integrations/commercial/tenablev2/jsonl_scanner.py +1999 -0
  18. regscale/integrations/commercial/tenablev2/sc_scanner.py +600 -0
  19. regscale/integrations/commercial/tenablev2/scanner.py +7 -5
  20. regscale/integrations/commercial/tenablev2/utils.py +21 -4
  21. regscale/integrations/commercial/tenablev2/variables.py +4 -0
  22. regscale/integrations/jsonl_scanner_integration.py +523 -142
  23. regscale/integrations/scanner_integration.py +102 -26
  24. regscale/integrations/transformer/__init__.py +17 -0
  25. regscale/integrations/transformer/data_transformer.py +445 -0
  26. regscale/integrations/transformer/mappings/__init__.py +8 -0
  27. regscale/integrations/variables.py +2 -0
  28. regscale/models/__init__.py +5 -2
  29. regscale/models/integration_models/cisa_kev_data.json +63 -7
  30. regscale/models/integration_models/synqly_models/capabilities.json +1 -1
  31. regscale/models/regscale_models/asset.py +5 -2
  32. regscale/models/regscale_models/file.py +5 -2
  33. regscale/regscale.py +3 -1
  34. {regscale_cli-6.17.0.0.dist-info → regscale_cli-6.19.0.0.dist-info}/METADATA +1 -1
  35. {regscale_cli-6.17.0.0.dist-info → regscale_cli-6.19.0.0.dist-info}/RECORD +47 -31
  36. tests/regscale/core/test_version.py +22 -0
  37. tests/regscale/integrations/__init__.py +0 -0
  38. tests/regscale/integrations/test_api_paginator.py +597 -0
  39. tests/regscale/integrations/test_integration_mapping.py +60 -0
  40. tests/regscale/integrations/test_issue_creation.py +317 -0
  41. tests/regscale/integrations/test_issue_due_date.py +46 -0
  42. tests/regscale/integrations/transformer/__init__.py +0 -0
  43. tests/regscale/integrations/transformer/test_data_transformer.py +850 -0
  44. regscale/integrations/commercial/tenablev2/click.py +0 -1637
  45. {regscale_cli-6.17.0.0.dist-info → regscale_cli-6.19.0.0.dist-info}/LICENSE +0 -0
  46. {regscale_cli-6.17.0.0.dist-info → regscale_cli-6.19.0.0.dist-info}/WHEEL +0 -0
  47. {regscale_cli-6.17.0.0.dist-info → regscale_cli-6.19.0.0.dist-info}/entry_points.txt +0 -0
  48. {regscale_cli-6.17.0.0.dist-info → regscale_cli-6.19.0.0.dist-info}/top_level.txt +0 -0
regscale/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "6.17.0.0"
1
+ __version__ = "6.19.0.0"
regscale/core/app/api.py CHANGED
@@ -199,6 +199,11 @@ class Api:
199
199
  self.session.auth = self.auth
200
200
  headers = self._handle_headers(headers, merge_headers)
201
201
  response = None
202
+
203
+ # Do not send Authorization headers if validatToken in endpoint
204
+ if "validateToken" in url:
205
+ headers.pop("Authorization", None)
206
+
202
207
  try:
203
208
  self.logger.debug("POST: %s", url)
204
209
  if not json and data:
regscale/core/login.py CHANGED
@@ -49,6 +49,9 @@ def get_regscale_token(
49
49
  url = urljoin(domain, "/api/authentication/login")
50
50
  response = api.post(url=url, json=auth, headers={})
51
51
  error_msg = "Unable to authenticate with RegScale. Please check your credentials."
52
+ if response is None:
53
+ logger.error("No response received from api.post(). Possible connection issue or internal error.")
54
+ error_and_exit(error_msg + " (No response received from server)")
52
55
  logger.info(response.url)
53
56
  if response.status_code == 200:
54
57
  response_dict = response.json()