-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (83 loc) · 2.98 KB
/
Copy pathsecurity.yml
File metadata and controls
88 lines (83 loc) · 2.98 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Security and supply chain
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "17 3 * * 1"
permissions:
contents: read
security-events: write
jobs:
codeql:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: github/codeql-action/init@adfda868f108ac4222129de456ea554034a27db7 # v4
with:
languages: javascript-typescript
- uses: github/codeql-action/analyze@adfda868f108ac4222129de456ea554034a27db7 # v4
dependencies-and-secrets:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@dcedce43c6f43de0b836d1fe38946645c9c638dc # v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 11.17.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "24"
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm audit --audit-level high
- name: Check production licences
run: |
pnpm licenses list --prod --json | tee licenses.json
! grep -E '"(AGPL|SSPL)' licenses.json
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dependency-licences
path: licenses.json
image:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
load: true
pull: true
tags: muster:security
- uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
image-ref: muster:security
format: sarif
output: trivy.sarif
severity: HIGH,CRITICAL
ignore-unfixed: true
exit-code: "1"
- uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0
with:
image: muster:security
format: cyclonedx-json
output-file: muster-sbom.cdx.json
upload-artifact: false
- name: Generate provenance metadata and checksums
run: |
printf '{"commit":"%s","workflow":"%s","runId":"%s","image":"muster:security"}\n' \
"$GITHUB_SHA" "$GITHUB_WORKFLOW" "$GITHUB_RUN_ID" > provenance.json
sha256sum muster-sbom.cdx.json provenance.json > SHA256SUMS
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: security-artifacts
path: |
muster-sbom.cdx.json
provenance.json
SHA256SUMS
trivy.sarif