From 5caa355146b8f3cb2adbd4b7f7a2c0ab8a2266fa Mon Sep 17 00:00:00 2001 From: netscale1 Date: Thu, 20 Aug 2026 00:13:41 +0200 Subject: [PATCH] Filter macOS CodeQL by changed paths --- .github/workflows/codeql-macos.yml | 61 ++++++++++++++++++++++++++++++ .github/workflows/codeql.yml | 48 +++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 .github/workflows/codeql-macos.yml create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql-macos.yml b/.github/workflows/codeql-macos.yml new file mode 100644 index 0000000..5cb2e0d --- /dev/null +++ b/.github/workflows/codeql-macos.yml @@ -0,0 +1,61 @@ +name: CodeQL macOS + +on: + push: + branches: + - main + pull_request: + branches: + - main + paths: + - "macos/**" + - "scripts/build-macos-app.sh" + - "scripts/build-macos-virtual-mic.sh" + - "scripts/macos-release.sh" + - ".github/workflows/codeql*.yml" + - ".github/workflows/ci.yml" + - ".github/workflows/release.yml" + schedule: + - cron: "41 3 * * 2" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ${{ matrix.runner }} + permissions: + actions: read + contents: read + packages: read + security-events: write + strategy: + fail-fast: false + matrix: + include: + - language: c-cpp + build-mode: none + runner: ubuntu-latest + - language: swift + build-mode: autobuild + runner: macos-latest + steps: + - name: Check out repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Initialize CodeQL + uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + - name: Autobuild + uses: github/codeql-action/autobuild@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 + - name: Perform CodeQL analysis + uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 + with: + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..8fc8b02 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,48 @@ +name: CodeQL + +on: + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: "17 3 * * 2" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + packages: read + security-events: write + strategy: + fail-fast: false + matrix: + language: + - actions + - csharp + - python + steps: + - name: Check out repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Initialize CodeQL + uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 + with: + languages: ${{ matrix.language }} + build-mode: none + - name: Perform CodeQL analysis + uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 + with: + category: "/language:${{ matrix.language }}"