Skip to content

Commit fba16d2

Browse files
committed
Python: Bring back Path Injection query
Which was accidentially removed when resolving a merge conflict.
1 parent da16fad commit fba16d2

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* @name Uncontrolled data used in path expression
3+
* @description Accessing paths influenced by users can allow an attacker to access unexpected resources.
4+
* @kind path-problem
5+
* @problem.severity error
6+
* @sub-severity high
7+
* @precision high
8+
* @id py/path-injection
9+
* @tags correctness
10+
* security
11+
* external/owasp/owasp-a1
12+
* external/cwe/cwe-022
13+
* external/cwe/cwe-023
14+
* external/cwe/cwe-036
15+
* external/cwe/cwe-073
16+
* external/cwe/cwe-099
17+
*/
18+
19+
import python
20+
import semmle.python.security.dataflow.PathInjection
21+
22+
from CustomPathNode source, CustomPathNode sink
23+
where pathInjection(source, sink)
24+
select sink, source, sink, "This path depends on $@.", source, "a user-provided value"

0 commit comments

Comments
 (0)