A pre-commit hook to check your Python dependencies against safety-db.
It checks all files containing requirements
in their name in the repo.
It also installs each requirements
file (and subsequently uninstalls) and runs safety on the resulting environment. This forces all unpinned packages in requirements files to a fixed version.
- repo: https://github.com/jsumnerPhD/pre-commit-hooks-safety
rev: v1.1.7
hooks:
- id: python-safety-dependencies-check-all
You'll need to pip install safety
beforehand:
- repo: local
hooks:
- id: python-safety-dependencies-check
entry: safety
args: [check, --full-report]
language: system
files: requirements