Skip to content

Commit 9dbb9e1

Browse files
committed
Go: BadRedirectCheck
1 parent a074edd commit 9dbb9e1

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

go/ql/src/Security/CWE-601/BadRedirectCheck.ql

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,15 @@ module Config implements DataFlow::ConfigSig {
124124

125125
predicate isSink(DataFlow::Node sink) { sink instanceof OpenUrlRedirect::Sink }
126126

127-
predicate observeDiffInformedIncrementalMode() {
128-
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 175 (/Users/d10c/src/semmle-code/ql/go/ql/src/Security/CWE-601/BadRedirectCheck.ql@176:8:176:12)
129-
}
127+
predicate observeDiffInformedIncrementalMode() { any() }
130128

131129
Location getASelectedSourceLocation(DataFlow::Node source) {
132-
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 175 (/Users/d10c/src/semmle-code/ql/go/ql/src/Security/CWE-601/BadRedirectCheck.ql@176:8:176:12)
133-
}
134-
135-
Location getASelectedSinkLocation(DataFlow::Node sink) {
136-
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 175 (/Users/d10c/src/semmle-code/ql/go/ql/src/Security/CWE-601/BadRedirectCheck.ql@176:8:176:12)
130+
result = source.getLocation()
131+
or
132+
exists(DataFlow::Node check |
133+
isCheckedSource(source, check) and
134+
result = check.getLocation()
135+
)
137136
}
138137
}
139138

0 commit comments

Comments
 (0)