Scan #8
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
name: Scan | |
on: | |
workflow_call: | |
inputs: | |
name_and_version: | |
description: 'Name and version of tool to scan, e.g. foo:0.1.0' | |
type: string | |
required: true | |
secrets: | |
DOCKERHUB_USER: | |
description: 'Docker Hub username' | |
required: true | |
DOCKERHUB_TOKEN: | |
description: 'Docker Hub token' | |
required: true | |
workflow_dispatch: | |
inputs: | |
name_and_version: | |
description: 'Name and version of tool to scan, e.g. foo:0.1.0' | |
type: string | |
required: true | |
concurrency: | |
group: ${{ github.workflow }}-${{ inputs.name_and_version }} | |
cancel-in-progress: true | |
jobs: | |
scout: | |
name: Scout | |
permissions: | |
security-events: write | |
pull-requests: write | |
packages: read | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: uniget-bot | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Analyze for critical and high CVEs | |
id: docker-scout-cves | |
uses: docker/scout-action@v0.23.4 | |
with: | |
command: cves | |
image: ghcr.io/${{ github.repository }}/${{ inputs.name_and_version }} | |
dockerhub-user: ${{ secrets.DOCKERHUB_USER }} | |
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }} | |
sarif-file: sarif.output.json | |
summary: true | |
- name: Upload SARIF result | |
id: upload-sarif | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: sarif.output.json |