prowler-cloud / prowler

Prowler is an Open Cloud Security tool for AWS, Azure, GCP and Kubernetes. It helps for continuos monitoring, security assessments and audits, incident response, compliance, hardening and forensics readiness. Includes CIS, NIST 800, NIST CSF, CISA, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, Well-Architected Security, ENS and more.
https://prowler.com
Apache License 2.0
10.91k stars 1.55k forks source link

FileNotFoundError after version 3.8.1 #2708

Closed jfagoagas closed 1 year ago

jfagoagas commented 1 year ago

Discussed in https://github.com/prowler-cloud/prowler/discussions/2707

Originally posted by **cerontrustly** August 10, 2023 Hello guys! After using version 3.8.1 Prowler stopped working for me showing the following error: `Traceback (most recent call last): File "/home/prowler/.local/bin/prowler", line 8, in sys.exit(prowler()) File "/home/prowler/.local/lib/python3.9/site-packages/prowler/__main__.py", line 222, in prowler resolve_security_hub_previous_findings( File "/home/prowler/.local/lib/python3.9/site-packages/prowler/providers/aws/lib/security_hub/security_hub.py", line 66, in resolve_security_hub_previous_findings with open(f"{output_directory}/{output_filename}{json_asff_file_suffix}") as f: FileNotFoundError: [Errno 2] No such file or directory: '/home/prowler/output/None.asff.json'` My command line looks like this: `docker run -v /tmp:/prowler/tmp toniblyx/prowler:stable -f us-west-2 -M json-asff -S -z` I think it can be related to [this](https://github.com/prowler-cloud/prowler/pull/2687) change. Can somebody you help me? Thank you!
jfagoagas commented 1 year ago

Hi @cerontrustly, we've fixed the issue in the above PR.

Thanks for using Prowler 🚀

cerontrustly commented 1 year ago

Hi Pepe!

Thank you! I was unable to find the branch you mentioned...can you help me?

[image: image.png]

On Fri, Aug 11, 2023 at 4:07 AM Pepe Fagoaga @.***> wrote:

Hi @cerontrustly https://github.com/cerontrustly, we've fixed the issue. Could you please test it again using the fix-shub-none-error branch?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/prowler-cloud/prowler/issues/2708#issuecomment-1674298163, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATYBT2745HEBRFFTYIVEGLTXUXK3VANCNFSM6AAAAAA3L3U6DE . You are receiving this because you were mentioned.Message ID: @.***>

-- Please read our privacy policy here https://www.trustly.net/about-us/privacy-policy on how we process your personal data in accordance with the General Data Protection Regulation (EU) 2016/679 (the “GDPR”) and other applicable data protection legislation

jfagoagas commented 1 year ago

Hi @cerontrustly, we'be merged it to the master branch. Please check it there.

cerontrustly commented 1 year ago

Just ran again and it's not working for me yet...

build 11-Aug-2023 09:09:58 Cloning into 'prowler'... build 11-Aug-2023 09:10:06 stable: Pulling from toniblyx/prowler build 11-Aug-2023 09:10:12 Status: Downloaded newer image for toniblyx/prowler:stable build 11-Aug-2023 09:10:12 docker.io/toniblyx/prowler:stable build 11-Aug-2023 09:10:17 _| | build 11-Aug-2023 09:10:17 | '_ | '/ \ \ /\ / / |/ \ '| build 11-Aug-2023 09:10:17 | |) | | | () \ V V /| | / | build 11-Aug-2023 09:10:17 | ./|_| _/ _/_/ ||\||v3.8.1 build 11-Aug-2023 09:10:17 || [34m the handy cloud security tool build 11-Aug-2023 09:10:17 build 11-Aug-2023 09:10:17 [33mDate: 2023-08-11 12:10:15 [0m build 11-Aug-2023 09:10:17 build 11-Aug-2023 09:10:17 [1mExecuting 147 checks, please wait... [0m build 11-Aug-2023 09:10:17 build 11-Aug-2023 09:14:01 -> [32mScan completed! [0m |▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉| 147/147 [100%] in 3:44.4 error 11-Aug-2023 09:14:01 Traceback (most recent call last): error 11-Aug-2023 09:14:01 File "/home/prowler/.local/bin/prowler", line 8, in error 11-Aug-2023 09:14:01 sys.exit(prowler()) error 11-Aug-2023 09:14:01 File "/home/prowler/.local/lib/python3.9/site-packages/prowler/main.py", line 222, in prowler error 11-Aug-2023 09:14:01 resolve_security_hub_previous_findings( error 11-Aug-2023 09:14:01 File "/home/prowler/.local/lib/python3.9/site-packages/prowler/providers/aws/lib/security_hub/security_hub.py", line 66, in resolve_security_hub_previous_findings error 11-Aug-2023 09:14:01 with open(f"{output_directory}/{output_filename}{json_asff_file_suffix}") as f: error 11-Aug-2023 09:14:01 FileNotFoundError: [Errno 2] No such file or directory: '/home/prowler/output/None.asff.json'

On Fri, Aug 11, 2023 at 9:04 AM Pepe Fagoaga @.***> wrote:

Hi @cerontrustly https://github.com/cerontrustly, we'be merged it to the master branch. Please check it there.

— Reply to this email directly, view it on GitHub https://github.com/prowler-cloud/prowler/issues/2708#issuecomment-1674639904, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATYBT2675ADT6MZ6U6LP64TXUYNV3ANCNFSM6AAAAAA3L3U6DE . You are receiving this because you were mentioned.Message ID: @.***>

-- Please read our privacy policy here https://www.trustly.net/about-us/privacy-policy on how we process your personal data in accordance with the General Data Protection Regulation (EU) 2016/679 (the “GDPR”) and other applicable data protection legislation

jfagoagas commented 1 year ago

The fix is merged into the master branch but not included in a release yet.

Remember that the stable container tag points to the latest version released.

So for you to use it you have to donwload Prowler from github and use it that way until the release is pushed.

jfagoagas commented 1 year ago

Hi @cerontrustly, we've just released Prowler 3.8.2 which includes the fix for the Security Hub issue.

Thanks!

cerontrustly commented 1 year ago

Thank you @jfagoagas !