Skip to content

CodeQL Security Analysis #7

CodeQL Security Analysis

CodeQL Security Analysis #7

name: CodeQL Security Analysis
on:
schedule:
# Weekly scan: Sundays at 04:00 UTC
- cron: '0 4 * * 0'
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
defaults:
run:
shell: pwsh
jobs:
analyze:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
strategy:
fail-fast: false
matrix:
language: ['javascript-typescript', 'python']
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
languages: ${{ matrix.language }}
queries: security-extended,security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
category: "/language:${{ matrix.language }}"
- name: Add job summary
if: always()
run: |
Import-Module $env:GITHUB_WORKSPACE/scripts/lib/Modules/CIHelpers.psm1
$md = @(
'## CodeQL Security Analysis Complete'
'**Language:** ${{ matrix.language }}'
'**Queries:** security-extended, security-and-quality'
''
'📊 View results in the Security tab under Code Scanning'
)
Write-CIStepSummary -Content ($md -join "`n")