Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 61 additions & 61 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
name: CodeQL Analysis
permissions:
security-events: write

on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
branches: [main]
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
queries: security-and-quality
languages: csharp

- name: Build solution
shell: pwsh
run: |
$pathToSolution = "src/BinSkim.sln"
$buildConfiguration = "Release"
$useSharedCompilation = "false"
$testProjects = "src/Test.FunctionalTests.BinSkim.Rules/Test.FunctionalTests.BinSkim.Rules.csproj", "src/Test.FunctionalTests.BinSkim.Driver/Test.FunctionalTests.BinSkim.Driver.csproj", "src/Test.UnitTests.BinaryParsers/Test.UnitTests.BinaryParsers.csproj", "src/Test.UnitTests.BinSkim.Rules/Test.UnitTests.BinSkim.Rules.csproj", "src/Test.UnitTests.BinSkim.Driver/Test.UnitTests.BinSkim.Driver.csproj"

dotnet nuget locals all --clear

# remove one or more test projects,
# so that CodeQL only analyzes the source code
dotnet sln $pathToSolution remove $testProjects

dotnet clean $pathToSolution `
--configuration $buildConfiguration

dotnet restore $pathToSolution

dotnet build $pathToSolution `
-property:UseSharedCompilation=$useSharedCompilation `
--configuration $buildConfiguration `
--no-incremental `
--no-restore

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)
name: CodeQL Analysis
permissions:
security-events: write
on:
push:
branches-ignore:
- "dependabot/**"
pull_request:
branches: [main]
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
queries: security-and-quality
languages: csharp
- name: Build solution
shell: pwsh
run: |
$pathToSolution = "src/BinSkim.sln"
$buildConfiguration = "Release"
$useSharedCompilation = "false"
$testProjects = "src/Test.FunctionalTests.BinSkim.Rules/Test.FunctionalTests.BinSkim.Rules.csproj", "src/Test.FunctionalTests.BinSkim.Driver/Test.FunctionalTests.BinSkim.Driver.csproj", "src/Test.UnitTests.BinaryParsers/Test.UnitTests.BinaryParsers.csproj", "src/Test.UnitTests.BinSkim.Rules/Test.UnitTests.BinSkim.Rules.csproj", "src/Test.UnitTests.BinSkim.Driver/Test.UnitTests.BinSkim.Driver.csproj"
dotnet nuget locals all --clear
# remove one or more test projects,
# so that CodeQL only analyzes the source code
dotnet sln $pathToSolution remove $testProjects
dotnet clean $pathToSolution `
--configuration $buildConfiguration
dotnet restore $pathToSolution
dotnet build $pathToSolution `
-property:UseSharedCompilation=$useSharedCompilation `
--configuration $buildConfiguration `
--no-incremental `
--no-restore
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)
Loading