CodeQL - C# #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "CodeQL - C#" | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| schedule: | |
| - cron: '0 4 * * 0' # Runs every Sunday at 4AM | |
| jobs: | |
| analyze: | |
| name: CodeQL Security Scan | |
| runs-on: windows-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.x' | |
| - name: Restore dependencies | |
| run: dotnet restore RestSharp.Authenticators.Digest.sln | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: csharp | |
| - name: Build project | |
| run: dotnet build RestSharp.Authenticators.Digest.sln --no-restore --configuration Release | |
| - name: Run CodeQL analysis | |
| uses: github/codeql-action/analyze@v3 |