@@ -36,13 +36,23 @@ class HandlerParameterOfExposedService extends HandlerParameter {
3636
3737/**
3838 * Reads of property belonging to a request parameter that is exposed to a protocol.
39+ * It currently models the following access paths:
40+ * - `req.data` (from `cds.Event.data`)
41+ * - `req.params` (from `cds.Request.params`)
42+ * - `req.headers` (from `cds.Event.headers`)
43+ * - `req.http.req` (from `cds.EventContext.http.req`)
44+ * - `req.id` (from `cds.EventContext.id`)
3945 */
40- class PayloadPropertyReadOfHandlerParameterOfExposedService extends RemoteFlowSource instanceof PropRead
46+ class UserProvidedPropertyReadOfHandlerParameterOfExposedService extends RemoteFlowSource instanceof PropRead
4147{
4248 HandlerParameterOfExposedService handlerParameterOfExposedService ;
4349
44- PayloadPropertyReadOfHandlerParameterOfExposedService ( ) {
45- this = handlerParameterOfExposedService .getAPropertyRead ( )
50+ UserProvidedPropertyReadOfHandlerParameterOfExposedService ( ) {
51+ /* 1. `req.(data|params|headers|id)` */
52+ this = handlerParameterOfExposedService .getAPropertyRead ( [ "data" , "params" , "headers" , "id" ] )
53+ or
54+ /* 2. `req.http.req` */
55+ this = handlerParameterOfExposedService .getAPropertyRead ( "http" ) .getAPropertyRead ( "req" )
4656 }
4757
4858 HandlerParameterOfExposedService getHandlerParameter ( ) {
@@ -52,6 +62,7 @@ class PayloadPropertyReadOfHandlerParameterOfExposedService extends RemoteFlowSo
5262 Handler getHandler ( ) { result = handlerParameterOfExposedService .getHandler ( ) }
5363
5464 override string getSourceType ( ) {
55- result = "Parameter of an event handler belonging to an exposed service"
65+ result =
66+ "Tainted property read of the request parameter of an event handler belonging to an exposed service"
5667 }
5768}
0 commit comments