run the implicit-this patch

This commit is contained in:
erik-krogh
2022-08-22 21:23:31 +02:00
parent a593a52b5e
commit 28083ebe09
12 changed files with 46 additions and 44 deletions

View File

@@ -135,7 +135,7 @@ class XmlFile extends XmlParent, File {
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
/** DEPRECATED: Alias for getADtd */
deprecated XmlDTD getADTD() { result = getADtd() }
deprecated XmlDTD getADTD() { result = this.getADtd() }
}
/** DEPRECATED: Alias for XmlFile */
@@ -291,7 +291,7 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
string getUri() { xmlNs(this, _, result, _) }
/** DEPRECATED: Alias for getUri */
deprecated string getURI() { result = getUri() }
deprecated string getURI() { result = this.getUri() }
/** Holds if this namespace has no prefix. */
predicate isDefault() { this.getPrefix() = "" }

View File

@@ -99,7 +99,7 @@ class FormsElement extends XmlElement {
}
/** DEPRECATED: Alias for getRequireSsl */
deprecated string getRequireSSL() { result = getRequireSsl() }
deprecated string getRequireSSL() { result = this.getRequireSsl() }
/**
* Holds if `requireSSL` value is true.
@@ -107,7 +107,7 @@ class FormsElement extends XmlElement {
predicate isRequireSsl() { this.getRequireSsl() = "true" }
/** DEPRECATED: Alias for isRequireSsl */
deprecated predicate isRequireSSL() { isRequireSsl() }
deprecated predicate isRequireSSL() { this.isRequireSsl() }
}
/** A `<httpCookies>` tag in an ASP.NET configuration file. */
@@ -134,7 +134,7 @@ class HttpCookiesElement extends XmlElement {
}
/** DEPRECATED: Alias for getRequireSsl */
deprecated string getRequireSSL() { result = getRequireSsl() }
deprecated string getRequireSSL() { result = this.getRequireSsl() }
/**
* Holds if there is any chance that `requireSSL` is set to `true` either globally or for Forms.
@@ -147,5 +147,5 @@ class HttpCookiesElement extends XmlElement {
}
/** DEPRECATED: Alias for isRequireSsl */
deprecated predicate isRequireSSL() { isRequireSsl() }
deprecated predicate isRequireSSL() { this.isRequireSsl() }
}

View File

@@ -135,7 +135,7 @@ class XmlFile extends XmlParent, File {
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
/** DEPRECATED: Alias for getADtd */
deprecated XmlDTD getADTD() { result = getADtd() }
deprecated XmlDTD getADTD() { result = this.getADtd() }
}
/** DEPRECATED: Alias for XmlFile */
@@ -291,7 +291,7 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
string getUri() { xmlNs(this, _, result, _) }
/** DEPRECATED: Alias for getUri */
deprecated string getURI() { result = getUri() }
deprecated string getURI() { result = this.getUri() }
/** Holds if this namespace has no prefix. */
predicate isDefault() { this.getPrefix() = "" }

View File

@@ -125,7 +125,7 @@ class MicrosoftOwinIOwinRequestClass extends Class {
}
/** DEPRECATED: Alias for getUriProperty */
deprecated Property getURIProperty() { result = getUriProperty() }
deprecated Property getURIProperty() { result = this.getUriProperty() }
}
/** A `Microsoft.Owin.*String` class. */

View File

