|
12 | 12 | name: "CodeQL"
|
13 | 13 |
|
14 | 14 | on:
|
15 |
| - push: |
16 |
| - branches: [ "main" ] |
17 |
| - pull_request: |
18 |
| - # The branches below must be a subset of the branches above |
19 |
| - branches: [ "main" ] |
20 |
| - schedule: |
21 |
| - # Runs at 22:21 on Monday. |
22 |
| - - cron: '21 22 * * 1' |
| 15 | + push: |
| 16 | + branches: ["main"] |
| 17 | + pull_request: |
| 18 | + # The branches below must be a subset of the branches above |
| 19 | + branches: ["main"] |
| 20 | + schedule: |
| 21 | + # Runs at 22:21 on Monday. |
| 22 | + - cron: "21 22 * * 1" |
23 | 23 |
|
24 | 24 | jobs:
|
25 |
| - analyze: |
26 |
| - name: Analyze |
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: [ 'javascript', 'python' ] |
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 |
42 |
| - |
43 |
| - steps: |
44 |
| - - name: Checkout repository |
45 |
| - uses: actions/checkout@v3 |
46 |
| - |
47 |
| - # Initializes the CodeQL tools for scanning. |
48 |
| - - name: Initialize CodeQL |
49 |
| - uses: github/codeql-action/init@v2 |
50 |
| - with: |
51 |
| - languages: ${{ matrix.language }} |
52 |
| - # If you wish to specify custom queries, you can do so here or in a config file. |
53 |
| - # By default, queries listed here will override any specified in a config file. |
54 |
| - # Prefix the list here with "+" to use these queries and those in the config file. |
55 |
| - |
56 |
| - # 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 |
57 |
| - # queries: security-extended,security-and-quality |
58 |
| - |
59 |
| - |
60 |
| - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). |
61 |
| - # If this step fails, then you should remove it and run the build manually (see below) |
62 |
| - - name: Autobuild |
63 |
| - uses: github/codeql-action/autobuild@v2 |
64 |
| - |
65 |
| - # βΉοΈ Command-line programs to run using the OS shell. |
66 |
| - # π See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
67 |
| - |
68 |
| - # If the Autobuild fails above, remove it and uncomment the following three lines. |
69 |
| - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
70 |
| - |
71 |
| - # - run: | |
72 |
| - # echo "Run, Build Application using script" |
73 |
| - # ./location_of_script_within_repo/buildscript.sh |
74 |
| - |
75 |
| - - name: Perform CodeQL Analysis |
76 |
| - uses: github/codeql-action/analyze@v2 |
77 |
| - with: |
78 |
| - category: "/language:${{matrix.language}}" |
| 25 | + analyze: |
| 26 | + name: Analyze |
| 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: ["javascript", "python"] |
| 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 |
| 42 | + |
| 43 | + steps: |
| 44 | + - name: Checkout repository |
| 45 | + uses: actions/checkout@v4 |
| 46 | + |
| 47 | + # Initializes the CodeQL tools for scanning. |
| 48 | + - name: Initialize CodeQL |
| 49 | + uses: github/codeql-action/init@v3 |
| 50 | + with: |
| 51 | + languages: ${{ matrix.language }} |
| 52 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 53 | + # By default, queries listed here will override any specified in a config file. |
| 54 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 55 | + |
| 56 | + # 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 |
| 57 | + # queries: security-extended,security-and-quality |
| 58 | + |
| 59 | + - name: Perform CodeQL Analysis |
| 60 | + uses: github/codeql-action/analyze@v3 |
| 61 | + with: |
| 62 | + category: "/language:${{matrix.language}}" |
0 commit comments