42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Verify image for vulnerabilities
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 */1 * *"
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
env:
|
|
# Use docker.io for Docker Hub if empty
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
verify_ee_image_vulnerabilities:
|
|
runs-on: ubicloud
|
|
permissions: write-all
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Analyze for critical and high CVEs
|
|
id: docker-scout-cves
|
|
if: ${{ github.event_name != 'pull_request_target' }}
|
|
uses: docker/scout-action@v1
|
|
with:
|
|
command: cves
|
|
only-severities: critical,high
|
|
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:main
|
|
sarif-file: sarif.output.json
|
|
summary: true
|
|
dockerhub-user: windmilllabs
|
|
dockerhub-password: ${{ secrets.DOCKER_PAT }}
|
|
|
|
- name: Upload SARIF result
|
|
id: upload-sarif
|
|
if: ${{ github.event_name != 'pull_request_target' }}
|
|
uses: github/codeql-action/upload-sarif@v2
|
|
with:
|
|
sarif_file: sarif.output.json
|