JS: Add some missing qldoc

This commit is contained in:
Asger F
2024-12-13 13:27:37 +01:00
parent d993c888b1
commit ac6da6c2b1
7 changed files with 15 additions and 0 deletions

View File

@@ -26,6 +26,9 @@ module TaintedObject {
ConcreteTaintedObjectLabel() { this = this }
}
/**
* DEPRECATED. Use `isAdditionalFlowStep(node1, state1, node2, state2)` instead.
*/
deprecated predicate step(Node src, Node trg, FlowLabel inlbl, FlowLabel outlbl) {
isAdditionalFlowStep(src, FlowState::fromFlowLabel(inlbl), trg, FlowState::fromFlowLabel(outlbl))
}

View File

@@ -27,6 +27,7 @@ module ExceptionXss {
this = TNotYetThrown() and result = "not-yet-thrown"
}
/** Gets the corresponding flow label. */
deprecated DataFlow::FlowLabel toFlowLabel() {
this = TThrown() and result.isTaint()
or
@@ -36,6 +37,7 @@ module ExceptionXss {
/** Predicates for working with flow states. */
module FlowState {
/** Gets the flow state corresponding to `label`. */
deprecated FlowState fromFlowLabel(DataFlow::FlowLabel label) { result.toFlowLabel() = label }
/** A tainted value originating from a thrown and caught exception. */

View File

@@ -21,6 +21,7 @@ module HardcodedDataInterpretedAsCode {
this = TModified() and result = "modified"
}
/** Gets the corresponding flow label. */
deprecated DataFlow::FlowLabel toFlowLabel() {
this = TUnmodified() and result.isData()
or
@@ -30,6 +31,7 @@ module HardcodedDataInterpretedAsCode {
/** Predicates for working with flow states. */
module FlowState {
/** Gets the flow state corresponding to `label`. */
deprecated FlowState fromFlowLabel(DataFlow::FlowLabel label) { result.toFlowLabel() = label }
/** An unmodified value originating from a string constant. */

View File

@@ -23,6 +23,7 @@ module InsecureDownload {
this = TInsecureUrl() and result = "insecure-url"
}
/** Gets the corresponding flow label. */
deprecated DataFlow::FlowLabel toFlowLabel() {
this = TSensitiveInsecureUrl() and result instanceof Label::SensitiveInsecureUrl
or
@@ -32,6 +33,7 @@ module InsecureDownload {
/** Predicates for working with flow states. */
module FlowState {
/** Gets the flow state corresponding to `label`. */
deprecated FlowState fromFlowLabel(DataFlow::FlowLabel label) { result.toFlowLabel() = label }
/**

View File

@@ -23,6 +23,7 @@ module PrototypePollutingAssignment {
this = TObjectPrototype() and result = "object-prototype"
}
/** Gets the corresponding flow label. */
deprecated DataFlow::FlowLabel toFlowLabel() {
this = TTaint() and result.isTaint()
or
@@ -32,6 +33,7 @@ module PrototypePollutingAssignment {
/** Predicates for working with flow states. */
module FlowState {
/** Gets the flow state corresponding to `label`. */
deprecated FlowState fromFlowLabel(DataFlow::FlowLabel label) { result.toFlowLabel() = label }
/** A tainted value. */

View File

@@ -23,6 +23,7 @@ module UnsafeDynamicMethodAccess {
this = TUnsafeFunction() and result = "unsafe-function"
}
/** Gets the corresponding flow label. */
deprecated DataFlow::FlowLabel toFlowLabel() {
this = TTaint() and result.isTaint()
or
@@ -32,6 +33,7 @@ module UnsafeDynamicMethodAccess {
/** Predicates for working with flow states. */
module FlowState {
/** Gets the flow state corresponding to `label`. */
deprecated FlowState fromFlowLabel(DataFlow::FlowLabel label) { result.toFlowLabel() = label }
/** A tainted value. */

View File

@@ -26,6 +26,7 @@ module UnvalidatedDynamicMethodCall {
this = TMaybeFromProto() and result = "maybe-from-proto"
}
/** Gets the corresponding flow label. */
deprecated DataFlow::FlowLabel toFlowLabel() {
this = TTaint() and result.isTaint()
or
@@ -37,6 +38,7 @@ module UnvalidatedDynamicMethodCall {
/** Predicates for working with flow states. */
module FlowState {
/** Gets the flow state corresponding to `label`. */
deprecated FlowState fromFlowLabel(DataFlow::FlowLabel label) { result.toFlowLabel() = label }
/** A tainted value. */