lacework / extensible-reporting

A command line tool for generating Lacework Reports
12 stars 4 forks source link

CSA report failure #87

Closed Anthonycyr closed 1 year ago

Anthonycyr commented 1 year ago

With the ARM installation: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='mineraidefer.lacework.net', port=443): Max retries exceeded with url: /api/v2/access/tokens (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "lw_report_gen.py", line 53, in main
  File "/var/folders/pw/q_c9s1s51rg0npw58fkh398c0000gn/T/_MEI69URrd/modules/reports/reportgen_csa.py", line 20, in __init__
    super().__init__(basedir, use_cache=use_cache, api_key_file=api_key_file)
  File "modules/reportgen.py", line 24, in __init__
    self.lacework_interface = LaceworkInterface(use_cache=use_cache, api_key_file=api_key_file)
  File "modules/lacework_interface.py", line 29, in __init__
    self.lacework = LaceworkClient()
  File "laceworksdk/api/__init__.py", line 139, in __init__
  File "laceworksdk/http_session.py", line 62, in __init__
  File "laceworksdk/http_session.py", line 101, in _check_access_token
  File "laceworksdk/http_session.py", line 167, in _get_access_token
  File "requests/sessions.py", line 635, in post
  File "requests/sessions.py", line 587, in request
  File "requests/sessions.py", line 701, in send
  File "requests/adapters.py", line 517, in send
requests.exceptions.SSLError: HTTPSConnectionPool(host='mineraidefer.lacework.net', port=443): Max retries exceeded with url: /api/v2/access/tokens (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')))

With python: lw_report_gen.py", line 3, in import logzero ModuleNotFoundError: No module named 'logzero'

tmac1973 commented 1 year ago

Which version were you running? I just uploaded version 1.1.8 a few minutes ago. Can you test with that?

Regarding running the source code:

To use python to run the source code directly you would need to install the python module dependencies using "pip3" or "poetry". That's the error message you're getting, that the modules are missing (in this case the first modules it's trying to use.)

Also on a mac it must be python3, by default mac only includes python2. So you would also have to install version 3 using brew or some other mechanism before installing the requirements.

It's probably easier to stick with the executable.

Anthonycyr commented 1 year ago

I found my issue, thanks

Netscope gremlins

tmac1973 commented 1 year ago

Ok good deal. Please do use 1.1.8 though as the I fixed a flaw in the vulnerability reporting.