-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathConditionalBypass.ql
More file actions
24 lines (22 loc) · 924 Bytes
/
ConditionalBypass.ql
File metadata and controls
24 lines (22 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
* @name User-controlled bypass of sensitive method
* @description User-controlled bypassing of sensitive methods may allow attackers to avoid
* passing through authentication systems.
* @kind path-problem
* @problem.severity error
* @security-severity 7.5
* @precision high
* @id cs/user-controlled-bypass
* @tags security
* external/cwe/cwe-807
* external/cwe/cwe-247
* external/cwe/cwe-350
*/
import csharp
import semmle.code.csharp.security.dataflow.ConditionalBypassQuery
import semmle.code.csharp.dataflow.DataFlow::DataFlow::PathGraph
from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
where config.hasFlowPath(source, sink)
select sink.getNode().(Sink).getSensitiveMethodCall(), source, sink,
"Sensitive method may not be executed depending on $@, which flows from $@.", sink.getNode(),
"this condition", source.getNode(), "user input"