From 6e28bc78f3a355d29572f584668b7957a42a006c Mon Sep 17 00:00:00 2001 From: Aaron Horner Date: Tue, 30 Jun 2026 15:13:29 -0400 Subject: [PATCH] Add CodeQL workflow (PHNX-XXXX) --- .github/workflows/codeql.yml | 69 ++++++++++++++++++++++++++++++++++++ 1 file changed, 69 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..eac832d --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,69 @@ +name: "CodeQL" + +on: + push: + branches: [main, master] + paths: + - 'src/**/*' + - '.github/**/*' + - '!**/*.md' + - '!**/*.txt' + pull_request: + branches: [main, master] + paths: + - 'src/**/*' + - '.github/**/*' + - '!**/*.md' + - '!**/*.txt' + schedule: + - cron: '17 18 * * 4' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + + permissions: + security-events: write + packages: read + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: csharp + build-mode: manual + - language: actions + build-mode: none + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + dependency-caching: true + + - if: matrix.build-mode == 'manual' + name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 8.0.x + 10.0.x + + + - if: matrix.build-mode == 'manual' + name: Build + working-directory: ./src + run: dotnet build -c Release ./Shawarma.AspNetCore.slnx + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" \ No newline at end of file