mirror of
https://github.com/github/codeql.git
synced 2026-02-11 20:51:06 +01:00
JS: Add overlay[global] to abstract classes with fields
Some abstract classes defines fields without binding them, leaving it up to the subclasses to bind them. When combined with overlay[local?], the charpred for such an abstract class can become local, while the subclasses are global. The means the charpred needs to be materialized, even though it doesn't bind the fields, leading to a cartesian product.
This commit is contained in:
@@ -192,6 +192,7 @@ module DOM {
|
||||
* A data flow node or other program element that may refer to
|
||||
* a DOM element.
|
||||
*/
|
||||
overlay[global]
|
||||
abstract class Element extends Locatable {
|
||||
ElementDefinition defn;
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ module EventRegistration {
|
||||
/**
|
||||
* A registration of an event handler on an EventEmitter.
|
||||
*/
|
||||
overlay[global]
|
||||
abstract class Range extends DataFlow::Node {
|
||||
EventEmitter::Range emitter;
|
||||
|
||||
@@ -148,6 +149,7 @@ module EventDispatch {
|
||||
/**
|
||||
* A dispatch of an event on an EventEmitter.
|
||||
*/
|
||||
overlay[global]
|
||||
abstract class Range extends DataFlow::Node {
|
||||
EventEmitter::Range emitter;
|
||||
|
||||
|
||||
@@ -260,6 +260,7 @@ module NodeJSLib {
|
||||
DataFlow::Node getRouteHandlerNode() { result = handler }
|
||||
}
|
||||
|
||||
overlay[global]
|
||||
abstract private class HeaderDefinition extends Http::Servers::StandardHeaderDefinition {
|
||||
ResponseNode r;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ module SQL {
|
||||
* An dataflow node that sanitizes a string to make it safe to embed into
|
||||
* a SQL command.
|
||||
*/
|
||||
overlay[global]
|
||||
abstract class SqlSanitizer extends DataFlow::Node {
|
||||
DataFlow::Node input;
|
||||
DataFlow::Node output;
|
||||
|
||||
@@ -129,6 +129,7 @@ module SecondOrderCommandInjection {
|
||||
/**
|
||||
* A sink that invokes a command described by the `VulnerableCommand` class.
|
||||
*/
|
||||
overlay[global]
|
||||
abstract class VulnerableCommandSink extends Sink {
|
||||
VulnerableCommand cmd;
|
||||
|
||||
|
||||
@@ -194,6 +194,7 @@ module TaintedPath {
|
||||
* There are currently four flow labels, representing the different combinations of
|
||||
* normalization and absoluteness.
|
||||
*/
|
||||
overlay[global]
|
||||
abstract class PosixPath extends DataFlow::FlowLabel {
|
||||
Normalization normalization;
|
||||
Relativeness relativeness;
|
||||
|
||||
@@ -101,6 +101,7 @@ module UnsafeHtmlConstruction {
|
||||
* A sink for `js/html-constructed-from-input` that constructs some HTML where
|
||||
* that HTML is later used in `xssSink`.
|
||||
*/
|
||||
overlay[global]
|
||||
abstract class XssSink extends Sink {
|
||||
DomBasedXss::Sink xssSink;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user