From 55cbb63840ad206423381dc0414861249c4cd5c5 Mon Sep 17 00:00:00 2001 From: amunars <73576540+amunars@users.noreply.github.com> Date: Thu, 1 Aug 2024 22:23:02 -0400 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 41c8f92..1ae28ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,3 +28,31 @@ jobs: with: name: bandit-findings path: bandit-report-albertomunar.json + + image_scan: + name: Build Image and Run Image Scan + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Docker + uses: docker-practice/actions-setup-docker@v1 + with: + docker_version: '20.10.7' + + - name: Build Docker Image + run: docker build -f Dockerfile -t myapp:latest . + + - name: Docker Scout Scan + run: | + curl -fsSL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh -o install-scout.sh + sh install-scout.sh + echo ${{ secrets.REPO_PWD }} | docker login -u ${{ secrets.REPO_USER }} --password-stdin + docker scout quickview + docker scout cves + + + +