Skip to content

CI: add CodeQL workflow and harden Actions workflows #2

CI: add CodeQL workflow and harden Actions workflows

CI: add CodeQL workflow and harden Actions workflows #2

Workflow file for this run

name: "CodeQL"
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 0 0 * * 1
workflow_dispatch: # allow on-demand manual scans
permissions: # least privilege
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write # required to upload CodeQL results
contents: read
strategy:
fail-fast: false
matrix:
language: ["actions", "python"]
steps:
- uses: actions/checkout@v7
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"