name: CodeQL on: pull_request: types: [opened, synchronize, reopened, ready_for_review] paths: - ".github/**" - "**/*.js" - "**/*.jsx" - "**/*.ts" - "**/*.tsx" - "**/*.py" - "api/client/javascript/**" - "api/client/python/**" - "api/spec/**" - "package.json" - "pnpm-lock.yaml" - ".github/workflows/codeql.yml" push: branches: [main] paths: - ".github/**" - "**/*.js" - "**/*.jsx" - "**/*.ts" - "**/*.tsx" - "**/*.py" - "api/client/javascript/**" - "api/client/python/**" - "api/spec/**" - "package.json" - "pnpm-lock.yaml" - ".github/workflows/codeql.yml" schedule: - cron: "32 3 * * 0" workflow_dispatch: permissions: contents: read security-events: write packages: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: analyze: name: Analyze (${{ matrix.language }}) if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }} runs-on: depot-ubuntu-latest-4 timeout-minutes: 30 strategy: fail-fast: false matrix: language: [actions, javascript-typescript, python] steps: - name: Checkout repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - name: Initialize CodeQL uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 with: languages: ${{ matrix.language }} build-mode: none - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2 with: category: "/language:${{ matrix.language }}"