pyupio / safety

Safety checks Python dependencies for known security vulnerabilities and suggests the proper remediations for vulnerabilities detected.
https://safetycli.com/product/safety-cli
MIT License
1.66k stars 141 forks source link

Gitlab step issue with the new release #396

Closed mladendin closed 1 year ago

mladendin commented 1 year ago

Description

It seems like there is an issue with the new release. This is how my Gitlab CI looks like which prior to the latest version(2.1.) was working just fine.

  script:
    - cd $RELATIVE_DIR
    - pip install safety
    - poetry export -f requirements.txt --output requirements.txt
    - safety check -r requirements.txt -o text
    - safety check -r requirements.txt

For some reason, I'm getting this error message now:

$ safety check -r requirements.txt -o text
Unhandled exception happened: [Errno 2] No such file or directory: 'git'
arseru commented 1 year ago

I can confirm that the same error happens in Bitbucket CI. Downgrading safety to v2.0.0 fixes the issue temporarily for me.

cb22 commented 1 year ago

Looks like we were relying on the git binary being present, which definitely isn't the case in all environments.

I've just merged in https://github.com/pyupio/safety/pull/397 which has a fix for this, and a new dot release will be up soon!

cb22 commented 1 year ago

Safety 2.1.1 is out and published with this fix!

mladendin commented 1 year ago

Thank you for the quick reaction, guys.