Git Product home page Git Product logo

snyk-tekton's Introduction

Snyk Tekton Tasks

A set of Tekton Tasks for using Snyk to check for vulnerabilities in your projects. A different task is required depending on which language or build tool you are using. We currently support:

Here's an example of using one of the Tasks, in this case to test a Go project:

Snykly in Tekton

An example pipeline definition using several of these tasks together:

apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: snyk-golang-pipeline
spec:
  params:
  - name: git-url
  - name: git-revision
    default: master
  workspaces:
  - name: shared-workspace
  tasks:
  - name: fetch-repository
    taskRef:
      name: git-clone
    workspaces:
    - name: output
      workspace: shared-workspace
    params:
    - name: url
      value: $(params.git-url)
    - name: revision
      value: $(params.git-revision)
  - name: check-for-vulnerabilities
    taskRef:
      name: snyk-golang
    runAfter:
    - fetch-repository
    workspaces:
    - name: source
      workspace: shared-workspace
  - name: check-for-container-vulnerabilities
    taskRef:
      name: snyk-container
    params:
    - name: image
      value: ubuntu:18.04
    - name: args
      value:
      - --severity-threshold=high
    runAfter:
    - fetch-repository
    workspaces:
    - name: source
      workspace: shared-workspace

  - name: check-for-misconfigurations
    taskRef:
      name: snyk-iac
    params:
    - name: file
      value: deployment.yaml
    runAfter:
    - fetch-repository
    workspaces:
    - name: source
      workspace: shared-workspace

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: snykly-source-pvc
spec:
  resources:
    requests:
      storage: 200M
  volumeMode: Filesystem
  accessModes:
  - ReadWriteOnce
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
  name: snykly
spec:
  params:
  - name: git-url
    value: https://github.com/garethr/snykly
  pipelineRef:
    name: snyk-golang-pipeline
  workspaces:
  - name: shared-workspace
    persistentvolumeclaim:
      claimName: snykly-source-pvc

See the individual Actions linked above for per-language instructions.

snyk-tekton's People

Contributors

garethr avatar

Watchers

 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.