File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
rust/ql/src/queries/security/CWE-295 Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 1414import rust
1515import codeql.rust.dataflow.DataFlow
1616import codeql.rust.security.DisabledCertificateCheckExtensions
17+ import codeql.rust.Concepts
1718
1819/**
1920 * A taint configuration for disabled TLS certificate checks.
@@ -22,7 +23,11 @@ module DisabledCertificateCheckConfig implements DataFlow::ConfigSig {
2223 import DisabledCertificateCheckExtensions
2324
2425 predicate isSource ( DataFlow:: Node node ) {
26+ // the constant `true`
2527 node .asExpr ( ) .getExpr ( ) .( BooleanLiteralExpr ) .getTextValue ( ) = "true"
28+ or
29+ // a value controlled by a potential attacker
30+ node instanceof ActiveThreatModelSource
2631 }
2732
2833 predicate isSink ( DataFlow:: Node node ) { node instanceof Sink }
You can’t perform that action at this time.
0 commit comments