ci: Trivy gate on the dependency lockfiles before the APK is built and released, SBOM to Dependency-Track
build / build (push) Failing after 17s
build / build (push) Failing after 17s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
44634d6b7e
commit
d570ba70ed
1 file changed
+33
@@ -19,6 +19,11 @@ name: build
|
||||
push:
|
||||
branches: [tth]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
skip_trivy:
|
||||
description: "skip the Trivy gate (EMERGENCY, logged)"
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
concurrency:
|
||||
group: build
|
||||
@@ -87,6 +92,21 @@ jobs:
|
||||
flutter pub get
|
||||
flutter test --no-pub -r failures-only
|
||||
|
||||
# Trivy gate (tth-pub/ci-actions): a fixable HIGH/CRITICAL in the
|
||||
# dependencies (pubspec.lock from the pub get above, Podfile/SwiftPM
|
||||
# locks) or a secret in the tree = no APK, no release. Accepted risks
|
||||
# with a reason and expiry in .trivyignore.yaml. No Docker in this
|
||||
# container, so the action runs its checksum-verified Trivy binary.
|
||||
# mode: warn = phase 1 (report only), block = phase 2.
|
||||
- name: Trivy gate
|
||||
id: trivy
|
||||
if: steps.rel.outputs.needed == 'true'
|
||||
uses: https://git.rfa.cz/tth-pub/ci-actions/trivy-gate@v1.1
|
||||
with:
|
||||
scan-type: fs
|
||||
mode: warn
|
||||
skip: ${{ inputs.skip_trivy && 'true' || 'false' }}
|
||||
|
||||
- name: Build signed APK
|
||||
if: steps.rel.outputs.needed == 'true'
|
||||
id: apk
|
||||
@@ -159,6 +179,19 @@ jobs:
|
||||
echo "removed $tag"
|
||||
done
|
||||
|
||||
# SBOM of the released dependencies to Dependency-Track from the same
|
||||
# scan; a DT outage (or a missing key) does not fail the release.
|
||||
- name: SBOM to Dependency-Track
|
||||
if: steps.rel.outputs.needed == 'true'
|
||||
uses: https://git.rfa.cz/tth-pub/ci-actions/dtrack-sbom@v1.1
|
||||
with:
|
||||
report: ${{ steps.trivy.outputs.report }}
|
||||
url: https://dtrack.grg
|
||||
api-key: ${{ secrets.DTRACK_API_KEY }}
|
||||
ca-pem: ${{ vars.RFA_CA_PEM }}
|
||||
project: meshcore-open
|
||||
version: tth
|
||||
|
||||
- name: Close failure issue
|
||||
if: success()
|
||||
env:
|
||||
|
||||
Reference in new issue
Block a user