Add cve scan to PRs #14
Workflow file for this run
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: HMDA PR CVE Scan | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
cve-scan: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up docker build | |
uses: docker/setup-buildx-action@v3 | |
- name: Build image of hmda platform only | |
run: | | |
sbt "project hmda-platform" dockerPublishLocalSkipTests | |
continue-on-error: true | |
- name: Tag docker image | |
run: docker tag $(docker images --filter=reference="hmda/hmda-platform:latest" --format "{{.ID}}") hmda-cve/hmda-platform:pr-cve-scan | |
- name: Check image for CVEs | |
uses: docker/scout-action@v1 | |
with: | |
command: cves | |
image: hmda-cve/hmda-platform:pr-cve-scan | |
- name: Remove docker image | |
run: | | |
docker rmi hmda-cve/hmda-platform:pr-cve-scan |