Skip to content

Conversation

@ATrefzer
Copy link
Owner

@ATrefzer ATrefzer commented Oct 8, 2025

Potential fix for https://github.com/ATrefzer/CSharpCodeAnalyst/security/code-scanning/186

To fix the flagged issue, replace the usage of Path.Combine(referenceFolder, outputFileName) with Path.Join(referenceFolder, outputFileName) at line 132 in ApprovalTestTool/Program.cs. This change avoids the risk of the first argument being dropped if the second argument is an absolute path; Path.Join will always join both, even if the second is absolute.

Only the single line needs changing. No additional imports or modifications are necessary, as both Path.Combine and Path.Join are members of System.IO.Path.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

….Combine Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@ATrefzer ATrefzer closed this Oct 8, 2025
@ATrefzer ATrefzer deleted the alert-autofix-186 branch October 9, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants