CodeQL analysis #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright The OpenTelemetry Authors | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: CodeQL analysis | |
| on: | |
| workflow_call: | |
| schedule: | |
| - cron: "44 3 * * 4" # every Thursday at 03:44 UTC | |
| workflow_dispatch: | |
| permissions: | |
| contents: read # required to checkout the repository | |
| concurrency: | |
| group: codeql-analysis-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| analyze: | |
| name: Analyze ${{ matrix.language }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| permissions: | |
| actions: read # required to scan GitHub Actions workflows | |
| contents: read # required to checkout the repository | |
| security-events: write # required to upload CodeQL SARIF to code scanning | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - language: actions | |
| build-mode: none | |
| - language: c-cpp | |
| build-mode: none | |
| - language: csharp | |
| build-mode: none | |
| - language: go | |
| build-mode: manual | |
| - language: java-kotlin | |
| build-mode: none | |
| - language: javascript-typescript | |
| build-mode: none | |
| - language: python | |
| build-mode: none | |
| - language: ruby | |
| build-mode: none | |
| - language: rust | |
| build-mode: none | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Go | |
| if: matrix.language == 'go' | |
| uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 | |
| with: | |
| go-version: '1.25.10' | |
| cache-dependency-path: | | |
| src/checkout/go.sum | |
| src/product-catalog/go.sum | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0 | |
| with: | |
| languages: ${{ matrix.language }} | |
| build-mode: ${{ matrix.build-mode }} | |
| queries: security-extended | |
| - name: Build checkout service | |
| if: matrix.language == 'go' | |
| working-directory: src/checkout | |
| run: go build ./... | |
| - name: Build product-catalog service | |
| if: matrix.language == 'go' | |
| working-directory: src/product-catalog | |
| run: go build ./... | |
| - name: Perform CodeQL analysis | |
| uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0 | |
| with: | |
| category: "/language:${{ matrix.language }}" |