Skip to content

Commit 983eab0

Browse files
authored
build(compliance): add vulnerability scanning at release time and vulnerabilities verification (#2786)
Signed-off-by: Victoria <kaysa.vps@gmail.com>
1 parent 48e2789 commit 983eab0

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/contracts/chainloop-chainloop-github-release.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ spec:
1414
- ref: slsa-checks
1515
with:
1616
runner: GITHUB_ACTION
17+
- ref: vulnerability-management
18+
with:
19+
severity: "HIGH"

.github/workflows/release.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ jobs:
110110
# Install Syft
111111
wget --no-verbose https://raw.githubusercontent.com/anchore/syft/c43f4fb416c34c1c4b3997373689d8d4c0fb9b36/install.sh -O - | sh -s -- -b /usr/local/bin
112112
113+
- name: Install Grype
114+
run: curl -sSfL https://raw.githubusercontent.com/anchore/grype/fe186c3e986dda3cb4c5e90798f82c52aefcb4b8/install.sh | sh -s -- -b /usr/local/bin
115+
113116
- name: Run GoReleaser
114117
id: release
115118
uses: goreleaser/goreleaser-action@b508e2e3ef3b19d4e4146d4f8fb3ba9db644a757 # v3.2.0
@@ -167,6 +170,10 @@ jobs:
167170
168171
# Upload the SBOM to the release
169172
gh release upload ${{ github.ref_name }} /tmp/sbom-$material_name.cyclonedx.json --clobber
173+
174+
# Run Grype vulnerability scan and attest result
175+
grype --only-fixed -o sarif --file ./vuln-${container_name}.json $entry
176+
chainloop attestation add --name ${container_name}-vulnerability-report --value ./vuln-${container_name}.json --attestation-id ${{ env.ATTESTATION_ID }}
170177
fi
171178
done
172179

0 commit comments

Comments
 (0)