mirror of
https://github.com/github/codeql.git
synced 2026-05-30 11:01:24 +02:00
exclude intermediary data flow nodes from sinks
This commit is contained in:
@@ -11,8 +11,14 @@ private import semmle.javascript.filters.ClassifyFiles as ClassifyFiles
|
||||
private import semmle.javascript.heuristics.SyntacticHeuristics
|
||||
private import CoreKnowledge as CoreKnowledge
|
||||
|
||||
predicate isIntermediaryDataflowNode(DataFlow::Node n) {
|
||||
n instanceof DataFlow::ExceptionalInvocationReturnNode
|
||||
}
|
||||
|
||||
/** Provides a set of reasons why a given data flow node should be excluded as a sink candidate. */
|
||||
string getAReasonSinkExcluded(DataFlow::Node n) {
|
||||
isIntermediaryDataflowNode(n) and result = "intermediary dataflow node"
|
||||
or
|
||||
isArgumentToModeledFunction(n) and result = "argument to modeled function"
|
||||
or
|
||||
isArgumentToSinklessLibrary(n) and result = "argument to sinkless library"
|
||||
|
||||
Reference in New Issue
Block a user