Skip to content

Replace Path.Combine with Path.Join - #241

Merged
enteriaza merged 1 commit into
masterfrom
cs-path-combine
Oct 22, 2026
Merged

enteriaza merged 1 commit into
masterfrom
cs-path-combine

Conversation

@enteriaza

Copy link
Copy Markdown
Collaborator

Summary

Replace Path.Combine with Path.Join across VectorNNTPD to address CodeQL's cs/path-combine reliability findings.

Path.Combine discards preceding path components when a subsequent component is rooted. Path.Join preserves the preceding components, preventing this unexpected path-construction behaviour.

Changes

  • Replaced 103 Path.Combine call sites across 13 existing files.
  • Updated path construction in production code and test fixtures.
  • Added AcmePathJoinTests to verify rooted-segment behaviour, ACME directory layout, and the intended path-joining convention.
  • Added no CodeQL suppressions.
  • Left existing ApplicationLocalPath path-containment handling unchanged.

Validation

  • Release x64 build: passed.
  • Focused ACME, path, and gzip tests: 36 passed.
  • Common.Tests: 1,149 passed on retry after initial ACME static-hook race failures.
  • BackFillerService.Tests: 1,400 passed.
  • dotnet format --verify-no-changes: passed.
  • Native AOT publish: win-x64 and linux-x64 passed.
  • Local CodeQL analysis: completed successfully, with zero cs/path-combine findings in SARIF.

Notes

The GitHub baseline contained 98 open cs/path-combine alerts, while the source audit identified 103 call sites. Remote GitHub Security results and CI have not yet been revalidated against this change; those results remain pending a push and subsequent analysis.

@enteriaza enteriaza self-assigned this Oct 22, 2026
@enteriaza enteriaza added the enhancement New feature or request label Oct 22, 2026
@enteriaza
enteriaza merged commit a7e31c4 into master Oct 22, 2026
7 checks passed
@enteriaza
enteriaza deleted the cs-path-combine branch October 22, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant