Skip to content

Commit be4f37b

Browse files
author
hbird-pre-alpha-test-v3[bot]
authored
Update code scan workflow
1 parent d598523 commit be4f37b

1 file changed

Lines changed: 59 additions & 3 deletions

File tree

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,63 @@
11
name: DigiCert Code Scan
2-
on: workflow_dispatch
2+
3+
on:
4+
workflow_dispatch:
5+
36
jobs:
4-
noop:
7+
analyze:
8+
name: Analyze (${{ matrix.language }})
9+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
10+
11+
permissions:
12+
# required for all workflows
13+
security-events: write
14+
15+
# required to fetch internal or private CodeQL packs
16+
packages: read
17+
18+
# only required for workflows in private repositories
19+
actions: read
20+
contents: read
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
# - This will be replaced with the generated language and build mode content on runtime
27+
- language: Python
28+
build-mode: none
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
# Initializes the CodeQL tools for scanning.
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v3
36+
with:
37+
languages: ${{ matrix.language }}
38+
build-mode: ${{ matrix.build-mode }}
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v3
42+
with:
43+
category: '/language:${{matrix.language}}'
44+
sbom:
45+
name: Generate SBOM
546
runs-on: ubuntu-latest
647
steps:
7-
- run: echo "This is just a placeholder"
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
51+
- name: Run Trivy to generate SBOM
52+
uses: aquasecurity/trivy-action@0.33.1
53+
with:
54+
scan-type: 'fs'
55+
format: 'cyclonedx'
56+
output: 'sbom-cdxgen.cyclonedx.json'
57+
58+
- name: Upload SBOM as artifact
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: sbom-cdxgen
62+
path: |
63+
sbom-cdxgen.cyclonedx.json

0 commit comments

Comments
 (0)