Skip to content

Add image scanning

Add image scanning #1

Workflow file for this run

---
# Copyright The Linux Foundation and each contributor to LFX.
# SPDX-License-Identifier: MIT
name: Image Scan
"on":
pull_request: null
permissions:
contents: read
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
publish:
name: Image Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.22.x'
- uses: ko-build/setup-ko@v0.6
- run: |
ko build . --platform linux/amd64,linux/arm64 --sbom spdx --tarball image.tar --push=false
- run: |
curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh \
| sh -s -- -b /usr/local/bin
- run: |
trufflehog --github-actions --log-level 3 filesystem image.tar