Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Last active July 20, 2022 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save vfarcic/f4dd6a82a94d1bfdc838f339a93b7464 to your computer and use it in GitHub Desktop.
Save vfarcic/f4dd6a82a94d1bfdc838f339a93b7464 to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/f4dd6a82a94d1bfdc838f339a93b7464
########
# Snyk #
########
# Requirements:
# - Docker (Desktop)
# - Register in https://snyk.io/
######
# Do #
######
git clone \
https://github.com/vfarcic/devops-toolkit.git
cd devops-toolkit
git checkout snyk
snyk auth
snyk container test \
vfarcic/devops-toolkit-series:2.9.17 \
--file=Dockerfile
docker scan \
vfarcic/devops-toolkit-series:2.9.17 \
--file Dockerfile \
--accept-license
cat Dockerfile
# Change `nginx:stable-alpine` to `nginx:1.19.4-alpine` in Dockerfile
docker image build \
--tag vfarcic/devops-toolkit-series:2.9.99 \
.
docker scan \
vfarcic/devops-toolkit-series:2.9.99 \
--file Dockerfile \
--accept-license
open https://app.snyk.io
###########
# Destroy #
###########
git checkout master
docker image rm \
vfarcic/devops-toolkit-series:2.9.17
docker image rm \
vfarcic/devops-toolkit-series:2.9.99
# Go to *Settings* in the Snyk UI
# Select *Usage* from the left-hand menu
# Select all projects
# Choose *Delete* from *Bulk actions*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment