You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Since we're adding a new taint source, we add a tuple to the **sourceModel** extensible predicate.
386
+
- The first column, **"@example/middleware"**, begins the search at imports of the hypothetical NPM package **@example/middleware**.
387
+
- **Member[injectData]** selects accesses to the **injectData** member.
388
+
- **ReturnValue** selects the return value of the call to **injectData**.
389
+
- **GuardedRouteHandler** interprets the current value as a middleware function and selects all route handlers guarded by that middleware. Since the current value is passd to **app.use()**, the callback subsequently passed to **app.get()** is seen as a guarded route handler.
390
+
- **Parameter[0]** selects the first parameter of the callback (the parameter named **req**).
391
+
- **Member[data]** selects accesses to the **data** property of the **req** object.
392
+
- Finally, the kind **remote** indicates that this is considered a source of remote flow.
393
+
352
394
Reference material
353
395
------------------
354
396
@@ -494,6 +536,12 @@ Components related to decorators:
494
536
- **DecoratedParameter** selects a parameter that is decorated by the current value.
495
537
- **DecoratedMember** selects a method, field, or accessor that is decorated by the current value.
496
538
539
+
Additionally there is a component related to middleware functions:
540
+
541
+
- **GuardedRouteHandler** interprets the current value as a middleware function, and selects any route handler function that comes after it in the routing hierarchy.
542
+
This can be used to model properties injected onto request and response objects, such as **req.db** after a middleware that injects a database connection.
543
+
Note that this currently over-approximates the set of route handlers but may be made more accurate in the future.
544
+
497
545
Additional notes about the syntax of operands:
498
546
499
547
- Multiple operands may be given to a single component, as a shorthand for the union of the operands. For example, **Member[foo,bar]** matches the union of **Member[foo]** and **Member[bar]**.
0 commit comments