Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 21c8c6f

Browse files
committed
ci: Add automated security scanning workflow
Implements: - Secret scanning with TruffleHog (catches leaked credentials) - Dependency review on pull requests (blocks vulnerable dependencies) - CodeQL analysis (finds security vulnerabilities in code) Runs on: - Every push to main/develop - Every pull request - Daily at 2 AM UTC
1 parent 36e5051 commit 21c8c6f

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Security Scanning
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
schedule:
9+
# Run daily at 2 AM UTC
10+
- cron: '0 2 * * *'
11+
12+
permissions:
13+
contents: read
14+
security-events: write
15+
pull-requests: write
16+
17+
jobs:
18+
# Secret scanning using TruffleHog
19+
secret-scanning:
20+
name: Secret Scanning
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: TruffleHog OSS
29+
uses: trufflesecurity/trufflehog@main
30+
with:
31+
path: ./
32+
base: ${{ github.event.repository.default_branch }}
33+
head: HEAD
34+
extra_args: --debug --only-verified
35+
36+
# Dependency review on pull requests
37+
dependency-review:
38+
name: Dependency Review
39+
runs-on: ubuntu-latest
40+
if: github.event_name == 'pull_request'
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@v4
44+
45+
- name: Dependency Review
46+
uses: actions/dependency-review-action@v4
47+
with:
48+
fail-on-severity: moderate
49+
50+
# CodeQL security analysis
51+
codeql-analysis:
52+
name: CodeQL Analysis
53+
runs-on: ubuntu-latest
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
language: [ 'javascript', 'python' ]
58+
steps:
59+
- name: Checkout code
60+
uses: actions/checkout@v4
61+
62+
- name: Initialize CodeQL
63+
uses: github/codeql-action/init@v3
64+
with:
65+
languages: ${{ matrix.language }}
66+
67+
- name: Autobuild
68+
uses: github/codeql-action/autobuild@v3
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v3
72+
with:
73+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)