mirror of
https://github.com/github/codeql.git
synced 2026-01-29 22:32:58 +01:00
Insecure-TLS: Use DataFlow::Node::getRoot, and factor getEnclosingFunction
This commit is contained in:
@@ -239,8 +239,8 @@ where
|
||||
// Exclude sources or sinks that occur lexically within a block related to a feature or legacy flag
|
||||
not astNodeIsFlag([source, sink].getNode().asExpr().getParent*(), [featureFlag(), legacyFlag()]) and
|
||||
// Exclude results in functions whose name documents insecurity
|
||||
not exists(FuncDef fn | fn = sink.getNode().asInstruction().getRoot() |
|
||||
isFeatureFlagName(fn.getEnclosingFunction*().getName()) or
|
||||
isLegacyFlagName(fn.getEnclosingFunction*().getName())
|
||||
not exists(FuncDef fn | fn = sink.getNode().getRoot().getEnclosingFunction*() |
|
||||
isFeatureFlagName(fn.getName()) or
|
||||
isLegacyFlagName(fn.getName())
|
||||
)
|
||||
select sink.getNode(), source, sink, message
|
||||
|
||||
Reference in New Issue
Block a user