Skip to content

Commit 2280469

Browse files
authored
Merge pull request github#15902 from michaelnebel/csharp/uncontrolledformatstring
C#: Remove hard-coded local sources from the uncontrolled-format-string query.
2 parents 9aefdca + 560b355 commit 2280469

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

csharp/ql/src/Security Features/CWE-134/UncontrolledFormatString.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ import semmle.code.csharp.frameworks.Format
1717
import FormatString::PathGraph
1818

1919
module FormatStringConfig implements DataFlow::ConfigSig {
20-
predicate isSource(DataFlow::Node source) {
21-
source instanceof ThreatModelFlowSource or source instanceof LocalFlowSource
22-
}
20+
predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource }
2321

2422
predicate isSink(DataFlow::Node sink) {
2523
sink.asExpr() = any(FormatCall call | call.hasInsertions()).getFormatExpr()

0 commit comments

Comments
 (0)