-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (96 loc) · 2.83 KB
/
Copy pathcodeql-analysis.yml
File metadata and controls
111 lines (96 loc) · 2.83 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
###############################################################################
# NDSEP CodeQL SAST Analysis
# Runs GitHub's CodeQL static analysis on every PR and weekly schedule.
# Catches security vulnerabilities that manual review misses:
# - SQL injection, XSS, path traversal, insecure deserialization
# - Prototype pollution, regex denial-of-service, command injection
###############################################################################
name: "CodeQL SAST Analysis"
on:
push:
branches: [main, develop, staging]
pull_request:
branches: [main, develop]
schedule:
# Run weekly on Monday at 06:00 UTC
- cron: '0 6 * * 1'
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze-javascript:
name: CodeQL — JavaScript/TypeScript
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript-typescript
queries: security-extended
config: |
paths:
- server
- client/src
- shared
paths-ignore:
- node_modules
- '**/*.test.ts'
- '**/*.test.tsx'
- dist
- workers
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:javascript-typescript"
analyze-go:
name: CodeQL — Go Workers
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go
queries: security-extended
config: |
paths:
- workers/go
- name: Build Go workers
working-directory: workers/go
run: |
go mod download
for dir in cmd/*/; do
go build ./$dir 2>/dev/null || true
done
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:go"
analyze-python:
name: CodeQL — Python Workers
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
queries: security-extended
config: |
paths:
- workers/python
- orchestration
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:python"