@@ -69,9 +69,9 @@ import semmle.go.frameworks.stdlib.TextTemplate
/** A `String()` method. */
class StringMethod extends TaintTracking::FunctionModel, Method {
StringMethod() {
getName() = "String" and
getNumParameter() = 0 and
getResultType(0) = Builtin::string_().getType()
this.getName() = "String" and
this.getNumParameter() = 0 and
this.getResultType(0) = Builtin::string_().getType()
}
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
@@ -132,7 +132,8 @@ module URL {
/** The `PathEscape` or `QueryEscape` function. */
class Escaper extends TaintTracking::FunctionModel {
Escaper() {
hasQualifiedName("net/url", "PathEscape") or hasQualifiedName("net/url", "QueryEscape")
this.hasQualifiedName("net/url", "PathEscape") or
this.hasQualifiedName("net/url", "QueryEscape")
}
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
@@ -143,7 +144,8 @@ module URL {
/** The `PathUnescape` or `QueryUnescape` function. */
class Unescaper extends TaintTracking::FunctionModel {
Unescaper() {
hasQualifiedName("net/url", "PathUnescape") or hasQualifiedName("net/url", "QueryUnescape")
this.hasQualifiedName("net/url", "PathUnescape") or
this.hasQualifiedName("net/url", "QueryUnescape")
}
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
@@ -154,10 +156,10 @@ module URL {
/** The `Parse`, `ParseQuery` or `ParseRequestURI` function, or the `URL.Parse` method. */
class Parser extends TaintTracking::FunctionModel {
Parser() {
hasQualifiedName("net/url", "Parse") or
this.hasQualifiedName("net/url", "Parse") or
this.(Method).hasQualifiedName("net/url", "URL", "Parse") or
hasQualifiedName("net/url", "ParseQuery") or
hasQualifiedName("net/url", "ParseRequestURI")
this.hasQualifiedName("net/url", "ParseQuery") or
this.hasQualifiedName("net/url", "ParseRequestURI")
}
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
@@ -192,7 +194,7 @@ module URL {
/** A method that returns a part of a URL. */
class UrlGetter extends TaintTracking::FunctionModel, Method {
UrlGetter() {
exists(string m | hasQualifiedName("net/url", "URL", m) |
exists(string m | this.hasQualifiedName("net/url", "URL", m) |
m = ["EscapedPath", "Hostname", "Port", "Query", "RequestURI"]
)
}
@@ -204,7 +206,7 @@ module URL {
/** The method `URL.MarshalBinary`. */
class UrlMarshalBinary extends TaintTracking::FunctionModel, Method {
UrlMarshalBinary() { hasQualifiedName("net/url", "URL", "MarshalBinary") }
UrlMarshalBinary() { this.hasQualifiedName("net/url", "URL", "MarshalBinary") }
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
inp.isReceiver() and outp.isResult(0)
@@ -213,7 +215,7 @@ module URL {
/** The method `URL.ResolveReference`. */
class UrlResolveReference extends TaintTracking::FunctionModel, Method {
UrlResolveReference() { hasQualifiedName("net/url", "URL", "ResolveReference") }
UrlResolveReference() { this.hasQualifiedName("net/url", "URL", "ResolveReference") }
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
(inp.isReceiver() or inp.isParameter(0)) and
@@ -224,8 +226,8 @@ module URL {
/** The function `User` or `UserPassword`. */
class UserinfoConstructor extends TaintTracking::FunctionModel {
UserinfoConstructor() {
hasQualifiedName("net/url", "User") or
hasQualifiedName("net/url", "UserPassword")
this.hasQualifiedName("net/url", "User") or
this.hasQualifiedName("net/url", "UserPassword")
}
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
@@ -236,7 +238,7 @@ module URL {
/** A method that returns a part of a Userinfo struct. */
class UserinfoGetter extends TaintTracking::FunctionModel, Method {
UserinfoGetter() {
exists(string m | hasQualifiedName("net/url", "Userinfo", m) |
exists(string m | this.hasQualifiedName("net/url", "Userinfo", m) |
m = "Password" or
m = "Username"
)
@@ -250,7 +252,7 @@ module URL {
/** A method that returns all or part of a Values map. */
class ValuesGetter extends TaintTracking::FunctionModel, Method {
ValuesGetter() {
exists(string m | hasQualifiedName("net/url", "Values", m) |
exists(string m | this.hasQualifiedName("net/url", "Values", m) |
m = "Encode" or
m = "Get"
)

View File

@@ -246,7 +246,7 @@ abstract class BusinessInterface extends Interface {
abstract SessionEjb getAnEjb();
/** DEPRECATED: Alias for getAnEjb */
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
/** Holds if this business interface is declared local. */
abstract predicate isDeclaredLocal();
@@ -275,7 +275,7 @@ class XmlSpecifiedBusinessInterface extends BusinessInterface {
}
/** DEPRECATED: Alias for getAnEjb */
deprecated override SessionEJB getAnEJB() { result = getAnEjb() }
deprecated override SessionEJB getAnEJB() { result = this.getAnEjb() }
override predicate isDeclaredLocal() {
exists(EjbJarXmlFile f |
@@ -314,7 +314,7 @@ class AnnotatedBusinessInterface extends BusinessInterface {
}
/** DEPRECATED: Alias for getAnEjb */
deprecated override SessionEJB getAnEJB() { result = getAnEjb() }
deprecated override SessionEJB getAnEJB() { result = this.getAnEjb() }
override predicate isDeclaredLocal() { this instanceof LocalAnnotatedBusinessInterface }
@@ -451,7 +451,7 @@ class XmlSpecifiedRemoteInterface extends LegacyEjbRemoteInterface {
}
/** DEPRECATED: Alias for getAnEjb */
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
}
/** A legacy remote home interface. */
@@ -471,7 +471,7 @@ class AnnotatedRemoteHomeInterface extends LegacyEjbRemoteHomeInterface {
SessionEjb getAnEjb() { result.getAnAnnotation().(RemoteHomeAnnotation).getANamedType() = this }
/** DEPRECATED: Alias for getAnEjb */
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
/** Gets a remote interface associated with this legacy remote home interface. */
Interface getAnAssociatedRemoteInterface() { result = this.getACreateMethod().getReturnType() }
@@ -496,7 +496,7 @@ class XmlSpecifiedRemoteHomeInterface extends LegacyEjbRemoteHomeInterface {
}
/** DEPRECATED: Alias for getAnEjb */
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
}
/** A legacy local interface. */
@@ -524,7 +524,7 @@ class XmlSpecifiedLocalInterface extends LegacyEjbLocalInterface {
}
/** DEPRECATED: Alias for getAnEjb */
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
}
/** A legacy local home interface. */
@@ -544,7 +544,7 @@ class AnnotatedLocalHomeInterface extends LegacyEjbLocalHomeInterface {
SessionEjb getAnEjb() { result.getAnAnnotation().(LocalHomeAnnotation).getANamedType() = this }
/** DEPRECATED: Alias for getAnEjb */
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
/** Gets a local interface associated with this legacy local home interface. */
Interface getAnAssociatedLocalInterface() { result = this.getACreateMethod().getReturnType() }
@@ -569,7 +569,7 @@ class XmlSpecifiedLocalHomeInterface extends LegacyEjbLocalHomeInterface {
}
/** DEPRECATED: Alias for getAnEjb */
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
}
/**
@@ -594,7 +594,7 @@ class RemoteInterface extends Interface {
}
/** DEPRECATED: Alias for getAnEjb */
deprecated SessionEJB getAnEJB() { result = getAnEjb() }
deprecated SessionEJB getAnEJB() { result = this.getAnEjb() }
/**
* A "remote method" is a method that is available on the remote

View File

@@ -41,5 +41,5 @@ class SensitiveLoggerConfiguration extends TaintTracking::Configuration {
sanitizer.getType() instanceof TypeType
}
override predicate isSanitizerIn(Node node) { isSource(node) }
override predicate isSanitizerIn(Node node) { this.isSource(node) }
}

View File

@@ -135,7 +135,7 @@ class XmlFile extends XmlParent, File {
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
/** DEPRECATED: Alias for getADtd */
deprecated XmlDTD getADTD() { result = getADtd() }
deprecated XmlDTD getADTD() { result = this.getADtd() }
}
/** DEPRECATED: Alias for XmlFile */
@@ -291,7 +291,7 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
string getUri() { xmlNs(this, _, result, _) }
/** DEPRECATED: Alias for getUri */
deprecated string getURI() { result = getUri() }
deprecated string getURI() { result = this.getUri() }
/** Holds if this namespace has no prefix. */
predicate isDefault() { this.getPrefix() = "" }

View File

@@ -135,7 +135,7 @@ class XmlFile extends XmlParent, File {
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
/** DEPRECATED: Alias for getADtd */
deprecated XmlDTD getADTD() { result = getADtd() }
deprecated XmlDTD getADTD() { result = this.getADtd() }
}
/** DEPRECATED: Alias for XmlFile */
@@ -291,7 +291,7 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
string getUri() { xmlNs(this, _, result, _) }
/** DEPRECATED: Alias for getUri */
deprecated string getURI() { result = getUri() }
deprecated string getURI() { result = this.getUri() }
/** Holds if this namespace has no prefix. */
predicate isDefault() { this.getPrefix() = "" }

View File

@@ -104,7 +104,7 @@ class DomMethodCallExpr extends MethodCallExpr {
}
/** DEPRECATED: Alias for interpretsArgumentsAsUrl */
deprecated predicate interpretsArgumentsAsURL(Expr arg) { interpretsArgumentsAsUrl(arg) }
deprecated predicate interpretsArgumentsAsURL(Expr arg) { this.interpretsArgumentsAsUrl(arg) }
/** DEPRECATED: Alias for interpretsArgumentsAsHtml */
deprecated predicate interpretsArgumentsAsHTML(Expr arg) { this.interpretsArgumentsAsHtml(arg) }

View File

@@ -135,7 +135,7 @@ class XmlFile extends XmlParent, File {
XmlDtd getADtd() { xmlDTDs(result, _, _, _, this) }
/** DEPRECATED: Alias for getADtd */
deprecated XmlDTD getADTD() { result = getADtd() }
deprecated XmlDTD getADTD() { result = this.getADtd() }
}
/** DEPRECATED: Alias for XmlFile */
@@ -291,7 +291,7 @@ class XmlNamespace extends XmlLocatable, @xmlnamespace {
string getUri() { xmlNs(this, _, result, _) }
/** DEPRECATED: Alias for getUri */
deprecated string getURI() { result = getUri() }
deprecated string getURI() { result = this.getUri() }
/** Holds if this namespace has no prefix. */
predicate isDefault() { this.getPrefix() = "" }

View File

@@ -146,7 +146,7 @@ private module Ldap {
}
/** DEPRECATED: Alias for useSsl */
deprecated override predicate useSSL() { useSsl() }
deprecated override predicate useSSL() { this.useSsl() }
}
/**
@@ -241,7 +241,7 @@ private module Ldap {
}
/** DEPRECATED: Alias for useSsl */
deprecated override predicate useSSL() { useSsl() }
deprecated override predicate useSSL() { this.useSsl() }
}
/**