File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
javascript/ql/src/semmle/javascript/dataflow Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -280,8 +280,13 @@ module FlowLabel {
280280/**
281281 * A node that can act as a barrier when appearing in a condition.
282282 *
283- * To use this barrier in `Configuration` `cfg`, add this barrier to the
284- * extent of `cfg.isBarrierGuard`.
283+ * To add a barrier guard to a configuration, define a subclass of this class overriding the
284+ * `blocks` predicate, and then extend the configuration's `isBarrierGuard` predicate to include
285+ * the new class.
286+ *
287+ * Note that it is generally a good idea to make the characteristic predicate of barrier guard
288+ * classes as precise as possible: if two subclasses of `BarrierGuardNode` overlap, their
289+ * implementations of `blocks` will _both_ apply to any configuration that includes either of them.
285290 */
286291abstract class BarrierGuardNode extends DataFlow:: Node {
287292 /**
Original file line number Diff line number Diff line change @@ -143,6 +143,15 @@ module TaintTracking {
143143
144144 /**
145145 * A node that can act as a sanitizer when appearing in a condition.
146+ *
147+ * To add a sanitizer guard to a configuration, define a subclass of this class overriding the
148+ * `sanitizes` predicate, and then extend the configuration's `isSanitizerGuard` predicate to
149+ * include the new class.
150+ *
151+ * Note that it is generally a good idea to make the characteristic predicate of sanitizer guard
152+ * classes as precise as possible: if two subclasses of `SanitizerGuardNode` overlap, their
153+ * implementations of `sanitizes` will _both_ apply to any configuration that includes either of
154+ * them.
146155 */
147156 abstract class SanitizerGuardNode extends DataFlow:: BarrierGuardNode {
148157 override predicate blocks ( boolean outcome , Expr e ) { sanitizes ( outcome , e ) }
You can’t perform that action at this time.
0 commit comments