fix: resolve open CodeQL code-scanning alerts with genuine fixes - #16
Merged
Conversation
Address every open alert from the security-and-quality pack without suppressions or dismissals. No consumer-visible behaviour changes. - cs/path-combine: Path.Combine -> Path.Join at all 8 sites (Path.Join concatenates unconditionally, so a rooted later segment can't silently drop the base directory). - cs/catch-of-all-exceptions: best-effort cleanup catches (AtomicFile.TryDelete, SettingsStore.TryBackupCorruptFile, test TempDir.Dispose) now catch only IOException/UnauthorizedAccessException; the intentionally broad catches (SettingsBase fire-and-forget safety net, the two settings-command boundaries) keep routing operational failures to their handler via a when-filter but let a process-fatal OutOfMemoryException propagate. - cs/linq/missed-where: ResetInstanceToDefaults filters with .Where(...). - cs/missed-using-statement: the debounce task scopes its CancellationTokenSource with a using block, preserving the existing idempotent disposal semantics. - cs/local-not-disposed: the test CLI harness disposes its TestConsole. Build clean (0 warnings, TreatWarningsAsErrors); 64/64 tests pass on net8.0 and net10.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Merged
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>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves every open CodeQL code-scanning alert from the
security-and-qualitypack with a real code change — no# codeqlsuppressions, no alert dismissals. No consumer-visible behaviour changes; build is clean underTreatWarningsAsErrorsand all 64 tests (32 ×net8.0/net10.0) pass.What each alert got
cs/path-combine(×8) —Path.Combine→Path.Joineverywhere (one inServiceCollectionExtensions, the rest in test infrastructure). This is CodeQL's own recommendation:Path.Joinconcatenates segments unconditionally, so it can't silently discard the base directory the wayPath.Combinedoes when a later segment looks rooted.cs/catch-of-all-exceptions(×6) — the query clears acatchonce it carries awhenfilter:AtomicFile.TryDelete,SettingsStore.TryBackupCorruptFile, testTempDir.Dispose) now catch only theIOException/UnauthorizedAccessExceptionthey expect, so an unexpected exception surfaces instead of being swallowed.SettingsBaseand the twosettingscommand boundaries — must stay broad (a pluggable persister/store can throw any type, and a test asserts a customInvalidOperationExceptionreaches the handler). They keep routing every operational failure to their handler but now exclude a process-fatalOutOfMemoryException, which propagates rather than being mislabelled.cs/linq/missed-where(×1) —SettingsStore.ResetInstanceToDefaultsfilters settable properties with.Where(...)instead of anifinside the loop.cs/missed-using-statement(×1) — the debounce task scopes itsCancellationTokenSourcewith ausingblock instead of a manualfinally-dispose. Disposal semantics are unchanged (still idempotent; a superseding change/Save disposing its own reference remains harmless).cs/local-not-disposed(×1) — the test CLI harness nowusings itsTestConsole.The two remaining open alerts (
cs/missed-ternary-operator) are inobj/Release/**generated files (the xUnit auto-generated entry point). They're already excluded bycodeql.yml'spaths-ignoreand will auto-close on the next scan ofmain— nothing to change in source.🤖 Generated with Claude Code