We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2da0814 commit 8145264Copy full SHA for 8145264
1 file changed
rust/ql/src/queries/security/CWE-295/DisabledCertificateCheck.ql
@@ -14,6 +14,7 @@
14
import rust
15
import codeql.rust.dataflow.DataFlow
16
import codeql.rust.security.DisabledCertificateCheckExtensions
17
+import codeql.rust.Concepts
18
19
/**
20
* A taint configuration for disabled TLS certificate checks.
@@ -22,7 +23,11 @@ module DisabledCertificateCheckConfig implements DataFlow::ConfigSig {
22
23
import DisabledCertificateCheckExtensions
24
25
predicate isSource(DataFlow::Node node) {
26
+ // the constant `true`
27
node.asExpr().getExpr().(BooleanLiteralExpr).getTextValue() = "true"
28
+ or
29
+ // a value controlled by a potential attacker
30
+ node instanceof ActiveThreatModelSource
31
}
32
33
predicate isSink(DataFlow::Node node) { node instanceof Sink }
0 commit comments