Coder Social home page Coder Social logo

pre-commit-snyk's Introduction

Snyk pre-commit hooks

Stand With Ukraine GitHub release functional-tests pre-commit

  1. snyk-container
  2. snyk-iac
  3. snyk-test
  4. snyk-code
  5. snyk-log4shell

Description

Take into account that in case snyk is not installed locally it will be automatically installed globally. Here is the order of the attempts for this tool to install snyk:

  • brew, hence it should be installed.
  • scoop, hence it should be installed.
  • npm, hence it should be installed.
  • yarn, hence it should be installed.
  • Standalone installation, for this curl has to be installed.

If none of the tools above are installed then installation process will fail.

Documentation

<rev> in the examples below, is the latest revision tag from fabasoad/pre-commit-snyk repository.

snyk-container

repos:
  - repo: https://github.com/fabasoad/pre-commit-snyk
    rev: <rev>
    hooks:
      - id: snyk-container
        args: ["--exclude-base-image-vulns"]

args is optional. In this example you can skip base image vulnerabilities.

snyk-iac

repos:
  - repo: https://github.com/fabasoad/pre-commit-snyk
    rev: <rev>
    hooks:
      - id: snyk-iac
        args:["<folder>","--severity-threshold=<severity-level>"]

Where:

  • <folder> is the folder path that you want to test.

  • <severity-level> only vulnerabilities of the specified level or higher are reported.

    Options are:

    • low
    • medium
    • high
    • critical

snyk-test

repos:
  - repo: https://github.com/fabasoad/pre-commit-snyk
    rev: <rev>
    hooks:
      - id: snyk-test
        args: ["--severity-threshold=critical"]

snyk-code

repos:
  - repo: https://github.com/fabasoad/pre-commit-snyk
    rev: <rev>
    hooks:
      - id: snyk-code
        args: ["--severity-threshold=critical"]

snyk-log4shell

repos:
  - repo: https://github.com/fabasoad/pre-commit-snyk
    rev: <rev>
    hooks:
      - id: snyk-log4shell

pre-commit-snyk's People

Contributors

fabasoad avatar jezd-axyl avatar pre-commit-ci[bot] avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.