You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It also doesn't find my env.yml file where I define my conda environment but that's more expected. I actually only keep the bare minimum in there (packages that don't install nicely with pip only and/or C libs that python packages wrap like python-magic wraps libmagic etc.) exactly for this reason - as dependabot also doesn't find/read/parse env.yml files (but it does find/read/parse and bump pyproject.toml files)
Am I doing something wrong with safety scan or does it not support pyproject.toml or is it a bug?
What I Did
$ ls -al pyproject.toml
-rw-r--r-- 1 alex staff 5000 Feb 24 15:14 pyproject.toml
$ safety scan
Safety 3.0.1 scanning /Users/alex/repos/Backend
2024-02-24 18:22:12 UTC
Account: Alex Ley, [email protected]
Git branch: fix/github_actions_versions
Environment: development
Scan policy: None, using Safety CLI default policies
Tested 0 dependencies for known security issues using default Safety CLI policies
0 security issues found, 0 fixes suggested
$ uv pip compile pyproject.toml -o requirements.txt
Resolved 178 packages in 408ms
warning: The package `pytorch-lightning==2.0.0` does not have an extra named `jsonargparse`.
$ safety scan
Safety 3.0.1 scanning /Users/alex/repos/Backend
2024-02-24 18:22:46 UTC
Account: Alex Ley, [email protected]
Git branch: fix/github_actions_versions
Environment: development
Scan policy: None, using Safety CLI default policies
Python detected. Found 1 Python requirement file
Dependency vulnerabilities detected:
📝 requirements.txt:
...
The text was updated successfully, but these errors were encountered:
perhaps interestingly (or not) - this works - it scans my /Users/alex/miniconda/envs/py311/lib/python3.11/site-packages rather than my pyproject.toml file but that is also pretty ideal:
uv pip uninstall safety
uv pip uninstall dparse
uv pip install safety==2.3.5
safety check
Safety v2.3.5 is scanning for Vulnerabilities...
Scanning dependencies in your environment:
-> /Users/alex/miniconda/envs/py311/lib/python3.11/site-packages
this also works but scans even more stuff:
uv pip uninstall safety
uv pip uninstall dparse
uv pip install safety==3.0.1 --prerelease=allow
safety check
Safety v3.0.1 is scanning for Vulnerabilities...
Scanning dependencies in your environment:
-> /Users/alex/miniconda/envs/py311/bin
-> /Users/alex/miniconda/envs/py311/lib/python311.zip
-> /Users/alex/miniconda/envs/py311/lib/python3.11/lib-dynload
-> /Users/alex/miniconda/envs/py311/lib/python3.11
-> /Users/alex/repos/Backend
-> /Users/alex/miniconda/envs/py311/lib/python3.11/site-packages
Is this safety check a better command for me to run than safety scan for my use case (scanning my repo env dependencies)?
Alex-ley-scrub
changed the title
Safety CLI doesn't detect my pyproject.toml (or my env.yml) file with all its dependencies
Safety scan command doesn't detect my pyproject.toml (or my env.yml) file with all its dependencies
Feb 25, 2024
safety, version 3.0.1
py39, py310, py311
(same on all)MacOS Sonoma 14.3.1 (MacBook Pro M1)
Description
safety scan
out of the box on my local repo dev environmentuv pip compile pyproject.toml -o requirements.txt
and thensafety scan
it did work (workaround I will use for now)safety scan
or does it not support pyproject.toml or is it a bug?What I Did
The text was updated successfully, but these errors were encountered: