Skip to content

Commit b6f6bdc

Browse files
committed
Make RemoteFlowAsSource private
`UntrustedFlowAsSource` should have been private. Since we are deprecating them anyway we may as well make the replacement private (and make it use `instanceof`). The deprecation comments have been updated.
1 parent a49b43f commit b6f6bdc

11 files changed

+20
-20
lines changed

go/ql/lib/change-notes/2024-04-18-untrustedflowsource-renamed-remoteflowsource.md

Whitespace-only changes.

go/ql/lib/semmle/go/security/CommandInjectionCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ module CommandInjection {
3030
abstract class Sanitizer extends DataFlow::Node { }
3131

3232
/**
33-
* DEPRECATED: Use `RemoteFlowAsSource` instead.
33+
* DEPRECATED: Use `RemoteFlowSource` or `Source` instead.
3434
*/
3535
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
3636

3737
/** A source of untrusted data, considered as a taint source for command injection. */
38-
class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
38+
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
3939

4040
/** A command name, considered as a taint sink for command injection. */
4141
class CommandNameAsSink extends Sink {

go/ql/lib/semmle/go/security/LogInjectionCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ module LogInjection {
2626
abstract class Sanitizer extends DataFlow::Node { }
2727

2828
/**
29-
* DEPRECATED: Use `RemoteFlowAsSource` instead.
29+
* DEPRECATED: Use `RemoteFlowSource` or `Source` instead.
3030
*/
3131
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
3232

3333
/** A source of untrusted data, considered as a taint source for log injection. */
34-
class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
34+
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
3535

3636
/** An argument to a logging mechanism. */
3737
class LoggerSink extends Sink {

go/ql/lib/semmle/go/security/OpenUrlRedirectCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ module OpenUrlRedirect {
4343
}
4444

4545
/**
46-
* DEPRECATED: Use `RemoteFlowAsSource` instead.
46+
* DEPRECATED: Use `RemoteFlowSource` or `Source` instead.
4747
*/
4848
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
4949

5050
/**
5151
* A source of third-party user input, considered as a flow source for URL redirects.
5252
*/
53-
class RemoteFlowAsSource extends Source, RemoteFlowSource {
53+
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource {
5454
RemoteFlowAsSource() {
5555
// exclude some fields and methods of URLs that are generally not attacker-controllable for
5656
// open redirect exploits

go/ql/lib/semmle/go/security/ReflectedXssCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ module ReflectedXss {
3535
}
3636

3737
/**
38-
* DEPRECATED: Use `RemoteFlowAsSource` instead.
38+
* DEPRECATED: Use `RemoteFlowSource` or `Source` instead.
3939
*/
4040
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
4141

4242
/**
4343
* A third-party controllable input, considered as a flow source for reflected XSS.
4444
*/
45-
class RemoteFlowAsSource extends Source, RemoteFlowSource { }
45+
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
4646

4747
/** An arbitrary XSS sink, considered as a flow sink for stored XSS. */
4848
private class AnySink extends Sink instanceof SharedXss::Sink { }

go/ql/lib/semmle/go/security/RequestForgeryCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ module RequestForgery {
3333
abstract class SanitizerEdge extends DataFlow::Node { }
3434

3535
/**
36-
* DEPRECATED: Use `RemoteFlowAsSource` instead.
36+
* DEPRECATED: Use `RemoteFlowSource` or `Source` instead.
3737
*/
3838
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
3939

4040
/**
4141
* A third-party controllable input, considered as a flow source for request forgery.
4242
*/
43-
class RemoteFlowAsSource extends Source, RemoteFlowSource { }
43+
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
4444

4545
/**
4646
* The URL of an HTTP request, viewed as a sink for request forgery.

go/ql/lib/semmle/go/security/SqlInjectionCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ module SqlInjection {
2626
abstract class Sanitizer extends DataFlow::Node { }
2727

2828
/**
29-
* DEPRECATED: Use `RemoteFlowAsSource` instead.
29+
* DEPRECATED: Use `RemoteFlowSource` or `Source` instead.
3030
*/
3131
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
3232

3333
/** A source of untrusted data, considered as a taint source for SQL injection. */
34-
class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
34+
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
3535

3636
/** An SQL string, considered as a taint sink for SQL injection. */
3737
class SqlQueryAsSink extends Sink instanceof SQL::QueryString { }

go/ql/lib/semmle/go/security/TaintedPathCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ module TaintedPath {
4545
}
4646

4747
/**
48-
* DEPRECATED: Use `RemoteFlowAsSource` instead.
48+
* DEPRECATED: Use `RemoteFlowSource` or `Source` instead.
4949
*/
5050
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
5151

5252
/** A source of untrusted data, considered as a taint source for path traversal. */
53-
class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
53+
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
5454

5555
/** A path expression, considered as a taint sink for path traversal. */
5656
class PathAsSink extends Sink {

go/ql/lib/semmle/go/security/XPathInjectionCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ module XPathInjection {
2525
abstract class Sanitizer extends DataFlow::ExprNode { }
2626

2727
/**
28-
* DEPRECATED: Use `RemoteFlowAsSource` instead.
28+
* DEPRECATED: Use `RemoteFlowSource` or `Source` instead.
2929
*/
3030
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
3131

3232
/** A source of untrusted data, used in an XPath expression. */
33-
class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
33+
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
3434

3535
/** An XPath expression string, considered as a taint sink for XPath injection. */
3636
class XPathExpressionStringAsSink extends Sink instanceof XPath::XPathExpressionString { }

go/ql/src/Security/CWE-640/EmailInjectionCustomizations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ module EmailInjection {
1717
abstract class Sink extends DataFlow::Node { }
1818

1919
/**
20-
* DEPRECATED: Use `RemoteFlowSourceAsSource` instead.
20+
* DEPRECATED: Use `RemoteFlowSource` or `Source` instead.
2121
*/
2222
deprecated class UntrustedFlowSourceAsSource = RemoteFlowSourceAsSource;
2323

2424
/** A source of untrusted data, considered as a taint source for email injection. */
25-
class RemoteFlowSourceAsSource extends Source instanceof RemoteFlowSource { }
25+
private class RemoteFlowSourceAsSource extends Source instanceof RemoteFlowSource { }
2626

2727
/**
2828
* A data-flow node that becomes part of an email considered as a taint sink for email injection.

0 commit comments

Comments
 (0)