-
-
Notifications
You must be signed in to change notification settings - Fork 5
134 lines (112 loc) · 3.37 KB
/
codeql.yml
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: "CodeQL"
permissions: {}
on:
push:
branches: ["master", "develop", "sf-live", "sf-qa"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["master", "develop"]
schedule:
- cron: "34 18 * * 2"
jobs:
analyze-javascript:
name: Analyze JavaScript
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript
config-file: ./.github/codeql/codeql-javascript-config.yml
dependency-caching: true
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
analyze-csharp:
name: Analyze C#
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
matrix:
dotnet_version: ["8.0.x"]
node_version: ["22.13.0"]
npm_version: ["10.9.2"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Deps: .NET"
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{matrix.dotnet_version}}
cache: true
cache-dependency-path: src/SIL.XForge.Scripture/packages.lock.json
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: "npm"
cache-dependency-path: |
src/SIL.XForge.Scripture/ClientApp/package-lock.json
src/RealtimeServer/package-lock.json
- name: Upgrade npm
run: npm install -g npm@${{matrix.npm_version}}
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: csharp
queries: security-and-quality
dependency-caching: true
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
upload: False
output: sarif-results
- name: filter-sarif
uses: advanced-security/filter-sarif@v1
with:
patterns: |
-**/*Tests.cs:cs/hardcoded-credentials
input: sarif-results/csharp.sarif
output: sarif-results/csharp.sarif
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-results/csharp.sarif
analyze-python:
name: Analyze Python
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python
queries: security-and-quality
dependency-caching: true
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3