name: CodeQL on: workflow_dispatch: pull_request: types: [opened, synchronize, reopened, ready_for_review] push: branches: - main schedule: - cron: "23 4 * * 1" permissions: contents: read concurrency: # Keep every main SHA and independent scheduled/manual scan. group: foundation-codeql-${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: analyze: name: analyze if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} runs-on: ubuntu-24.04 timeout-minutes: 20 permissions: contents: read security-events: write steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 with: languages: javascript-typescript queries: security-extended - id: analyze uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 with: category: ${{ github.event_name == 'workflow_dispatch' && format('release-attestation-{0}-{1}', github.run_id, github.run_attempt) || '' }}