File tree Expand file tree Collapse file tree 3 files changed +10
-15
lines changed
test/library-tests/frameworks/data Expand file tree Collapse file tree 3 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -813,12 +813,6 @@ module API {
813813 lbl = Label:: decoratedMember ( ) and
814814 ref = DataFlow:: valueNode ( method .getBody ( ) )
815815 )
816- or
817- exists ( Parameter param |
818- useNodeFlowsToDecorator ( base , param .getADecorator ( ) ) and
819- lbl = Label:: decoratedParameter ( ) and
820- ref = DataFlow:: parameterNode ( param )
821- )
822816 }
823817
824818 /** Holds if `ref` is a use that should have an incoming edge from `base` labelled `lbl`, induced by a decorator. */
@@ -829,6 +823,12 @@ module API {
829823 lbl = Label:: decoratedMember ( ) and
830824 ref = DataFlow:: parameterNode ( accessor .getBody ( ) .getParameter ( 0 ) )
831825 )
826+ or
827+ exists ( Parameter param |
828+ useNodeFlowsToDecorator ( base , param .getADecorator ( ) ) and
829+ lbl = Label:: decoratedParameter ( ) and
830+ ref = DataFlow:: parameterNode ( param )
831+ )
832832 }
833833
834834 /** Holds if `rhs` is a def node that should have an incoming edge from `base` labelled `lbl`, induced by a decorator. */
Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ class C {
66 decoratedParamSource ( @testlib . ParamDecoratorSource x ) {
77 sink ( x ) // NOT OK
88 }
9- decoratedParamSink ( @testlib . ParamDecoratorSink x ) { // NOT OK - though slightly weird alert location
9+ decoratedParamSink ( @testlib . ParamDecoratorSink x ) { // OK
1010 }
1111 decoratedParamSink2 ( @testlib . ParamDecoratorSink x ) { // OK
12- x . push ( source ( ) ) ;
12+ x . push ( source ( ) ) ; // OK
1313 }
1414}
1515
16- new C ( ) . decoratedParamSink ( source ( ) ) ;
17- new C ( ) . decoratedParamSink2 ( [ ] ) ;
16+ new C ( ) . decoratedParamSink ( source ( ) ) ; // OK - parameter decorators can't be used to mark the parameter as a sink
17+ new C ( ) . decoratedParamSink2 ( [ ] ) ; // OK
Original file line number Diff line number Diff line change 11consistencyIssue
2- | library-tests/frameworks/data/paramDecorator.ts:11 | did not expect an alert, but found an alert for BasicTaintTracking | OK | |
32taintFlow
43| paramDecorator.ts:6:54:6:54 | x | paramDecorator.ts:7:10:7:10 | x |
5- | paramDecorator.ts:12:12:12:19 | source() | paramDecorator.ts:11:51:11:51 | x |
6- | paramDecorator.ts:16:28:16:35 | source() | paramDecorator.ts:9:50:9:50 | x |
74| test.js:5:30:5:37 | source() | test.js:5:8:5:38 | testlib ... urce()) |
85| test.js:6:22:6:29 | source() | test.js:6:8:6:30 | preserv ... urce()) |
96| test.js:7:41:7:48 | source() | test.js:7:8:7:49 | require ... urce()) |
@@ -59,8 +56,6 @@ taintFlow
5956| test.js:187:31:187:31 | x | test.js:189:10:189:10 | x |
6057| test.js:203:32:203:39 | source() | test.js:203:32:203:39 | source() |
6158isSink
62- | paramDecorator.ts:9:50:9:50 | x | test-sink |
63- | paramDecorator.ts:11:51:11:51 | x | test-sink |
6459| test.js:54:18:54:25 | source() | test-sink |
6560| test.js:55:22:55:29 | source() | test-sink |
6661| test.js:57:24:57:31 | source() | test-sink |
You can’t perform that action at this time.
0 commit comments