mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Constrain location overrides to actual sources/sinks
This commit is contained in:
@@ -124,6 +124,7 @@ module UncontrolledArithConfig implements DataFlow::ConfigSig {
|
||||
predicate observeDiffInformedIncrementalMode() { any() }
|
||||
|
||||
Location getASelectedSourceLocation(DataFlow::Node source) {
|
||||
isSource(source) and
|
||||
result = [getExpr(source).getLocation(), source.getLocation()]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ module HttpStringToUrlOpenConfig implements DataFlow::ConfigSig {
|
||||
predicate observeDiffInformedIncrementalMode() { any() }
|
||||
|
||||
Location getASelectedSourceLocation(DataFlow::Node source) {
|
||||
isSource(source) and
|
||||
result = [source.asIndirectExpr().getLocation(), source.getLocation()]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user