https://github.com/garethr/snyk-tekton
A set of Tekton Tasks for using Snyk to check for vulnerabilities in your pipelines
https://github.com/garethr/snyk-tekton
snyk tekton
Last synced: 5 days ago
JSON representation
A set of Tekton Tasks for using Snyk to check for vulnerabilities in your pipelines
- Host: GitHub
- URL: https://github.com/garethr/snyk-tekton
- Owner: garethr
- License: other
- Created: 2019-10-12T16:16:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-28T07:46:59.000Z (over 1 year ago)
- Last Synced: 2025-04-24T02:53:58.122Z (5 days ago)
- Topics: snyk, tekton
- Language: HTML
- Homepage: https://snyk.io
- Size: 158 KB
- Stars: 14
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Snyk Tekton Tasks

A set of [Tekton Tasks](https://tekton.dev/) for using [Snyk](https://snyk.io) 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:* [DotNet](dotnet)
* [Golang](golang)
* [Gradle](gradle)
* [Maven](maven)
* [Node](node)
* [PHP](php)
* [Python](python)
* [Ruby](ruby)
* [Scala](scala)
* [Swift](swift)
* [Contaners](container)
* [Infrastructure as Code](iac)Here's an example of using one of the Tasks, in this case to test a Go project:

An example pipeline definition using several of these tasks together:
```yaml
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.