Skip to content

A pre-commit hook to check your Python dependencies against safety-db

License

Notifications You must be signed in to change notification settings

jsumnerPhD/pre-commit-hooks-safety

 
 

Repository files navigation

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.

Usage

-   repo: https://github.com/jsumnerPhD/pre-commit-hooks-safety
    rev: v1.1.7
    hooks:
    -   id: python-safety-dependencies-check-all

Alternative local hook

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

About

A pre-commit hook to check your Python dependencies against safety-db

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%