-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (47 loc) · 1.47 KB
/
analyze-module.yml
File metadata and controls
55 lines (47 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Analyze module
on:
workflow_dispatch:
release:
types: [published]
permissions:
packages: write
actions: read
contents: write
security-events: write
jobs:
generate-sbom:
name: Generate SBOM
runs-on: ubuntu-latest
strategy:
matrix:
directory: [don, ronzinante, sancho]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Update Dependency Graph
uses: aquasecurity/trivy-action@0.35.0
with:
scan-type: 'fs'
scan-ref: '${{ matrix.directory }}'
format: 'github'
- name: Generate Sarif Report
uses: aquasecurity/trivy-action@0.35.0
with:
scan-type: 'fs'
scan-ref: '${{ matrix.directory }}'
format: sarif
output: '${{ matrix.directory }}_windmill.sarif'
- name: Generate SBOM
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
uses: aquasecurity/trivy-action@0.35.0
with:
scan-type: 'fs'
scan-ref: '${{ matrix.directory }}'
format: cyclonedx
output: '${{ matrix.directory }}_windmill.cdx.json'
- name: Attach SBOM Release
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release --repo ${{ github.repository }} upload ${{ github.event.release.tag_name }} ${{ matrix.directory }}_windmill.cdx.json