@@ -35,18 +35,14 @@ module Twirp {
35
35
}
36
36
}
37
37
38
- /**
39
- * A type representing a protobuf message.
40
- */
38
+ /** A type representing a protobuf message. */
41
39
class ProtobufMessageType extends Type {
42
40
ProtobufMessageType ( ) {
43
41
this .hasLocationInfo ( any ( ProtobufGeneratedFile f ) .getAbsolutePath ( ) , _, _, _, _)
44
42
}
45
43
}
46
44
47
- /**
48
- * An interface type representing a Twirp service.
49
- */
45
+ /** An interface type representing a Twirp service. */
50
46
class ServiceInterfaceType extends InterfaceType {
51
47
NamedType namedType ;
52
48
@@ -55,20 +51,14 @@ module Twirp {
55
51
namedType .hasLocationInfo ( any ( ServicesGeneratedFile f ) .getAbsolutePath ( ) , _, _, _, _)
56
52
}
57
53
58
- /**
59
- * Gets the name of the interface.
60
- */
54
+ /** Gets the name of the interface. */
61
55
override string getName ( ) { result = namedType .getName ( ) }
62
56
63
- /**
64
- * Gets the named type on top of this interface type.
65
- */
57
+ /** Gets the named type on top of this interface type. */
66
58
NamedType getNamedType ( ) { result = namedType }
67
59
}
68
60
69
- /**
70
- * A Twirp client.
71
- */
61
+ /** A Twirp client. */
72
62
class ServiceClientType extends NamedType {
73
63
ServiceClientType ( ) {
74
64
exists ( ServiceInterfaceType i , PointerType p |
@@ -80,9 +70,7 @@ module Twirp {
80
70
}
81
71
}
82
72
83
- /**
84
- * A Twirp server.
85
- */
73
+ /** A Twirp server. */
86
74
class ServiceServerType extends NamedType {
87
75
ServiceServerType ( ) {
88
76
exists ( ServiceInterfaceType i |
@@ -93,9 +81,7 @@ module Twirp {
93
81
}
94
82
}
95
83
96
- /**
97
- * A Twirp function to construct a Client.
98
- */
84
+ /** A Twirp function to construct a Client. */
99
85
class ClientConstructor extends Function {
100
86
ClientConstructor ( ) {
101
87
this .getName ( ) .regexpMatch ( "(?i)new" + any ( ServiceClientType c ) .getName ( ) ) and
@@ -118,9 +104,7 @@ module Twirp {
118
104
}
119
105
}
120
106
121
- /**
122
- * An SSRF sink for the Client constructor.
123
- */
107
+ /** An SSRF sink for the Client constructor. */
124
108
class ClientRequestUrlAsSink extends RequestForgery:: Sink {
125
109
ClientRequestUrlAsSink ( ) {
126
110
exists ( DataFlow:: CallNode call |
@@ -134,9 +118,7 @@ module Twirp {
134
118
override string getKind ( ) { result = "URL" }
135
119
}
136
120
137
- /**
138
- * A service handler.
139
- */
121
+ /** A service handler. */
140
122
class ServiceHandler extends Method {
141
123
ServiceHandler ( ) {
142
124
exists ( DataFlow:: CallNode call |
@@ -147,9 +129,7 @@ module Twirp {
147
129
}
148
130
}
149
131
150
- /**
151
- * A request coming to the service handler.
152
- */
132
+ /** A request coming to the service handler. */
153
133
class Request extends UntrustedFlowSource:: Range instanceof DataFlow:: ParameterNode {
154
134
Request ( ) {
155
135
exists ( ServiceHandler handler |
0 commit comments