mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: Add threat model sources as additional sources for the query.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
import rust
|
||||
import codeql.rust.dataflow.DataFlow
|
||||
import codeql.rust.security.DisabledCertificateCheckExtensions
|
||||
import codeql.rust.Concepts
|
||||
|
||||
/**
|
||||
* A taint configuration for disabled TLS certificate checks.
|
||||
@@ -22,7 +23,11 @@ module DisabledCertificateCheckConfig implements DataFlow::ConfigSig {
|
||||
import DisabledCertificateCheckExtensions
|
||||
|
||||
predicate isSource(DataFlow::Node node) {
|
||||
// the constant `true`
|
||||
node.asExpr().getExpr().(BooleanLiteralExpr).getTextValue() = "true"
|
||||
or
|
||||
// a value controlled by a potential attacker
|
||||
node instanceof ActiveThreatModelSource
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node node) { node instanceof Sink }
|
||||
|
||||
Reference in New Issue
Block a user