-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 978 Bytes
/
image-scan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
# 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@v5
with:
go-version-file: go.mod
- uses: ko-build/setup-ko@v0.8
- run: |
ko build . --push=false --tarball ${RUNNER_TEMP}/image.tar \
--bare \
--platform linux/arm64 \
--sbom spdx
- name: trufflehog install via shell pipe
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 ${RUNNER_TEMP}/image.tar