Skip to content

Update package.json #10

Update package.json

Update package.json #10

name: "Snyk Container Test"
on:
push:
branches:
- master
jobs:
Pipeline-Job:
# Configure Environment
name: 'Snyk Test'
runs-on: ubuntu-latest
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
steps:
# Checkout Code
- name: Checkout Code
uses: actions/checkout@v1
# Install and Authenticate to Snyk
- name: Install Snyk & Authenticate
run: |
sudo npm install -g snyk
snyk auth ${SNYK_TOKEN}
# Docker Build
- name: Build Container
run: |
docker build . -t goof
# Run Snyk Container
- name: Run Snyk Container
run: |
snyk container test --file=Dockerfile goof --sarif --severity-threshold=high > results.sarif
snyk container monitor goof
continue-on-error: true
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: results.sarif
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
#
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
#
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Build and push
# id: docker_build
# uses: docker/build-push-action@v2
# with:
# push: true
# tags: michaelbraunbass/goof:main