|  | 
| 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 | 
|  | 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 | 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 | 
|  | 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 | 42 | 
 | 
| 43 |  | -    steps: | 
| 44 |  | -    - name: Checkout repository | 
| 45 |  | -      uses: actions/checkout@v3 | 
|  | 43 | +        steps: | 
|  | 44 | +            - name: Checkout repository | 
|  | 45 | +              uses: actions/checkout@v4 | 
| 46 | 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. | 
|  | 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 | 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 | 
|  | 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 | 58 | 
 | 
|  | 59 | +            # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). | 
|  | 60 | +            # If this step fails, then you should remove it and run the build manually (see below) | 
|  | 61 | +            - name: Autobuild | 
|  | 62 | +              uses: github/codeql-action/autobuild@v2 | 
| 59 | 63 | 
 | 
| 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 | +            # ℹ️ Command-line programs to run using the OS shell. | 
|  | 65 | +            # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | 
| 64 | 66 | 
 | 
| 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 | +            #   If the Autobuild fails above, remove it and uncomment the following three lines. | 
|  | 68 | +            #   modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | 
| 67 | 69 | 
 | 
| 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 | +            # - run: | | 
|  | 71 | +            #     echo "Run, Build Application using script" | 
|  | 72 | +            #     ./location_of_script_within_repo/buildscript.sh | 
| 70 | 73 | 
 | 
| 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}}" | 
|  | 74 | +            - name: Perform CodeQL Analysis | 
|  | 75 | +              uses: github/codeql-action/analyze@v2 | 
|  | 76 | +              with: | 
|  | 77 | +                  category: "/language:${{matrix.language}}" | 
0 commit comments