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 {
244244 }
245245 }
246246
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-
261247 /**
262248 * An access to a user-controlled Fastify request input.
263249 */
@@ -272,20 +258,6 @@ module Fastify {
272258 or
273259 kind = "body" and
274260 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 ( )
289261 )
290262 }
291263
Original file line number Diff line number Diff line change 5353| 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 |
5454| 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 |
5555| 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 |
5756| 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 |
5857| 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 |
6058| 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 |
6159| 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 |
6360| 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 |
6461| 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 |
6562| 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