Skip to content

SCA/Scout

SCA/Scout #1

Workflow file for this run

## Scan a docker image -> get a SARIF/SBOM report
name: SCA/Scout
on:
workflow_dispatch:
inputs:
docker_image:
description: 'The Docker image to scan'
required: true
default: 'appsecco/dvna:sqlite'
# env:
# REGISTRY: ghcr.io
# IMAGE_NAME: ${{ github.repository }}
# SHA: ${{ github.event.pull_request.head.sha || github.event.after }}
jobs:
scout:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Login to GHCR
# uses: docker/login-action@v3
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# Pull the github input image or use the default
- name: Pull the image
run: docker pull ${{ github.event.inputs.docker_image }}
- name: Docker Scout
uses: docker/scout-action@v1
with:
command: cves,recommendations,compare,sbom
image: ${{ github.event.inputs.docker_image }}
#only-severities: critical,high # only show critical and high CVEs
#only-fixed: true # filter to fixed CVEs
exit-code: false # fail or not based on CVEs found?
sarif-file: sca_scout.sarif
output: sbom_scout.spdx.json
format: spdx
- name: Upload SBOM file as an artifact
uses: actions/upload-artifact@v4
with:
name: sbom_scout.spdx.json
path: sbom_scout.spdx.json
- name: Upload SARIF file as an artifact
uses: actions/upload-artifact@v4
with:
name: sca_scout.sarif
path: sca_scout.sarif
# Only available on Github Enterprise or public repositories
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sca_scout.sarif
category: Security/SCA
# - name: SBOM upload
# uses: advanced-security/[email protected]