mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Merge pull request #21038 from github/path-combine-name-desc-update
Clarify Path.Combine call behavior
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/**
|
||||
* @name Call to System.IO.Path.Combine
|
||||
* @description Finds calls to System.IO.Path's Combine method
|
||||
* @name Call to 'System.IO.Path.Combine' may silently drop its earlier arguments
|
||||
* @description 'Path.Combine' may silently drop its earlier arguments
|
||||
* if its later arguments are absolute paths.
|
||||
* @kind problem
|
||||
* @problem.severity recommendation
|
||||
* @precision very-high
|
||||
@@ -15,4 +16,4 @@ 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' may silently drop its earlier arguments."
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: queryMetadata
|
||||
---
|
||||
* Updated the `name`, `description`, and alert message of `cs/path-combine` to have more details about why it's a problem.
|
||||
@@ -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' may silently drop its earlier arguments. |
|
||||
|
||||
Reference in New Issue
Block a user