forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 3
209 lines (191 loc) · 6.45 KB
/
Copy pathcodeql.yml
File metadata and controls
209 lines (191 loc) · 6.45 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: "CodeQL"
on:
push:
branches: [master]
paths:
- "**/*.gradle"
- "**/*.gradle.kts"
- "**/*.java"
- "**/*.js"
- "**/*.jsx"
- "**/*.kt"
- "**/*.kts"
- "**/*.py"
- "**/*.ts"
- "**/*.tsx"
- ".github/actions/**/action.yml"
- ".github/actions/**/action.yaml"
- ".github/codeql/**"
- ".github/workflows/codeql.yml"
- "buildSrc/**"
- "gradle/**"
- "gradle.properties"
- "settings.gradle"
- "settings.gradle.kts"
pull_request:
branches: [master]
schedule:
# Run weekly on Monday at 00:00 Pacific Time
- cron: "0 0 * * 1"
timezone: "America/Los_Angeles"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-24.04
permissions:
contents: read
pull-requests: read
outputs:
actions: ${{ steps.changes.outputs.actions }}
java: ${{ steps.changes.outputs.java }}
javascript: ${{ steps.changes.outputs.javascript }}
python: ${{ steps.changes.outputs.python }}
steps:
- name: Checkout repository
if: github.event_name == 'push'
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Detect changed ecosystems
id: changes
if: github.event_name != 'schedule'
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
with:
filters: |
actions:
- '.github/actions/**/action.yml'
- '.github/actions/**/action.yaml'
- '.github/codeql/**'
- '.github/workflows/**/*.yml'
- '.github/workflows/**/*.yaml'
java:
- '**/*.gradle'
- '**/*.gradle.kts'
- '**/*.java'
- '**/*.kt'
- '**/*.kts'
- '.github/codeql/**'
- '.github/workflows/codeql.yml'
- 'buildSrc/**'
- 'gradle/**'
- 'gradle.properties'
- 'settings.gradle'
- 'settings.gradle.kts'
javascript:
- '**/*.js'
- '**/*.jsx'
- '**/*.ts'
- '**/*.tsx'
- '.github/codeql/**'
- '.github/workflows/codeql.yml'
python:
- '**/*.py'
- '.github/codeql/**'
- '.github/workflows/codeql.yml'
analyze-java-kotlin:
name: Analyze Java/Kotlin
needs: changes
if: github.event_name == 'schedule' || needs.changes.outputs.java == 'true'
runs-on: linux-24.04-large # Custom runner, defined in GitHub org settings
timeout-minutes: 120
permissions:
security-events: write
contents: read
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install Java environment
uses: ./.github/actions/install-java-environment
with:
gradle_cache_read_only: true
- name: Initialize CodeQL
uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
with:
languages: java-kotlin
build-mode: manual
config-file: ./.github/codeql/codeql-config.yml
- name: Build (compile only, continue past failures)
# Preserve partial extraction when an unrelated monorepo module fails.
continue-on-error: true
run: |
./gradlew compileJava compileKotlin \
--continue \
-x test \
-x integrationTestJava \
-x performanceTestJava \
-Dorg.gradle.jvmargs="-Xmx4g"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
with:
category: "/language:java-kotlin"
analyze-python:
name: Analyze Python
needs: changes
if: github.event_name == 'schedule' || needs.changes.outputs.python == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
security-events: write
contents: read
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Initialize CodeQL
uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
with:
languages: python
build-mode: none
config-file: ./.github/codeql/codeql-config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
with:
category: "/language:python"
analyze-javascript-typescript:
name: Analyze JavaScript/TypeScript
needs: changes
if: github.event_name == 'schedule' || needs.changes.outputs.javascript == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
security-events: write
contents: read
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Initialize CodeQL
uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
with:
languages: javascript-typescript
build-mode: none
config-file: ./.github/codeql/codeql-config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
with:
category: "/language:javascript-typescript"
analyze-actions:
name: Analyze GitHub Actions
needs: changes
if: github.event_name == 'schedule' || needs.changes.outputs.actions == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
security-events: write
contents: read
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Initialize CodeQL
uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
with:
languages: actions
build-mode: none
config-file: ./.github/codeql/codeql-config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
with:
category: "/language:actions"