Files
james.maesandClaude Fable 5.1 a562acd55c ci: adopt the standards' pull-request, security, CodeQL and Scorecard gates (#68)
* ci: adopt the standards' pull-request, security, CodeQL and Scorecard gates

Call the KofTwentyTwo/standards reusable workflows (pinned to 855cf44):
pr-gates (Conventional Commit title, DCO, dependency review), security
(gitleaks over history, Trivy + OSV-Scanner on the lock files, zizmor +
actionlint), codeql (security-extended for csharp and actions, gated at
high), plus the Scorecard workflow. Root scanner configs, global.json,
.pre-commit-config.yaml with the dotnet-format hook, and the standard
PSScriptAnalyzer settings come with them.

Harden the existing workflows: persist-credentials false on every checkout,
no restore cache in the release job, verify-job outputs and inputs read from
environment variables instead of ${{ }} inside run:, concurrency on release,
locked restores for publish and pack (the CLI now declares win-x64 so its
lock file carries that runtime graph).

Release assets: a CycloneDX 1.6 SBOM per artifact (attached and attested),
SHA256SUMS (renamed; the channel feed is listed too), LICENSE inside the CLI
zip and the app payload, and release notes generated from Conventional
Commit subjects by .github/scripts/New-ReleaseNotes.ps1 with breaking and
security changes first. Generated pull requests use Conventional Commit
titles; Dependabot gets the 7-day cooldown and the ci prefix; the NuGet
update script holds back versions younger than the cooldown.

The old job names and dependency-review.yml stay until protect-main lists
the new required contexts (#66).

Closes #63

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>

* ci: pin the standards workflows to the commit that exempts file-licensed packages

standards#4 (merged as ae174f5) adds the `allow-dependencies-licenses` input to
the reusable pull-request workflow, fixes the DCO check for commits whose author
has no GitHub login, and accepts `security` titles. The three callers move to
that commit, and pr-gates.yml exempts LibGit2Sharp, Microsoft.WindowsAppSDK and
Microsoft.Windows.SDK.BuildTools from the license check (standards EX-0003):
their nuspecs name a license file, so the dependency graph reports NOASSERTION.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: James Maes <james@kof22.com>

---------

Signed-off-by: James Maes <james@kof22.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 14:27:45 -05:00

34 lines
1.0 KiB
YAML

# Static analysis (K22-CI-22): CodeQL with the security-extended suite for C# and
# for the workflows themselves, failing on alerts of high severity or above,
# through the KofTwentyTwo standards' reusable workflow. C# is compiled, so the
# analysis builds the solution exactly as CI does (x64, locked restore); the .NET
# SDK comes from global.json.
name: codeql
on:
pull_request:
push:
branches: [main]
schedule:
- cron: "29 6 * * 1"
workflow_dispatch:
permissions: {}
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
codeql:
uses: KofTwentyTwo/standards/.github/workflows/codeql.yml@ae174f54959ba4297f2ae174356c4481918fdf44 # main 2026-10-09 (pre-1.0 draft, standards#4)
permissions:
contents: read
security-events: write
with:
languages: '["csharp", "actions"]'
build-mode: manual
build-command: dotnet build gclo.slnx -p:Platform=x64 -p:RestoreLockedMode=true
runs-on: windows-latest
setup-dotnet: true