# For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. # # ******** NOTE ******** # We have attempted to detect the languages in your repository. Please check # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # name: "CodeQL" on: push: branches: [ "main", "master", "beta", "Release*", "release*", "*-legacy", "legacy-v1" ] pull_request: # The branches below must be a subset of the branches above branches: [ "main", "master", "beta", "Release*", "release*", "*-legacy", "legacy-v1" ] schedule: - cron: '15 17 * * 2' # Every Tuesday at 17:15 UTC jobs: analyze: name: Analyze (${{ matrix.language }}) runs-on: ubuntu-latest permissions: # required for all workflows security-events: write # required to fetch internal or private CodeQL packs packages: read # only required for workflows in private repositories actions: read contents: read strategy: fail-fast: false matrix: include: - language: actions - language: javascript - language: javascript-typescript node-version: '>=24.22.1 <25' # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' # Use `c-cpp` to analyze code written in C, C++ or both # Use 'java-kotlin' to analyze code written in Java, Kotlin or both # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # Setup Node.js for JavaScript projects - name: Setup Node.js ${{ matrix.node-version }} # Only run the build for Typescript/JavaScript language match if: matrix.language == 'javascript-typescript' uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: ${{ matrix.node-version }} check-latest: true # Install dependencies for JavaScript projects - name: Install dependencies # Only run the build for Typescript/JavaScript language match if: matrix.language == 'javascript-typescript' run: | node common/scripts/install-run-rush.js update --full --recheck npm install rollup -g npm install grunt-cli npm install node common/scripts/install-run-rush.js update --full --recheck # Initializes the CodeQL tools for scanning - name: Initialize CodeQL uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 with: languages: ${{ matrix.language }} config-file: ./.github/codeql/codeql-config.yml # Build JavaScript project specifically (skipping autobuild for JavaScript) - name: Build JavaScript # Only run the build for Typescript/JavaScript language match if: matrix.language == 'javascript-typescript' run: npm run build # Perform the CodeQL Analysis - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 with: category: "/language:${{matrix.language}}" upload-database: false # Debug CodeQL configuration - name: Debug CodeQL configuration if: always() run: | echo "Executed CodeQL for language: ${{ matrix.language }}" echo "Category used: /language:${{ matrix.language }}" echo "Node version: ${{ matrix.node-version || 'N/A' }}"