Skip to content

Commit 9c4a9cf

Browse files
Rodrigo Braynerrbrayner
authored andcommitted
Add sbom scan
1 parent c87fec7 commit 9c4a9cf

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/security_analysis.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,26 @@ jobs:
4141
image: "localbuild/todo-app:v1"
4242
output-format: table
4343

44-
generate-sbom:
45-
name: Generate SBOM
44+
grype-sbom:
45+
name: Grype SBOM
4646
runs-on: ubuntu-latest
4747
steps:
4848
- name: Checkout source code
4949
uses: actions/checkout@v4
50-
- name: Download CycloneDX CLI
51-
run: |
52-
npm install --global @cyclonedx/cyclonedx-npm
53-
npx @cyclonedx/cyclonedx-npm --output-file bom.json
50+
- name: Install CycloneDX CLI
51+
run: npm install --global @cyclonedx/cyclonedx-npm
52+
- name: Generate SBOM file
53+
run: npx @cyclonedx/cyclonedx-npm --output-file sbom.json
54+
- name: Scan SBOM
55+
uses: anchore/scan-action@v3
56+
with:
57+
sbom: "sbom.json"
58+
output-format: table
5459
- name: Upload SBOM artifact
5560
uses: actions/upload-artifact@v3
5661
with:
5762
name: sbom
58-
path: bom.json
63+
path: sbom.json
5964

6065
bearer:
6166
name: Bearer

0 commit comments

Comments
 (0)