Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"check" command is deprecated. Seems that "scan" command offers a replacement #52

Open
thorroed opened this issue Jan 18, 2025 · 4 comments

Comments

@thorroed
Copy link
Contributor

upstream safety maintainers decided to deprecate the "check" command.

The following output is currently generated:

...
DEPRECATED: this command (check) has been DEPRECATED, and will be unsupported beyond 01 June 2024.

We highly encourage switching to the new scan command which is easier to use, more powerful, and can be set up to mimic the deprecated command if required.
...

@Lucas-C
Copy link
Owner

Lucas-C commented Jan 20, 2025

Thank you for the heads up @thorroed 👍

@Lucas-C
Copy link
Owner

Lucas-C commented Jan 20, 2025

It seems that the new scan command does not support the --file parameter anymore.
The closest equivalent is --target, that must be a project directory, not a requirements.txt file.

The --ignore parameter also does not exist in the new scan command.

This means that some refactoring works need to be undertaken.
I do not have the time to do this in the the foreseeable future, but I would be happy to merge PRs adding support for the scan command to this pre-commit hook.

Maybe the simplest solution would be to expose a second hook, python-safety-dependencies-scan.

@Lucas-C
Copy link
Owner

Lucas-C commented Jan 20, 2025

If the warning is annoying you, you can restrict the version of safety to be <=2.3.5:

safety<=2.3.5

@ev-agelos
Copy link

ev-agelos commented Jan 21, 2025

How? I mean your code depends on safety except if you mean to fork? Shouldnt you restrict it in your code, otherwise whoever uses your code it will fail anyway
Sorry i thought it was an error instead of warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants