diff --git a/ql/src/Security/CWE-020/ExternalAPISinkExample.go b/ql/src/Security/CWE-020/ExternalAPISinkExample.go index 002732488e1..43e5e022598 100644 --- a/ql/src/Security/CWE-020/ExternalAPISinkExample.go +++ b/ql/src/Security/CWE-020/ExternalAPISinkExample.go @@ -13,7 +13,7 @@ func serve() { // BAD: a request parameter is incorporated without validation into the response fmt.Fprintf(w, "%q is an unknown user", username) } else { - // TODO: do something exciting + // TODO: Handle successful login } }) http.ListenAndServe(":80", nil) diff --git a/ql/src/Security/CWE-020/ExternalAPIsUsedWithUntrustedData.qhelp b/ql/src/Security/CWE-020/ExternalAPIsUsedWithUntrustedData.qhelp index e39347034b2..7f23586d701 100644 --- a/ql/src/Security/CWE-020/ExternalAPIsUsedWithUntrustedData.qhelp +++ b/ql/src/Security/CWE-020/ExternalAPIsUsedWithUntrustedData.qhelp @@ -9,9 +9,9 @@ unique sources of untrusted data flow to this API. This query is designed primar may be relevant for security analysis of this application.
An external API is defined as a call to a function that is not defined in the source code and is not
-modeled as a taint step in the default taint library. Calls made in test files are also excluded.
+modeled as a taint step in the default taint library. Calls made in test files are excluded.
External APIs may be from the Go standard library, third party dependencies or from internal dependencies.
-The query will report the fully qualified method name, along with either [param x],
+The query will report the fully-qualified method name, along with either [param x],
where x indicates the position of the parameter receiving the untrusted data or [receiver]
indicating the untrusted data is used as the receiver of the method call.
If the query were to return the API fmt.Fprintf [param 2] then we should first consider
whether this a security relevant sink. In this case, this is writing to a HTTP response, so we should
consider whether this is an XSS sink. If it is, we should confirm that it is handled by the XSS query.
If the query were to return the API fmt.Sprintf [param 1], then this should be
reviewed as a possible taint step, because tainted data would flow from the 1st argument to the return value
of the call.
Using unsanitized untrusted data in an external API can cause a variety of security issues. This query reports external APIs that use untrusted data. The results have very little filtering so that you can audit almost all -examples. The query provides data for security reviews of the application and you can also use it to identify +examples. The query provides data for security reviews of the application. It can also be used to identify external APIs that should be modeled as either taint steps, or sinks for specific problems.
An external API is defined as a call to a function that is not defined in the source code and is not -modeled as a taint step in the default taint library. Calls made in test files are also excluded. +modeled as a taint step in the default taint library. Calls made in test files are excluded. External APIs may be from the Go standard library, third-party dependencies or from internal dependencies. The query reports uses of untrusted data in either the receiver or as one of the arguments of external APIs.
@@ -23,7 +23,7 @@ The query reports uses of untrusted data in either the receiver or as one of the that the result is a false positive because this data is sanitized.Using unsanitized untrusted data in an external API can cause a variety of security issues. This query reports external APIs that use untrusted data. The results have been filtered. The query provides data for security -reviews of the application and you can also use it to identify external APIs that should be modeled as either +reviews of the application. It can also be used to identify external APIs that should be modeled as either taint steps, or sinks for specific problems.
An external API is defined as a call to a function that is not defined in the source code and is not -modeled as a taint step in the default taint library. Calls made in test files are also excluded. +modeled as a taint step in the default taint library. Calls made in test files are excluded. External APIs may be from the Go standard library, third-party dependencies or from internal dependencies. The query reports uses of untrusted data in either the receiver or as one of the arguments of external APIs.
@@ -24,7 +24,7 @@ to not be a possible source of security vulnerabilities.