|  | 
|  | 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 | +name: "CodeQL" | 
|  | 13 | + | 
|  | 14 | +on: | 
|  | 15 | +  push: | 
|  | 16 | +    branches: [ "main", "preview" ] | 
|  | 17 | +  pull_request: | 
|  | 18 | +    branches: [ "main", "preview" ] | 
|  | 19 | +  schedule: | 
|  | 20 | +    - cron: '26 2 * * 1' | 
|  | 21 | + | 
|  | 22 | +jobs: | 
|  | 23 | +  analyze: | 
|  | 24 | +    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 | +    runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | 
|  | 31 | +    timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | 
|  | 32 | +    permissions: | 
|  | 33 | +      # required for all workflows | 
|  | 34 | +      security-events: write | 
|  | 35 | + | 
|  | 36 | +      # only required for workflows in private repositories | 
|  | 37 | +      actions: read | 
|  | 38 | +      contents: read | 
|  | 39 | + | 
|  | 40 | +    strategy: | 
|  | 41 | +      fail-fast: false | 
|  | 42 | +      matrix: | 
|  | 43 | +        language: [ 'javascript-typescript' ] | 
|  | 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 | + | 
|  | 49 | +    steps: | 
|  | 50 | +    - name: Checkout repository | 
|  | 51 | +      uses: actions/checkout@v4 | 
|  | 52 | + | 
|  | 53 | +    # Initializes the CodeQL tools for scanning. | 
|  | 54 | +    - name: Initialize CodeQL | 
|  | 55 | +      uses: github/codeql-action/init@v3 | 
|  | 56 | +      with: | 
|  | 57 | +        languages: ${{ matrix.language }} | 
|  | 58 | +        # If you wish to specify custom queries, you can do so here or in a config file. | 
|  | 59 | +        # By default, queries listed here will override any specified in a config file. | 
|  | 60 | +        # Prefix the list here with "+" to use these queries and those in the config file. | 
|  | 61 | + | 
|  | 62 | +        # 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 | 
|  | 63 | +        # queries: security-extended,security-and-quality | 
|  | 64 | + | 
|  | 65 | + | 
|  | 66 | +    # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). | 
|  | 67 | +    # If this step fails, then you should remove it and run the build manually (see below) | 
|  | 68 | +    - name: Autobuild | 
|  | 69 | +      uses: github/codeql-action/autobuild@v3 | 
|  | 70 | + | 
|  | 71 | +    # - if: matrix.language == 'javascript-typescript' | 
|  | 72 | +    #   name: Autobuild | 
|  | 73 | +    #   uses: github/codeql-action/autobuild@v3 | 
|  | 74 | +       | 
|  | 75 | +    # - if: matrix.language == 'java-kotlin' | 
|  | 76 | +    #   name: Build Java | 
|  | 77 | +    #   run: | | 
|  | 78 | +    #     make bootstrap | 
|  | 79 | +    #     make release | 
|  | 80 | + | 
|  | 81 | +    # ℹ️ Command-line programs to run using the OS shell. | 
|  | 82 | +    # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | 
|  | 83 | + | 
|  | 84 | +    #   If the Autobuild fails above, remove it and uncomment the following three lines. | 
|  | 85 | +    #   modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | 
|  | 86 | + | 
|  | 87 | +    # - run: | | 
|  | 88 | +    #     echo "Run, Build Application using script" | 
|  | 89 | +    #     ./location_of_script_within_repo/buildscript.sh | 
|  | 90 | + | 
|  | 91 | +    - name: Perform CodeQL Analysis | 
|  | 92 | +      uses: github/codeql-action/analyze@v3 | 
|  | 93 | +      with: | 
|  | 94 | +        category: "/language:${{matrix.language}}" | 
0 commit comments