blob: 87d1a9b46948d4eee093c3bf95015d40678f9115 [file]
name: "CodeQL"
on:
push:
branches: [main, 3.x, 2.x]
pull_request:
# Must match 'push': the ruleset requires CodeQL on all three branches.
branches: [main, 3.x, 2.x]
schedule:
- cron: '0 19 * * 4'
permissions:
contents: read
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
analyze:
permissions:
actions: read # read workflow details
contents: read # checkout
security-events: write # upload results
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
# 'javascript' covers TypeScript too. 'actions' scans the workflows
# in .github/ for injection and permission problems.
language: ['javascript', 'actions']
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
languages: ${{ matrix.language }}
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3