JS: Fix missing qldoc

This commit is contained in:
Asger F
2024-06-28 14:30:56 +02:00
parent e5924c1f84
commit 1d267efb6b
7 changed files with 16 additions and 6 deletions

View File

@@ -1762,7 +1762,9 @@ class MidPathNode extends PathNode, MkMidNode {
predicate isHidden() { PathNode::shouldNodeBeHidden(nd) }
}
/** Companion module to the `PathNode` class. */
module PathNode {
/** Holds if `nd` should be hidden in data flow paths. */
predicate shouldNodeBeHidden(DataFlow::Node nd) {
// Skip phi, refinement, and capture nodes
nd.(DataFlow::SsaDefinitionNode).getSsaVariable().getDefinition() instanceof

View File

@@ -12,6 +12,11 @@ abstract class SummarizedCallable extends LibraryCallable, Impl::Public::Summari
SummarizedCallable() { any() }
// TODO: rename 'propagatesFlowExt' and/or override 'propagatesFlow' directly
/**
* Holds if data may flow from `input` to `output` through this callable.
*
* `preservesValue` indicates whether this is a value-preserving step or a taint-step.
*/
pragma[nomagic]
predicate propagatesFlowExt(string input, string output, boolean preservesValue) { none() }

View File

@@ -187,7 +187,7 @@ module MakeStateBarrierGuard<
abstract predicate blocksExpr(boolean outcome, Expr test, FlowState state);
}
class ExplicitBarrierGuard extends BarrierGuard instanceof BaseGuard {
private class ExplicitBarrierGuard extends BarrierGuard instanceof BaseGuard {
override predicate blocksExpr(boolean outcome, Expr test, FlowState state) {
BaseGuard.super.blocksExpr(outcome, test, state)
}

View File

@@ -112,11 +112,9 @@ private class TEarlyStageNode =
* These module systems must therefore use `EarlyStageNode` instead of `DataFlow::Node`.
*/
class EarlyStageNode extends TEarlyStageNode {
/** Gets a string representation of this data flow node. */
string toString() { result = this.(DataFlow::Node).toString() }
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
) {
this.(DataFlow::Node).hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
}
/** Gets the location of this data flow node. */
Location getLocation() { result = this.(DataFlow::Node).getLocation() }
}

View File

@@ -1,3 +1,5 @@
/** Provides the instantiation of the shared data flow library. */
private import semmle.javascript.Locations
private import codeql.dataflow.DataFlow
private import DataFlowArg

View File

@@ -1,3 +1,5 @@
/** Provides the instantiation of the shared taint tracking library. */
private import semmle.javascript.Locations
private import codeql.dataflow.TaintTracking
private import DataFlowArg

View File

@@ -43,6 +43,7 @@ module UnsafeDynamicMethodAccessConfig implements DataFlow::StateConfigSig {
label.isTaint()
}
/** An additional flow step for use in both this configuration and the legacy configuration. */
additional predicate additionalFlowStep(
DataFlow::Node src, DataFlow::FlowLabel srclabel, DataFlow::Node dst,
DataFlow::FlowLabel dstlabel