CodeQL #671
This file contains 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" | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
branches: | |
- master | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
branches: | |
- master | |
schedule: | |
- cron: '40 14 * * 6' | |
permissions: | |
security-events: write | |
contents: read | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'csharp' ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup NuGet.exe | |
uses: NuGet/setup-nuget@v2 | |
- name: Setup MSBuild.exe | |
uses: microsoft/[email protected] | |
- name: Restore the application | |
run: nuget restore ./src/XmlNotepad.sln | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
queries: security-and-quality | |
languages: csharp | |
# Restore the application again to avoid codeql messing things up | |
- name: Restore the application | |
run: nuget restore ./src/XmlNotepad.sln | |
- name: Build the application | |
run: | | |
echo namespace XmlNotepad { public partial class AppAnalytics { private const string ApiKey=""; } } >> .\src\Model\ApiKey.cs | |
msbuild ./src/XmlNotepad.sln /p:Configuration=Release "/p:Platform=Any CPU" /verbosity:minimal /p:UseSharedCompilation=False | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 |