diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b298fe8..c7fd1a5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -38,7 +38,7 @@ jobs: - language: actions build-mode: none - language: csharp - build-mode: none + build-mode: manual - language: javascript-typescript build-mode: none # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' @@ -77,22 +77,25 @@ jobs: # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality + - name: Setup .NET SDK + if: matrix.language == 'csharp' + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 8.0.x + # If the analyze step fails for one of the languages you are analyzing with # "We were unable to automatically build your code", modify the matrix above # to set the build mode to "manual" for that language. Then modify this step # to build your code. # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # - name: Run manual build steps - # if: matrix.build-mode == 'manual' - # shell: bash - # run: | - # echo 'If you are using a "manual" build mode for one or more of the' \ - # 'languages you are analyzing, replace this with the commands to build' \ - # 'your code, for example:' - # echo ' make bootstrap' - # echo ' make release' - # exit 1 + - name: Run manual build steps + if: matrix.build-mode == 'manual' + shell: bash + working-directory: dotnet + run: | + dotnet restore Microsoft.Security.AntiSSRF.sln + dotnet build Microsoft.Security.AntiSSRF.sln --configuration Release --no-restore - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4