File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -233,3 +233,47 @@ jobs:
233233 - name : Stop docker container
234234 if : always()
235235 run : docker stop rippled-service
236+
237+ # Scans dependencies for CRITICAL/HIGH vulnerabilities using SBOM and Trivy (same flow as release.yml).
238+ vulnerability-scan :
239+ runs-on : ubuntu-latest
240+ timeout-minutes : 10
241+ steps :
242+ - uses : actions/checkout@v4
243+ with :
244+ ref : ${{ env.GIT_REF }}
245+ fetch-depth : 0
246+
247+ - name : Use Node.js 24.x
248+ uses : actions/setup-node@v4
249+ with :
250+ node-version : 24.x
251+
252+ - name : Setup npm version 10
253+ run : |
254+ npm i -g npm@10 --registry=https://registry.npmjs.org
255+
256+ - name : Install Dependencies
257+ run : npm ci
258+
259+ - name : Install cyclonedx-npm
260+ run : npm install -g @cyclonedx/cyclonedx-npm@4.0.2
261+
262+ - name : Generate CycloneDX SBOM
263+ run : cyclonedx-npm --output-format json --output-file sbom.json
264+
265+ - name : Scan SBOM for vulnerabilities using Trivy
266+ uses : aquasecurity/trivy-action@0.28.0
267+ with :
268+ scan-type : sbom
269+ scan-ref : sbom.json
270+ format : table
271+ exit-code : 0 # TODO: Change to 1 to fail CI on vulnerabilities
272+ output : vuln-report.txt
273+ severity : CRITICAL,HIGH
274+
275+ - name : Print vulnerability report
276+ if : always()
277+ run : |
278+ echo "=== Vulnerability Scan Report ==="
279+ cat vuln-report.txt
You can’t perform that action at this time.
0 commit comments