Skip to content

Commit f63494a

Browse files
committed
code ql update
1 parent 253f2fe commit f63494a

File tree

1 file changed

+72
-32
lines changed

1 file changed

+72
-32
lines changed
Lines changed: 72 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,86 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
112
name: "CodeQL"
213

314
on:
4-
workflow_dispatch:
515
push:
6-
branches: [dev, feature/6.0]
16+
branches: [ "dev", "feature/6.0" ]
717
pull_request:
818
# The branches below must be a subset of the branches above
9-
branches: [dev, feature/6.0]
19+
branches: [ "dev", "feature/6.0" ]
1020
schedule:
1121
- cron: '0 1 * * 4'
22+
workflow_dispatch:
1223

1324
jobs:
1425
analyze:
1526
name: Analyze
16-
runs-on: ubuntu-latest
27+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
28+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
29+
permissions:
30+
actions: read
31+
contents: read
32+
security-events: write
33+
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
language: [ 'java' ]
38+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
39+
# Use only 'java' to analyze code written in Java, Kotlin or both
40+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
41+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
1742

1843
steps:
19-
- name: Checkout repository
20-
uses: actions/checkout@v3
21-
22-
# Initializes the CodeQL tools for scanning.
23-
- name: Initialize CodeQL
24-
uses: github/codeql-action/init@v2
25-
# Override language selection by uncommenting this and choosing your languages
26-
with:
27-
languages: java
28-
29-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
30-
# If this step fails, then you should remove it and run the build manually (see below)
31-
- name: Autobuild
32-
uses: github/codeql-action/autobuild@v2
33-
34-
# ℹ️ Command-line programs to run using the OS shell.
35-
# 📚 https://git.io/JvXDl
36-
37-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
38-
# and modify them (or add more) to build your code if your project
39-
# uses a compiled language
40-
41-
#- run: |
42-
# make bootstrap
43-
# make release
44-
45-
- name: Perform CodeQL Analysis
46-
uses: github/codeql-action/analyze@v2
44+
- name: Checkout repository
45+
uses: actions/checkout@v3
46+
47+
- name: Set up JDK
48+
uses: actions/setup-java@v3
49+
with:
50+
java-version: 20
51+
distribution: 'temurin'
52+
cache: gradle
53+
54+
# Initializes the CodeQL tools for scanning.
55+
- name: Initialize CodeQL
56+
uses: github/codeql-action/init@v2
57+
with:
58+
languages: ${{ matrix.language }}
59+
# If you wish to specify custom queries, you can do so here or in a config file.
60+
# By default, queries listed here will override any specified in a config file.
61+
# Prefix the list here with "+" to use these queries and those in the config file.
62+
63+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
64+
# queries: security-extended,security-and-quality
65+
66+
67+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
68+
# If this step fails, then you should remove it and run the build manually (see below)
69+
# - name: Autobuild
70+
# uses: github/codeql-action/autobuild@v2
71+
72+
# ℹ️ Command-line programs to run using the OS shell.
73+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
74+
75+
# If the Autobuild fails above, remove it and uncomment the following three lines.
76+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
77+
78+
- name: Grant execute permission for gradlew
79+
run: chmod +x gradlew
80+
- name: Build with Gradle
81+
run: ./gradlew build
82+
83+
- name: Perform CodeQL Analysis
84+
uses: github/codeql-action/analyze@v2
85+
with:
86+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)