Last active
July 20, 2022 10:05
-
-
Save vfarcic/f4dd6a82a94d1bfdc838f339a93b7464 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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