Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CodeQL recommendation against Path.Combine #18865

Merged
merged 7 commits into from
Mar 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Improvements
  • Loading branch information
carldybdahl-microsoft committed Mar 3, 2025
commit 2f7cdf1bfa927d7df33e75f28957996a9fbd5a31
3 changes: 1 addition & 2 deletions csharp/ql/src/Bad Practices/PathCombine.ql
Original file line number Diff line number Diff line change
@@ -6,12 +6,11 @@
* @precision very-high
* @id cs/path-combine
* @tags reliability
* readability
*/

import csharp
import semmle.code.csharp.frameworks.System

from MethodCall call
where call.getTarget().hasFullyQualifiedName("System.IO", "Path", "Combine")
select call, "Call to System.IO.Path.Combine."
select call, "Call to 'System.IO.Path.Combine'."
Original file line number Diff line number Diff line change
@@ -1 +1 @@
| PathCombine.cs:7:9:7:54 | call to method Combine | Call to System.IO.Path.Combine. |
| PathCombine.cs:7:9:7:54 | call to method Combine | Call to 'System.IO.Path.Combine'. |
Loading
Oops, something went wrong.