Skip to content

Commit cfd5f53

Browse files
committed
Refactor Customizations libraries to use ThreatModelFlowSource
1 parent 8997f2c commit cfd5f53

11 files changed

+30
-30
lines changed

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

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

3333
/**
34-
* DEPRECATED: Use `RemoteFlowSource` or `Source` instead.
34+
* DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead.
3535
*/
36-
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
36+
deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource;
3737

3838
/** A source of untrusted data, considered as a taint source for command injection. */
39-
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
39+
private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { }
4040

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

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

Lines changed: 3 additions & 3 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 `RemoteFlowSource` or `Source` instead.
29+
* DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead.
3030
*/
31-
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
31+
deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource;
3232

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module MissingJwtSignatureCheck {
4949
}
5050
}
5151

52-
private class DefaultSource extends Source instanceof RemoteFlowSource { }
52+
private class DefaultSource extends Source instanceof ThreatModelFlowSource { }
5353

5454
private class DefaultSink extends Sink {
5555
DefaultSink() { sinkNode(this, "jwt") }

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

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

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

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

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

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

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

4242
/**
4343
* A third-party controllable input, considered as a flow source for reflected XSS.
4444
*/
45-
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
45+
private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { }
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: 3 additions & 3 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 `RemoteFlowSource` or `Source` instead.
36+
* DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead.
3737
*/
38-
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
38+
deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource;
3939

4040
/**
4141
* A third-party controllable input, considered as a flow source for request forgery.
4242
*/
43-
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
43+
private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { }
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: 3 additions & 3 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 `RemoteFlowSource` or `Source` instead.
29+
* DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead.
3030
*/
31-
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
31+
deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource;
3232

3333
/** A source of untrusted data, considered as a taint source for SQL injection. */
34-
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
34+
private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { }
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ module TaintedPath {
4545
}
4646

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

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module UncontrolledAllocationSize {
2121
abstract class Sanitizer extends DataFlow::Node { }
2222

2323
/** A source of untrusted data, considered as a taint source for uncontrolled size allocation vulnerabilities. */
24-
private class RemoteFlowAsSource extends Source instanceof RemoteFlowSource { }
24+
private class ThreatModelFlowAsSource extends Source instanceof ThreatModelFlowSource { }
2525

2626
/** The size argument of a memory allocation function. */
2727
private class AllocationSizeAsSink extends Sink instanceof AllocationSizeOverflow::AllocationSize {

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

Lines changed: 3 additions & 3 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 `RemoteFlowSource` or `Source` instead.
28+
* DEPRECATED: Use `ThreatModelFlowSource` or `Source` instead.
2929
*/
30-
deprecated class UntrustedFlowAsSource = RemoteFlowAsSource;
30+
deprecated class UntrustedFlowAsSource = ThreatModelFlowAsSource;
3131

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

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

0 commit comments

Comments
 (0)