JavaScript: Autoformat

This commit is contained in:
Anders Schack-Mulligen
2023-02-17 12:24:39 +01:00
parent 21d5fa836b
commit 8d97fe9ed3
65 changed files with 320 additions and 172 deletions

View File

@@ -11,19 +11,21 @@ private import semmle.javascript.frameworks.ConnectExpressShared
* Add `NodeJSLib::RouteHandlerCandidate` to the extent of `NodeJSLib::RouteHandler`.
*/
private class PromotedNodeJSLibCandidate extends NodeJSLib::RouteHandler,
Http::Servers::StandardRouteHandler instanceof NodeJSLib::RouteHandlerCandidate { }
Http::Servers::StandardRouteHandler instanceof NodeJSLib::RouteHandlerCandidate
{ }
/**
* Add `Hapi::RouteHandlerCandidate` to the extent of `Hapi::RouteHandler`.
*/
private class PromotedHapiCandidate extends Hapi::RouteHandler, Http::Servers::StandardRouteHandler instanceof Hapi::RouteHandlerCandidate {
}
private class PromotedHapiCandidate extends Hapi::RouteHandler, Http::Servers::StandardRouteHandler instanceof Hapi::RouteHandlerCandidate
{ }
/**
* Add `ConnectExpressShared::RouteHandlerCandidate` to the extent of `Express::RouteHandler`.
*/
private class PromotedExpressCandidate extends Express::RouteHandler,
Http::Servers::StandardRouteHandler instanceof ConnectExpressShared::RouteHandlerCandidate {
Http::Servers::StandardRouteHandler instanceof ConnectExpressShared::RouteHandlerCandidate
{
override DataFlow::ParameterNode getRouteHandlerParameter(string kind) {
result = ConnectExpressShared::getRouteHandlerParameter(this, kind)
}
@@ -33,7 +35,8 @@ private class PromotedExpressCandidate extends Express::RouteHandler,
* Add `ConnectExpressShared::RouteHandlerCandidate` to the extent of `Connect::RouteHandler`.
*/
private class PromotedConnectCandidate extends Connect::RouteHandler,
Http::Servers::StandardRouteHandler instanceof ConnectExpressShared::RouteHandlerCandidate {
Http::Servers::StandardRouteHandler instanceof ConnectExpressShared::RouteHandlerCandidate
{
override DataFlow::ParameterNode getRouteHandlerParameter(string kind) {
result = ConnectExpressShared::getRouteHandlerParameter(this, kind)
}
@@ -43,7 +46,8 @@ private class PromotedConnectCandidate extends Connect::RouteHandler,
* Add `Restify::RouteHandlerCandidate` to the extent of `Restify::RouteHandler`.
*/
private class PromotedRestifyCandidate extends Restify::RouteHandler,
Http::Servers::StandardRouteHandler {
Http::Servers::StandardRouteHandler
{
PromotedRestifyCandidate() { this instanceof Restify::RouteHandlerCandidate }
}
@@ -51,6 +55,7 @@ private class PromotedRestifyCandidate extends Restify::RouteHandler,
* Add `Spife::RouteHandlerCandidate` to the extent of `Spife::RouteHandler`.
*/
private class PromotedSpifeCandidate extends Spife::RouteHandler,
Http::Servers::StandardRouteHandler {
Http::Servers::StandardRouteHandler
{
PromotedSpifeCandidate() { this instanceof Spife::RouteHandlerCandidate }
}

View File

@@ -22,7 +22,8 @@ private import HeuristicSinks as Sinks
class HeuristicSink = Sinks::HeuristicSink;
private class HeuristicCodeInjectionSink extends Sinks::HeuristicCodeInjectionSink,
CodeInjection::Sink { }
CodeInjection::Sink
{ }
private class HeuristicCommandInjectionSink extends HeuristicSink, CommandInjection::Sink {
HeuristicCommandInjectionSink() {

View File

@@ -27,7 +27,8 @@ private class RemoteFlowPassword extends HeuristicSource, RemoteFlowSource {
* since it does not properly escape single quotes and dollar symbols.
*/
private class JsonStringifyAsCommandInjectionSource extends HeuristicSource,
CommandInjection::Source instanceof JsonStringifyCall {
CommandInjection::Source instanceof JsonStringifyCall
{
override string getSourceType() { result = "a string from JSON.stringify" }
}