|
1 | | -name: "CodeQL" |
| 1 | +# GitHub Actions for CodeQL Scanning |
| 2 | + |
| 3 | +name: "CodeQL Advanced" |
2 | 4 |
|
3 | 5 | on: |
4 | 6 | push: |
5 | | - branches: [ 'main' ] |
6 | 7 | pull_request: |
7 | | - # The branches below must be a subset of the branches above |
8 | | - branches: [ 'main' ] |
| 8 | + workflow_dispatch: |
9 | 9 | schedule: |
10 | | - - cron: '23 3 * * 5' |
| 10 | + # https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule |
| 11 | + - cron: '0 5 * * *' |
| 12 | + |
| 13 | +permissions: read-all |
11 | 14 |
|
12 | 15 | jobs: |
13 | | - analyze: |
14 | | - name: Analyze |
15 | | - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
16 | | - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} |
| 16 | + codeql-analysis-call: |
17 | 17 | permissions: |
18 | 18 | actions: read |
19 | 19 | contents: read |
20 | 20 | security-events: write |
21 | | - |
22 | | - strategy: |
23 | | - fail-fast: false |
24 | | - matrix: |
25 | | - language: [ 'java' ] |
26 | | - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] |
27 | | - # Use only 'java' to analyze code written in Java, Kotlin or both |
28 | | - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both |
29 | | - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support |
30 | | - |
31 | | - steps: |
32 | | - - name: Checkout repository |
33 | | - uses: actions/checkout@v3 |
34 | | - |
35 | | - - if: matrix.language == 'java' |
36 | | - name: Set up JDK 17 |
37 | | - uses: actions/setup-java@v3 |
38 | | - with: |
39 | | - java-version: '17' |
40 | | - distribution: 'adopt' |
41 | | - |
42 | | - # Initializes the CodeQL tools for scanning. |
43 | | - - name: Initialize CodeQL |
44 | | - uses: github/codeql-action/init@v3 |
45 | | - with: |
46 | | - languages: ${{ matrix.language }} |
47 | | - # If you wish to specify custom queries, you can do so here or in a config file. |
48 | | - # By default, queries listed here will override any specified in a config file. |
49 | | - # Prefix the list here with "+" to use these queries and those in the config file. |
50 | | - |
51 | | - # 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 |
52 | | - # queries: security-extended,security-and-quality |
53 | | - |
54 | | - |
55 | | - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). |
56 | | - # If this step fails, then you should remove it and run the build manually (see below) |
57 | | - - name: Autobuild |
58 | | - uses: github/codeql-action/autobuild@v3 |
59 | | - |
60 | | - # ℹ️ Command-line programs to run using the OS shell. |
61 | | - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
62 | | - |
63 | | - # If the Autobuild fails above, remove it and uncomment the following three lines. |
64 | | - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
65 | | - |
66 | | - # - run: | |
67 | | - # echo "Run, Build Application using script" |
68 | | - # ./location_of_script_within_repo/buildscript.sh |
69 | | - |
70 | | - - name: Perform CodeQL Analysis |
71 | | - uses: github/codeql-action/analyze@v3 |
72 | | - with: |
73 | | - category: "/language:${{matrix.language}}" |
| 21 | + uses: spring-io/github-actions/.github/workflows/codeql-analysis.yml@1 |
0 commit comments