Skip to content

Commit ba45fca

Browse files
authored
Enable codeql (#205)
* Enable codeql --------- Co-authored-by: Marvin Froeder <[email protected]>
1 parent e52908f commit ba45fca

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# ----------------------------------------------------------------------------
2+
# Copyright 2021 The Netty Project
3+
#
4+
# The Netty Project licenses this file to you under the Apache License,
5+
# version 2.0 (the "License"); you may not use this file except in compliance
6+
# with the License. You may obtain a copy of the License at:
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
# License for the specific language governing permissions and limitations
14+
# under the License.
15+
# ----------------------------------------------------------------------------
16+
# For most projects, this workflow file will not need changing; you simply need
17+
# to commit it to your repository.
18+
#
19+
# You may wish to alter this file to override the set of languages analyzed,
20+
# or to provide custom queries or build logic.
21+
name: "CodeQL"
22+
23+
on:
24+
push:
25+
branches: ["master", "querydsl-5.0.0"]
26+
pull_request:
27+
# The branches below must be a subset of the branches above
28+
branches: ["master", "querydsl-5.0.0"]
29+
schedule:
30+
- cron: '0 13 * * 3'
31+
32+
env:
33+
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryhandler.count=5 -Dmaven.wagon.httpconnectionManager.ttlSeconds=240
34+
35+
permissions:
36+
contents: read
37+
38+
jobs:
39+
analyze:
40+
permissions:
41+
actions: read # for github/codeql-action/init to get workflow details
42+
contents: read # for actions/checkout to fetch code
43+
security-events: write # for github/codeql-action/analyze to upload SARIF results
44+
name: Analyze
45+
runs-on: ubuntu-latest
46+
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
# Override automatic language detection by changing the below list
51+
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
52+
language: ['java']
53+
# Learn more...
54+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
55+
56+
steps:
57+
- name: Checkout repository
58+
uses: actions/checkout@v4
59+
60+
# Cache .m2/repository
61+
- name: Cache local Maven repository
62+
uses: actions/cache@v3
63+
continue-on-error: true
64+
with:
65+
path: ~/.m2/repository
66+
key: ${{ runner.os }}-maven-${{ matrix.language }} ${{ hashFiles('**/pom.xml') }}
67+
restore-keys: |
68+
${{ runner.os }}-maven-${{ matrix.language }}
69+
${{ runner.os }}-maven-
70+
71+
# Initializes the CodeQL tools for scanning.
72+
- name: Initialize CodeQL
73+
uses: github/codeql-action/init@v2
74+
with:
75+
languages: ${{ matrix.language }}
76+
# If you wish to specify custom queries, you can do so here or in a config file.
77+
# By default, queries listed here will override any specified in a config file.
78+
# Prefix the list here with "+" to use these queries and those in the config file.
79+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
80+
81+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
82+
# If this step fails, then you should remove it and run the build manually (see below)
83+
# - name: Autobuild
84+
# uses: github/codeql-action/autobuild@v2
85+
86+
# ℹ️ Command-line programs to run using the OS shell.
87+
# 📚 https://git.io/JvXDl
88+
89+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
90+
# and modify them (or add more) to build your code if your project
91+
# uses a compiled language
92+
- name: Setup Java JDK
93+
uses: actions/[email protected]
94+
with:
95+
distribution: 'temurin'
96+
java-version: '21'
97+
98+
- name: versions
99+
run: ./mvnw -v
100+
101+
- name: Compile project
102+
run: ./mvnw -B -ntp clean package -DskipTests=true -Dtoolchain.skip=true
103+
104+
- name: Perform CodeQL Analysis
105+
uses: github/codeql-action/analyze@v2

0 commit comments

Comments
 (0)