Skip to content

Commit 28dabcf

Browse files
chore: add malware scans
1 parent 80d8218 commit 28dabcf

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: CI
22

3+
permissions:
4+
contents: read
5+
security-events: write
6+
37
on:
48
push:
59
branches:
@@ -33,3 +37,54 @@ jobs:
3337
# Only works if you set `reportOnFailure: true` in your vite config as specified above
3438
if: always()
3539
uses: davelosert/vitest-coverage-report-action@v2
40+
41+
semgrep_scan:
42+
name: Semgrep Security Scan
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
48+
- name: Run Semgrep (security-audit)
49+
uses: returntocorp/semgrep-action@v1
50+
with:
51+
config: p/security-audit
52+
generateSarif: true
53+
54+
- name: Upload Semgrep SARIF to Code Scanning
55+
uses: github/codeql-action/upload-sarif@v3
56+
with:
57+
sarif_file: semgrep.sarif
58+
59+
gitleaks_scan:
60+
name: Gitleaks Secret Scan
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout repository
64+
uses: actions/checkout@v4
65+
66+
- name: Run Gitleaks
67+
uses: gitleaks/gitleaks-action@v2
68+
with:
69+
args: detect --no-git -v --redact --exit-code 1
70+
71+
dependency_audit:
72+
name: Dependency Vulnerability Audit
73+
runs-on: ubuntu-latest
74+
strategy:
75+
matrix:
76+
node-version: [20.x]
77+
steps:
78+
- name: Checkout repository
79+
uses: actions/checkout@v4
80+
81+
- name: Setup Node.js
82+
uses: actions/setup-node@v4
83+
with:
84+
node-version: ${{ matrix.node-version }}
85+
86+
- name: Install dependencies
87+
run: yarn install --frozen-lockfile
88+
89+
- name: Audit dependencies (high severity and above)
90+
run: npx --yes audit-ci --package-manager yarn --severity high

0 commit comments

Comments
 (0)