File tree Expand file tree Collapse file tree 2 files changed +0
-31
lines changed
lib/semmle/javascript/frameworks
test/query-tests/Security/CWE-094/CodeInjection Expand file tree Collapse file tree 2 files changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -244,20 +244,6 @@ module Fastify {
244
244
}
245
245
}
246
246
247
- /**
248
- * Gets the property name where user-controlled input is written to a request or response object
249
- * in a route handler. This is used to track taint flow through request and response object properties.
250
- */
251
- private string getUserControlledPropertyName ( ) {
252
- exists ( DataFlow:: PropWrite write , DataFlow:: Node source , RouteHandler rh |
253
- write .getBase * ( ) =
254
- [ rh .getARequestSource ( ) .ref ( ) .getALocalUse ( ) , rh .getAResponseSource ( ) .ref ( ) .getALocalUse ( ) ] and
255
- write .getPropertyName ( ) = result and
256
- write .getRhs ( ) = source and
257
- source = any ( Http:: RequestInputAccess ria ) .getASuccessor * ( )
258
- )
259
- }
260
-
261
247
/**
262
248
* An access to a user-controlled Fastify request input.
263
249
*/
@@ -272,20 +258,6 @@ module Fastify {
272
258
or
273
259
kind = "body" and
274
260
name = "body"
275
- or
276
- kind = "stored" and
277
- name = getUserControlledPropertyName ( )
278
- )
279
- or
280
- // Handle reading from reply object with user input stored on it
281
- exists ( string name |
282
- (
283
- this = rh .getAResponseSource ( ) .ref ( ) .getAPropertyRead ( name )
284
- or
285
- this = rh .getAResponseSource ( ) .ref ( ) .getAPropertyRead + ( ) .getAPropertyRead ( name )
286
- ) and
287
- kind = "stored" and
288
- name = getUserControlledPropertyName ( )
289
261
)
290
262
}
291
263
Original file line number Diff line number Diff line change 53
53
| fastify.js:59:23:59:31 | userInput | fastify.js:57:21:57:39 | request.query.input | fastify.js:59:23:59:31 | userInput | This code execution depends on a $@. | fastify.js:57:21:57:39 | request.query.input | user-provided value |
54
54
| fastify.js:71:34:71:51 | request.storedCode | fastify.js:66:24:66:36 | request.query | fastify.js:71:34:71:51 | request.storedCode | This code execution depends on a $@. | fastify.js:66:24:66:36 | request.query | user-provided value |
55
55
| fastify.js:71:34:71:51 | request.storedCode | fastify.js:66:24:66:47 | request ... redCode | fastify.js:71:34:71:51 | request.storedCode | This code execution depends on a $@. | fastify.js:66:24:66:47 | request ... redCode | user-provided value |
56
- | fastify.js:71:34:71:51 | request.storedCode | fastify.js:71:34:71:51 | request.storedCode | fastify.js:71:34:71:51 | request.storedCode | This code execution depends on a $@. | fastify.js:71:34:71:51 | request.storedCode | user-provided value |
57
56
| fastify.js:84:30:84:43 | reply.userCode | fastify.js:79:20:79:32 | request.query | fastify.js:84:30:84:43 | reply.userCode | This code execution depends on a $@. | fastify.js:79:20:79:32 | request.query | user-provided value |
58
57
| fastify.js:84:30:84:43 | reply.userCode | fastify.js:79:20:79:42 | request ... plyCode | fastify.js:84:30:84:43 | reply.userCode | This code execution depends on a $@. | fastify.js:79:20:79:42 | request ... plyCode | user-provided value |
59
- | fastify.js:84:30:84:43 | reply.userCode | fastify.js:84:30:84:43 | reply.userCode | fastify.js:84:30:84:43 | reply.userCode | This code execution depends on a $@. | fastify.js:84:30:84:43 | reply.userCode | user-provided value |
60
58
| fastify.js:99:30:99:52 | reply.l ... tedCode | fastify.js:94:29:94:41 | request.query | fastify.js:99:30:99:52 | reply.l ... tedCode | This code execution depends on a $@. | fastify.js:94:29:94:41 | request.query | user-provided value |
61
59
| fastify.js:99:30:99:52 | reply.l ... tedCode | fastify.js:94:29:94:51 | request ... plyCode | fastify.js:99:30:99:52 | reply.l ... tedCode | This code execution depends on a $@. | fastify.js:94:29:94:51 | request ... plyCode | user-provided value |
62
- | fastify.js:99:30:99:52 | reply.l ... tedCode | fastify.js:99:30:99:52 | reply.l ... tedCode | fastify.js:99:30:99:52 | reply.l ... tedCode | This code execution depends on a $@. | fastify.js:99:30:99:52 | reply.l ... tedCode | user-provided value |
63
60
| module.js:9:16:9:29 | req.query.code | module.js:9:16:9:29 | req.query.code | module.js:9:16:9:29 | req.query.code | This code execution depends on a $@. | module.js:9:16:9:29 | req.query.code | user-provided value |
64
61
| module.js:11:17:11:30 | req.query.code | module.js:11:17:11:30 | req.query.code | module.js:11:17:11:30 | req.query.code | This code execution depends on a $@. | module.js:11:17:11:30 | req.query.code | user-provided value |
65
62
| react-native.js:8:32:8:38 | tainted | react-native.js:7:17:7:33 | req.param("code") | react-native.js:8:32:8:38 | tainted | This code execution depends on a $@. | react-native.js:7:17:7:33 | req.param("code") | user-provided value |
You can’t perform that action at this time.
0 commit comments