Skip to content

eccenca/pre-commit-mirrors-trivy

 
 

Repository files navigation

build status

trivy-py-ecc

A python wrapper to provide a pip-installable trivy binary.

Internally this package provides a convenient way to download the pre-built trivy binary for your particular platform.

installation

pip install trivy-py-ecc

usage

After installation, the trivy binary should be available in your environment (or trivy.exe on windows).

As a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

- repo: https://github.com/eccenca/pre-commit-mirrors-trivy
  rev: v0.68.1.1
  hooks:
    - id: trivy-fs
      args:
        - --exit-code=1 # Example: set exit with code 1
        - --debug # Example: enable debug output
        - . # Example: scan current directory (provide DIR as last argument if `args` are used)
    - id: trivy-config

About

pre-commit hook that mirrors the trivy for usage as pre-commit language

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%