Skip to content
Open
Show file tree
Hide file tree
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
106 changes: 53 additions & 53 deletions .github/actions/setup-dotnet/action.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
name: Setup .NET
description: >-
Installs the exact SDK pinned by global.json, quiets the CLI and optionally restores solutions or projects in NuGet
locked mode.

inputs:
restore:
description: >-
Newline-separated solutions or projects to restore, each with --locked-mode against its committed
packages.lock.json. Empty skips the restore.
default: ''
cache:
description: >-
Cache the NuGet package folder, keyed on every packages.lock.json. Keep 'false' in every job reachable from a
release, Sonar or CodeQL run (ci.yml, sonar.yml, codeql.yml, release.yml): a cache written by a pull request run
must never feed a published build. WorkflowContractTests enforces it.
default: 'false'

runs:
using: composite
steps:
# global.json pins the SDK with rollForward: disable, and runner images do not ship that exact feature band, so
# every job that runs dotnet installs it here.
- name: Install SDK
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
cache: ${{ inputs.cache }}
cache-dependency-path: '**/packages.lock.json'

- name: Configure CLI
shell: pwsh
run: | # zizmor: ignore[github-env] writes three constant literals only; no expression or user input reaches GITHUB_ENV
'DOTNET_NOLOGO=1', 'DOTNET_CLI_TELEMETRY_OPTOUT=1', 'MSBUILDDISABLENODEREUSE=1' |
Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8

# Locked mode fails with NU1004 when a committed lock file no longer matches the projects, instead of silently
# resolving different packages than the ones reviewed. Never combined with --force-evaluate (NU1005).
# https://learn.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies
- name: Restore
if: inputs.restore != ''
shell: pwsh
env:
RESTORE_TARGETS: ${{ inputs.restore }}
run: |
$ErrorActionPreference = 'Stop'
$targets = @($env:RESTORE_TARGETS -split "`n" | ForEach-Object { $_.Trim() } | Where-Object { $_ })
foreach ($target in $targets) {
dotnet restore $target --locked-mode
if ($LASTEXITCODE -ne 0) {
throw "Locked restore of '$target' failed with exit code $LASTEXITCODE. If a dependency, global.json or a project changed, regenerate its lock file with a forced re-evaluation restore (never --locked-mode together with it, NU1005) and commit it."
}
}
name: Setup .NET
description: >-
Installs the exact SDK pinned by global.json, quiets the CLI and optionally restores solutions or projects in NuGet
locked mode.
inputs:
restore:
description: >-
Newline-separated solutions or projects to restore, each with --locked-mode against its committed
packages.lock.json. Empty skips the restore.
default: ''
cache:
description: >-
Cache the NuGet package folder, keyed on every packages.lock.json. Keep 'false' in every job reachable from a
release, Sonar or CodeQL run (ci.yml, sonar.yml, codeql.yml, release.yml): a cache written by a pull request run
must never feed a published build. WorkflowContractTests enforces it.
default: 'false'
runs:
using: composite
steps:
# global.json pins the SDK with rollForward: disable, and runner images do not ship that exact feature band, so
# every job that runs dotnet installs it here.
- name: Install SDK
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
global-json-file: global.json
cache: ${{ inputs.cache }}
cache-dependency-path: '**/packages.lock.json'
- name: Configure CLI
shell: pwsh
run: | # zizmor: ignore[github-env] writes three constant literals only; no expression or user input reaches GITHUB_ENV
'DOTNET_NOLOGO=1', 'DOTNET_CLI_TELEMETRY_OPTOUT=1', 'MSBUILDDISABLENODEREUSE=1' |
Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
# Locked mode fails with NU1004 when a committed lock file no longer matches the projects, instead of silently
# resolving different packages than the ones reviewed. Never combined with --force-evaluate (NU1005).
# https://learn.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies
- name: Restore
if: inputs.restore != ''
shell: pwsh
env:
RESTORE_TARGETS: ${{ inputs.restore }}
run: |
$ErrorActionPreference = 'Stop'
$targets = @($env:RESTORE_TARGETS -split "`n" | ForEach-Object { $_.Trim() } | Where-Object { $_ })
foreach ($target in $targets) {
dotnet restore $target --locked-mode
if ($LASTEXITCODE -ne 0) {
throw "Locked restore of '$target' failed with exit code $LASTEXITCODE. If a dependency, global.json or a project changed, regenerate its lock file with a forced re-evaluation restore (never --locked-mode together with it, NU1005) and commit it."
}
}
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ jobs:

# Offline audits only: the gate must not depend on the GitHub API. The online audits run in an advisory workflow.
- name: Run zizmor
uses: zizmorcore/zizmor-action@53290badfa369cb0bf7ad16342cb62c2fa47ac7b # v0.8.0
uses: zizmorcore/zizmor-action@1b4550e929643b8b26a62303c6bd64814271a4f1 # v0.9.2
with:
version: 1.30.1
online-audits: false
Expand Down Expand Up @@ -566,7 +566,7 @@ jobs:

- name: Review dependency changes
if: github.event_name == 'pull_request'
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1
with:
config-file: ./.github/dependency-review-config.yml
comment-summary-in-pr: never
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
restore: src/CheatEngine.SDK/CheatEngine.SDK.csproj

- name: Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
with:
languages: csharp
build-mode: manual
Expand All @@ -75,7 +75,7 @@ jobs:
}

- name: Analyze
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
with:
category: /language:csharp

Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
with:
languages: c-cpp
build-mode: none
Expand All @@ -113,7 +113,7 @@ jobs:
trap-caching: false

- name: Analyze
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
with:
category: /language:c-cpp

Expand All @@ -133,7 +133,7 @@ jobs:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
with:
languages: actions
build-mode: none
Expand All @@ -142,6 +142,6 @@ jobs:
trap-caching: false

- name: Analyze
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
with:
category: /language:actions
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ jobs:

# No repo_token: the default token reads the rulesets of a public repository.
- name: Run Scorecard
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
uses: ossf/scorecard-action@23f22cd43608bae7a1f1fa2603d7314dee9538a5 # v2.6.0
with:
results_file: results.sarif
results_format: sarif
publish_results: true

- name: Upload to code scanning
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
uses: github/codeql-action/upload-sarif@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
# SonarScanner for .NET uses Java. Pin the same JDK 21 distribution as CheatEngine.Client so scanner behavior is
# reproducible across the SDK and its high-level consumer.
- name: Set up JDK 21
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: zulu
java-version: '21'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zizmor-online.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
# Inputs: https://github.com/zizmorcore/zizmor-action (action.yml at v0.6.4). The tool version is pinned next to
# the action, so a new zizmor release cannot change the findings without a commit.
- name: Run zizmor
uses: zizmorcore/zizmor-action@53290badfa369cb0bf7ad16342cb62c2fa47ac7b # v0.8.0
uses: zizmorcore/zizmor-action@1b4550e929643b8b26a62303c6bd64814271a4f1 # v0.9.2
with:
version: 1.30.1
online-audits: true
Expand Down
Loading