We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41b4d70 commit 6790028Copy full SHA for 6790028
1 file changed
csharp/ql/src/Security Features/CWE-020/RuntimeChecksBypass.ql
@@ -13,16 +13,16 @@
13
*/
14
15
import semmle.code.csharp.serialization.Serialization
16
+import semmle.code.csharp.controlflow.Guards
17
18
/**
19
* The result is a write to the field `f`, assigning it the value
20
* of variable `v` which was checked by the condition `check`.
21
-Expr checkedWrite(Field f, Variable v, IfStmt check) {
22
+GuardedExpr checkedWrite(Field f, Variable v, IfStmt check) {
23
result = v.getAnAccess() and
24
result = f.getAnAssignedValue() and
- check.getCondition() = v.getAnAccess().getParent*() and
25
- result.getAControlFlowNode() = check.getAControlFlowNode().getASuccessor*()
+ check.getCondition().getAChildExpr*() = result.getAGuard(_, _)
26
}
27
28
0 commit comments