File tree Expand file tree Collapse file tree 7 files changed +13
-0
lines changed
cpp/ql/src/Security/CWE/CWE-020
csharp/ql/lib/semmle/code/csharp/security/dataflow
go/ql/lib/semmle/go/security
javascript/ql/lib/semmle/javascript/security/dataflow
java/ql/lib/semmle/code/java/security
python/ql/src/Security/CWE-020-ExternalAPIs Expand file tree Collapse file tree 7 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ class UntrustedExternalApiDataNode extends ExternalApiDataNode {
21
21
/** DEPRECATED: Alias for UntrustedExternalApiDataNode */
22
22
deprecated class UntrustedExternalAPIDataNode = UntrustedExternalApiDataNode ;
23
23
24
+ /** An external API which is used with untrusted data. */
24
25
private newtype TExternalApi =
26
+ /** An untrusted API method `m` where untrusted data is passed at `index`. */
25
27
TExternalApiParameter ( Function f , int index ) {
26
28
exists ( UntrustedExternalApiDataNode n |
27
29
f = n .getExternalFunction ( ) and
Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ class UntrustedExternalApiDataNode extends ExternalApiDataNode {
21
21
/** DEPRECATED: Alias for UntrustedExternalApiDataNode */
22
22
deprecated class UntrustedExternalAPIDataNode = UntrustedExternalApiDataNode ;
23
23
24
+ /** An external API which is used with untrusted data. */
24
25
private newtype TExternalApi =
26
+ /** An untrusted API method `m` where untrusted data is passed at `index`. */
25
27
TExternalApiParameter ( Function f , int index ) {
26
28
exists ( UntrustedExternalApiDataNode n |
27
29
f = n .getExternalFunction ( ) and
Original file line number Diff line number Diff line change @@ -102,7 +102,9 @@ class UntrustedExternalApiDataNode extends ExternalApiDataNode {
102
102
/** DEPRECATED: Alias for UntrustedExternalApiDataNode */
103
103
deprecated class UntrustedExternalAPIDataNode = UntrustedExternalApiDataNode ;
104
104
105
+ /** An external API which is used with untrusted data. */
105
106
private newtype TExternalApi =
107
+ /** An untrusted API method `m` where untrusted data is passed at `index`. */
106
108
TExternalApiParameter ( Callable m , int index ) {
107
109
exists ( UntrustedExternalApiDataNode n |
108
110
m = n .getCallable ( ) .getUnboundDeclaration ( ) and
Original file line number Diff line number Diff line change @@ -195,7 +195,9 @@ class UntrustedExternalApiDataNode extends ExternalApiDataNode {
195
195
/** DEPRECATED: Alias for UntrustedExternalApiDataNode */
196
196
deprecated class UntrustedExternalAPIDataNode = UntrustedExternalApiDataNode ;
197
197
198
+ /** An external API which is used with untrusted data. */
198
199
private newtype TExternalApi =
200
+ /** An untrusted API method `m` where untrusted data is passed at `index`. */
199
201
TExternalApiParameter ( Function m , int index ) {
200
202
exists ( UntrustedExternalApiDataNode n |
201
203
m = n .getFunction ( ) and
Original file line number Diff line number Diff line change @@ -126,7 +126,9 @@ class UntrustedExternalApiDataNode extends ExternalApiDataNode {
126
126
/** DEPRECATED: Alias for UntrustedExternalApiDataNode */
127
127
deprecated class UntrustedExternalAPIDataNode = UntrustedExternalApiDataNode ;
128
128
129
+ /** An external API which is used with untrusted data. */
129
130
private newtype TExternalApi =
131
+ /** An untrusted API method `m` where untrusted data is passed at `index`. */
130
132
TExternalApiParameter ( Method m , int index ) {
131
133
exists ( UntrustedExternalApiDataNode n |
132
134
m = n .getMethod ( ) and
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ deprecated class UntrustedExternalAPIDataNode = UntrustedExternalApiDataNode;
81
81
* Name of an external API sink, boxed in a newtype for consistency with other languages.
82
82
*/
83
83
private newtype TExternalApi =
84
+ /** An external API sink with `name`. */
84
85
MkExternalApiNode ( string name ) {
85
86
exists ( Sink sink |
86
87
any ( Configuration c ) .hasFlow ( _, sink ) and
Original file line number Diff line number Diff line change @@ -129,7 +129,9 @@ class UntrustedExternalApiDataNode extends ExternalApiDataNode {
129
129
/** DEPRECATED: Alias for UntrustedExternalApiDataNode */
130
130
deprecated class UntrustedExternalAPIDataNode = UntrustedExternalApiDataNode ;
131
131
132
+ /** An external API which is used with untrusted data. */
132
133
private newtype TExternalApi =
134
+ /** An untrusted API method `m` where untrusted data is passed at `index`. */
133
135
TExternalApiParameter ( DataFlowPrivate:: DataFlowCallable callable , int index ) {
134
136
exists ( UntrustedExternalApiDataNode n |
135
137
callable = n .getCallable ( ) and
You can’t perform that action at this time.
0 commit comments