-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.15 KB
/
Copy pathci.yml
File metadata and controls
45 lines (42 loc) · 1.15 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- run: npm ci --legacy-peer-deps
- run: npm run lint
- run: npm run typecheck
- run: npm test
- run: npm run build
- run: npm audit --audit-level=high
- name: Generate CycloneDX SBOM
run: npx --yes @cyclonedx/cyclonedx-npm --output-format JSON --output-file sbom.cdx.json
- uses: actions/upload-artifact@v7
with:
name: sbom
path: sbom.cdx.json
security-scan:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v7
- name: OSV-Scanner
uses: google/osv-scanner-action/osv-scanner-action@v2.3.8
with:
scan-args: --lockfile=package-lock.json
- name: Trivy filesystem scan
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: fs
scanners: vuln,secret,config