mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Replace string kind with boolean preservesValue
This commit is contained in:
@@ -96,7 +96,7 @@ abstract class SummarizedCallable extends LibraryCallable {
|
||||
* but uses an external (string) representation of the input and output stacks.
|
||||
*/
|
||||
pragma[nomagic]
|
||||
predicate propagatesFlowExt(string input, string output, string kind) { none() }
|
||||
predicate propagatesFlowExt(string input, string output, boolean preservesValue) { none() }
|
||||
|
||||
/**
|
||||
* Holds if values stored inside `content` are cleared on objects passed as
|
||||
|
||||
@@ -45,9 +45,10 @@ DataFlowType getCallbackReturnType(DataFlowType t, ReturnKind rk) { any() }
|
||||
* `input`, output specification `output`, and kind `kind`.
|
||||
*/
|
||||
predicate summaryElement(DataFlowCallable c, string input, string output, string kind) {
|
||||
exists(FlowSummary::SummarizedCallable sc |
|
||||
sc.propagatesFlowExt(input, output, kind) and
|
||||
c.asLibraryCallable() = sc
|
||||
exists(FlowSummary::SummarizedCallable sc, boolean preservesValue |
|
||||
sc.propagatesFlowExt(input, output, preservesValue) and
|
||||
c.asLibraryCallable() = sc and
|
||||
if preservesValue = true then kind = "value" else kind = "taint"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user