Skip to content

fix: use Path.Join instead of Path.Combine in CLI test - #213

Merged
Daniel Kristiansen (dakristia) merged 2 commits into
mainfrom
fix/path-combine
Sep 3, 2026
Merged

fix: use Path.Join instead of Path.Combine in CLI test#213
Daniel Kristiansen (dakristia) merged 2 commits into
mainfrom
fix/path-combine

Conversation

@dakristia

@dakristia Daniel Kristiansen (dakristia) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Resolves CodeQL alert 54.

Replaces Path.Combine with Path.Join in CliIntegrationTests.cs to avoid silently dropping earlier path arguments.

@dakristia

Daniel Kristiansen (dakristia) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Context on CodeQL alert 54: the second argument here is a file name built from a fresh GUID, so it can never be an absolute path and Path.Combine could never drop the temp directory. The alert is a false positive in practice. Switching to Path.Join is still worth it: same result for this input, no surprising drop behavior, and it closes the alert without leaving a dismissal record. Severity is "note", test code only, no security angle.

@dakristia
Daniel Kristiansen (dakristia) merged commit 396d240 into main Sep 3, 2026
13 checks passed
@dakristia
Daniel Kristiansen (dakristia) deleted the fix/path-combine branch September 3, 2026 18:57
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.

2 participants