|
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 |
| -# |
12 | 1 | name: "CodeQL"
|
13 | 2 |
|
14 | 3 | on:
|
|
22 | 11 | jobs:
|
23 | 12 | analyze:
|
24 | 13 | name: Analyze
|
25 |
| - # Runner size impacts CodeQL analysis time. To learn more, please see: |
26 |
| - # - https://gh.io/recommended-hardware-resources-for-running-codeql |
27 |
| - # - https://gh.io/supported-runners-and-hardware-resources |
28 |
| - # - https://gh.io/using-larger-runners |
29 |
| - # Consider using larger runners for possible analysis time improvements. |
30 | 14 | runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
31 | 15 | timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
32 | 16 | permissions:
|
33 |
| - # required for all workflows |
34 | 17 | security-events: write
|
35 | 18 |
|
36 |
| - # only required for workflows in private repositories |
37 | 19 | actions: read
|
38 | 20 | contents: read
|
39 | 21 |
|
40 | 22 | strategy:
|
41 | 23 | fail-fast: false
|
42 | 24 | matrix:
|
43 | 25 | language: [ 'java-kotlin' ]
|
44 |
| - # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] |
45 |
| - # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both |
46 |
| - # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both |
47 |
| - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support |
48 | 26 |
|
49 | 27 | steps:
|
50 |
| - - name: Checkout repository |
51 |
| - uses: actions/checkout@v4 |
52 |
| - |
53 |
| - - name: Setup Java |
54 |
| - uses: actions/setup-java@v4 |
55 |
| - with: |
56 |
| - java-version: 17 |
57 |
| - distribution: 'temurin' |
58 |
| - |
59 |
| - # Initializes the CodeQL tools for scanning. |
60 |
| - - name: Initialize CodeQL |
61 |
| - uses: github/codeql-action/init@v3 |
62 |
| - with: |
63 |
| - languages: ${{ matrix.language }} |
64 |
| - # If you wish to specify custom queries, you can do so here or in a config file. |
65 |
| - # By default, queries listed here will override any specified in a config file. |
66 |
| - # Prefix the list here with "+" to use these queries and those in the config file. |
67 |
| - |
68 |
| - # 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 |
69 |
| - # queries: security-extended,security-and-quality |
70 |
| - |
71 |
| - |
72 |
| - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). |
73 |
| - # If this step fails, then you should remove it and run the build manually (see below) |
74 |
| - - name: Autobuild |
75 |
| - uses: github/codeql-action/autobuild@v3 |
76 |
| - |
77 |
| - # ℹ️ Command-line programs to run using the OS shell. |
78 |
| - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
79 |
| - |
80 |
| - # If the Autobuild fails above, remove it and uncomment the following three lines. |
81 |
| - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
82 |
| - |
83 |
| - # - run: | |
84 |
| - # echo "Run, Build Application using script" |
85 |
| - # ./location_of_script_within_repo/buildscript.sh |
86 |
| - |
87 |
| - - name: Perform CodeQL Analysis |
88 |
| - uses: github/codeql-action/analyze@v3 |
89 |
| - with: |
90 |
| - category: "/language:${{matrix.language}}" |
| 28 | + - name: Checkout repository |
| 29 | + uses: actions/checkout@v4 |
| 30 | + |
| 31 | + - name: Setup Java |
| 32 | + uses: actions/setup-java@v4 |
| 33 | + with: |
| 34 | + cache: maven |
| 35 | + distribution: 'temurin' |
| 36 | + java-version: 21 |
| 37 | + |
| 38 | + - name: Initialize CodeQL |
| 39 | + uses: github/codeql-action/init@v3 |
| 40 | + with: |
| 41 | + languages: ${{ matrix.language }} |
| 42 | + queries: +security-and-quality |
| 43 | + |
| 44 | + - name: Autobuild |
| 45 | + uses: github/codeql-action/autobuild@v3 |
| 46 | + |
| 47 | + - name: Perform CodeQL Analysis |
| 48 | + uses: github/codeql-action/analyze@v3 |
| 49 | + with: |
| 50 | + category: "/language:${{matrix.language}}" |
0 commit comments