From f3b700743280075a0d802762e55bfc10ba6ff035 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Mon, 20 Oct 2025 01:29:03 -0700 Subject: [PATCH] codeql advanced support --- .github/workflows/codeql.yaml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/codeql.yaml diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml new file mode 100644 index 0000000..4c55dc4 --- /dev/null +++ b/.github/workflows/codeql.yaml @@ -0,0 +1,49 @@ +name: codeql + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '33 16 * * 0' + +jobs: + analyze: + name: analyze (${{ matrix.language }}) + runs-on: 'ubuntu-latest' + permissions: + security-events: write # Needed to upload results. + packages: read # Needed to fetch internal or private CodeQL packs. + actions: read # Needed to read workflows. + contents: read # Needed to read code. + + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + - language: rust + build-mode: none + steps: + - name: harden runner + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: audit + + - name: checkout + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + with: + persist-credentials: false + + - name: initialize codeql + uses: github/codeql-action/init@16140ae1a102900babc80a33c44059580f687047 #v4 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - name: perform codeql analysis + uses: github/codeql-action/analyze@16140ae1a102900babc80a33c44059580f687047 #v4 + with: + category: "/language:${{matrix.language}}"