-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.49 KB
/
anchore-sbom.yml
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
38
39
40
41
42
43
44
45
46
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow checks out code, builds an image, performs a container image
# scan with Anchore's Syft tool, and uploads the results to the GitHub Dependency
# submission API.
# For more information on the Anchore sbom-action usage
# and parameters, see https://github.com/anchore/sbom-action. For more
# information about the Anchore SBOM tool Syft, see
# https://github.com/anchore/syft
name: Anchore SBOM Scan
on:
push:
branches: [ main ]
permissions:
contents: write
jobs:
Anchore-Build-Scan:
permissions:
contents: write # required to upload to the API
runs-on: windows-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
# - name: Build the Docker image
# run: docker build . --file Dockerfile --tag localbuild/testimage:latest
- name: Scan the workspace and upload dependency results
uses: anchore/sbom-action@main
with:
path: .
artifact-name: workspace.spdx.json
# dependency-snapshot: true
- name: Scan an image and upload dependency results
uses: anchore/sbom-action@main
env:
SYFT_SCOPE: all-layers
with:
image: eclipse-temurin:8u332-b09-jre-windowsservercore-ltsc2022
artifact-name: image.spdx.json
# dependency-snapshot: true