mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
JS: Make API::EntryPoint overrides optional
This commit is contained in:
@@ -569,10 +569,10 @@ module API {
|
||||
deprecated DataFlow::SourceNode getARhs() { none() }
|
||||
|
||||
/** Gets a data-flow node where a value enters the current codebase through this entry-point. */
|
||||
abstract DataFlow::SourceNode getASource();
|
||||
DataFlow::SourceNode getASource() { none() }
|
||||
|
||||
/** Gets a data-flow node where a value leaves the current codebase through this entry-point. */
|
||||
abstract DataFlow::Node getASink();
|
||||
DataFlow::Node getASink() { none() }
|
||||
|
||||
/** Gets an API-node for this entry point. */
|
||||
API::Node getANode() { result = root().getASuccessor(Label::entryPoint(this)) }
|
||||
|
||||
@@ -10,8 +10,6 @@ module D3 {
|
||||
D3GlobalEntry() { this = "D3GlobalEntry" }
|
||||
|
||||
override DataFlow::SourceNode getASource() { result = DataFlow::globalVarRef("d3") }
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
/** Gets an API node referring to the `d3` module. */
|
||||
|
||||
@@ -9,8 +9,6 @@ module History {
|
||||
HistoryGlobalEntry() { this = "HistoryLibrary" }
|
||||
|
||||
override DataFlow::SourceNode getASource() { result = DataFlow::globalVarRef("HistoryLibrary") }
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,8 +17,6 @@ private module Immutable {
|
||||
ImmutableGlobalEntry() { this = "ImmutableGlobalEntry" }
|
||||
|
||||
override DataFlow::SourceNode getASource() { result = DataFlow::globalVarRef("Immutable") }
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,8 +36,6 @@ private module Console {
|
||||
ConsoleGlobalEntry() { this = "ConsoleGlobalEntry" }
|
||||
|
||||
override DataFlow::SourceNode getASource() { result = DataFlow::globalVarRef("console") }
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -143,8 +143,6 @@ module NestJS {
|
||||
override DataFlow::SourceNode getASource() {
|
||||
result.(DataFlow::ClassNode).getName() = "ValidationPipe"
|
||||
}
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
/** Gets an API node referring to the constructor of `ValidationPipe` */
|
||||
|
||||
@@ -1096,8 +1096,6 @@ module Redux {
|
||||
private class HeuristicConnectEntryPoint extends API::EntryPoint {
|
||||
HeuristicConnectEntryPoint() { this = "react-redux-connect" }
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
|
||||
override DataFlow::SourceNode getASource() {
|
||||
exists(DataFlow::CallNode call |
|
||||
call.getAnArgument().asExpr().(Identifier).getName() =
|
||||
|
||||
@@ -660,8 +660,6 @@ module Templating {
|
||||
override DataFlow::SourceNode getASource() {
|
||||
result = any(TemplatePlaceholderTag tag).getInnerTopLevel().getAVariableUse("include")
|
||||
}
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,8 +15,6 @@ module TrustedTypes {
|
||||
TrustedTypesEntry() { this = "TrustedTypesEntry" }
|
||||
|
||||
override DataFlow::SourceNode getASource() { result = DataFlow::globalVarRef("trustedTypes") }
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
private API::Node trustedTypesObj() { result = any(TrustedTypesEntry entry).getANode() }
|
||||
|
||||
@@ -10,8 +10,6 @@ module Vue {
|
||||
GlobalVueEntryPoint() { this = "VueEntryPoint" }
|
||||
|
||||
override DataFlow::SourceNode getASource() { result = DataFlow::globalVarRef("Vue") }
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -22,8 +20,6 @@ module Vue {
|
||||
private class VueExportEntryPoint extends API::EntryPoint {
|
||||
VueExportEntryPoint() { this = "VueExportEntryPoint" }
|
||||
|
||||
override DataFlow::SourceNode getASource() { none() }
|
||||
|
||||
override DataFlow::Node getASink() {
|
||||
result = any(SingleFileComponent c).getModule().getDefaultOrBulkExport()
|
||||
}
|
||||
@@ -490,8 +486,6 @@ module Vue {
|
||||
result = imprt.getImportedModuleNode()
|
||||
)
|
||||
}
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,8 +63,6 @@ private class GlobalApiEntryPoint extends API::EntryPoint {
|
||||
|
||||
override DataFlow::SourceNode getASource() { result = DataFlow::globalVarRef(global) }
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
|
||||
/** Gets the name of the global variable. */
|
||||
string getGlobal() { result = global }
|
||||
}
|
||||
|
||||
@@ -165,8 +165,6 @@ private class ExternalRemoteFlowSourceSpecEntryPoint extends API::EntryPoint {
|
||||
string getName() { result = name }
|
||||
|
||||
override DataFlow::SourceNode getASource() { result = DataFlow::globalVarRef(name) }
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,8 +2,6 @@ class CustomEntryPoint extends API::EntryPoint {
|
||||
CustomEntryPoint() { this = "CustomEntryPoint" }
|
||||
|
||||
override DataFlow::SourceNode getASource() { result = DataFlow::globalVarRef("CustomEntryPoint") }
|
||||
|
||||
override DataFlow::Node getASink() { none() }
|
||||
}
|
||||
|
||||
import ApiGraphs.VerifyAssertions
|
||||
|
||||
Reference in New Issue
Block a user