From 330ce52f7935a54492476f272e671907fc230f73 Mon Sep 17 00:00:00 2001 From: Markus Frei <31855393+markuslf@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:34:09 +0200 Subject: [PATCH] ci: add CodeQL analysis for GitHub Actions workflows --- .github/workflows/codeql.yml | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..7dc925a --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,51 @@ +name: 'CodeQL' + +on: + push: + branches: + - 'main' + pull_request: + branches: + - 'main' + schedule: + - cron: '0 5 * * 5' + +permissions: + contents: 'read' + +jobs: + analyze: + name: 'Analyze' + runs-on: 'ubuntu-latest' + permissions: + actions: 'read' + contents: 'read' + security-events: 'write' + + strategy: + fail-fast: false + matrix: + language: + - 'actions' + + steps: + - name: 'Harden Runner' + uses: 'step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920' # v2.20.0 + with: + egress-policy: 'audit' + + - name: 'Checkout repository' + uses: 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' # v7.0.1 + + - name: 'Initialize CodeQL' + uses: 'github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81' # v4.37.3 + with: + languages: '${{ matrix.language }}' + + - name: 'Autobuild' + uses: 'github/codeql-action/autobuild@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81' # v4.37.3 + + - name: 'Perform CodeQL Analysis' + uses: 'github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81' # v4.37.3 + with: + category: '/language:${{ matrix.language }}'