Skip to content

chore: align codeql.yml with buildless standard; resolve remaining scanning alerts - #17

Merged
StuartMeeks merged 1 commit into
mainfrom
chore/standards-alignment-codeql-buildless
Aug 22, 2026
Merged

chore: align codeql.yml with buildless standard; resolve remaining scanning alerts#17
StuartMeeks merged 1 commit into
mainfrom
chore/standards-alignment-codeql-buildless

Conversation

@StuartMeeks

Copy link
Copy Markdown
Owner

Aligns this repo with the latest NextIteration.Standards and resolves the three still-open code-scanning alerts with genuine fixes (no dismissals).

Standards alignment

audit-drift.sh (scoped to this repo) reported exactly one failing clause — 3.0.1 workflow content — everything else green. The standards repo's latest change (analyse C# buildless so codeql paths-ignore applies, §4.4) updated the canonical codeql.yml; this brings the repo into line (the sanctioned "template first, then every repo" direction — the template already changed):

  • codeql.yml now runs the C# analysis in build-mode: none (buildless extraction) and drops the Setup .NET / Restore / Build steps. Non-comment content now equals the template verbatim.

This is load-bearing, not cosmetic: GitHub applies paths-ignore (**/obj/**, **/bin/**) to a compiled language only under buildless extraction. Under the previous explicit build, every file the compiler saw was analysed — obj/ included — so the exclusion was silently inert and the generated xUnit entry point was scanned.

Code-scanning alerts resolved

  • cs/missed-ternary-operator ×2 (in obj/**/XunitAutoGeneratedEntryPoint.cs) — now genuinely excluded because paths-ignore finally takes effect under build-mode: none. These were stale-open against generated code no human maintains.
  • cs/local-not-disposed ×1 (CliHarness) — my earlier fix used a fluent using var console = new TestConsole().Interactive(), but CodeQL flagged the new TestConsole() allocation itself: dataflow couldn't connect the allocation (behind the extension call) to the disposed variable. Fixed by binding using directly to new TestConsole() and calling .Interactive() as a separate statement (it mutates in place and returns the same instance).

Verification

  • audit-drift.sh (this repo): 32/32 clauses green after the change.
  • Build clean (0 warnings, TreatWarningsAsErrors); 64/64 tests pass on net8.0 and net10.0.

Once merged and CodeQL re-scans main, all open alerts should close.

🤖 Generated with Claude Code

…ng alerts

Align with the updated NextIteration.Standards §4.4 / §3.0.1 and resolve the
three remaining open code-scanning alerts with genuine fixes.

- codeql.yml now matches the canonical template verbatim (non-comment content):
  the C# analysis runs `build-mode: none`, dropping the Setup .NET / Restore /
  Build steps. This is load-bearing — GitHub honours the `paths-ignore` for
  **/obj/** and **/bin/** only under buildless extraction, so under the previous
  explicit build the exclusion was inert and the generated xUnit entry point in
  obj/ was analysed. This clears the audit-drift `3.0.1 workflow content` FAIL
  (the only failing clause) and genuinely excludes the two
  cs/missed-ternary-operator alerts against generated code.
- cs/local-not-disposed: the previous fluent `new TestConsole().Interactive()`
  left CodeQL unable to connect the allocation to the disposed `using` variable,
  so the alert reopened. Bind `using` directly to `new TestConsole()` and call
  `.Interactive()` as a separate statement (it mutates in place and returns the
  same instance) so the disposal is visible to dataflow.

audit-drift.sh (scoped to this repo): 32/32 clauses green after this change.
Build clean (0 warnings); 64/64 tests pass on net8.0 and net10.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@StuartMeeks
StuartMeeks merged commit 93946c2 into main Aug 22, 2026
9 checks passed
@StuartMeeks
StuartMeeks deleted the chore/standards-alignment-codeql-buildless branch August 22, 2026 02:11
@StuartMeeks StuartMeeks mentioned this pull request Aug 22, 2026
StuartMeeks added a commit that referenced this pull request Aug 22, 2026
Patch release — no consumer-visible API or runtime behaviour change. Bumps
<Version> to 1.0.1 and finalises the CHANGELOG [1.0.1] section (dated
2026-08-22) from [Unreleased].

The shipped assembly carries only the behaviour-neutral internal refactors from
#16 that cleared the CodeQL security-and-quality findings (Path.Join, narrowed
catches, .Where(...), using(cts)); the remainder is CI-only (the #17 move to
buildless CodeQL analysis).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant