Skip to content

Tooling rehaul: introduce ARM64 release; use git tags instead of production branch for releases #90

Tooling rehaul: introduce ARM64 release; use git tags instead of production branch for releases

Tooling rehaul: introduce ARM64 release; use git tags instead of production branch for releases #90

Workflow file for this run

name: Trivy
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "19 7 * * 0"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
trivy:
name: 🔐 Trivy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with: { fetch-depth: 0 }
- name: Setup Go
uses: actions/setup-go@v4
with: { go-version: "1.20" }
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: "linux/amd64,linux/arm64"
- name: Run GoReleaser
id: goreleaser
uses: goreleaser/goreleaser-action@v5
with:
args: release --snapshot
env:
BUGSNAG_API_KEY: "REAL_KEY_NOT_NEEDED_HERE"
REPOSITORY_URL: "ghcr.io/spacelift-io/vcs-agent"
- name: Run Trivy vulnerability scanner (amd64)
uses: aquasecurity/trivy-action@master
with:
image-ref: "ghcr.io/spacelift-io/vcs-agent:${{ fromJson(steps.goreleaser.outputs.metadata).version }}-amd64"
format: "sarif"
output: "trivy-results-amd64.sarif"
severity: "CRITICAL,HIGH"
- name: Run Trivy vulnerability scanner (arm64)
uses: aquasecurity/trivy-action@master
with:
image-ref: "ghcr.io/spacelift-io/vcs-agent:${{ fromJson(steps.goreleaser.outputs.metadata).version }}-arm64"
format: "sarif"
output: "trivy-results-arm64.sarif"
severity: "CRITICAL,HIGH"
- name: Upload Trivy scan results to GitHub Security tab (amd64)
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "trivy-results-amd64.sarif"
category: "Trivy (amd64)"
- name: Upload Trivy scan results to GitHub Security tab (arm64)
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "trivy-results-arm64.sarif"
category: "Trivy (arm64)"