File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
javascript/ql/test/library-tests/frameworks/data Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,11 @@ import * as testlib from 'testlib';
33// parameter decorators are only valid in TypeScript so this test is in a .ts file
44
55class C {
6- decoratedParamSource ( @testlib . ParamDecorator x ) {
6+ decoratedParamSource ( @testlib . ParamDecoratorSource x ) {
77 sink ( x ) // NOT OK
88 }
9+ decoratedParamSink ( @testlib . ParamDecoratorSink x ) { // NOT OK - though slightly weird alert location
10+ }
911}
12+
13+ new C ( ) . decoratedParamSink ( source ( ) ) ;
Original file line number Diff line number Diff line change 11consistencyIssue
22taintFlow
3- | paramDecorator.ts:6:48:6:48 | x | paramDecorator.ts:7:10:7:10 | x |
3+ | paramDecorator.ts:6:54:6:54 | x | paramDecorator.ts:7:10:7:10 | x |
4+ | paramDecorator.ts:13:28:13:35 | source() | paramDecorator.ts:9:50:9:50 | x |
45| test.js:5:30:5:37 | source() | test.js:5:8:5:38 | testlib ... urce()) |
56| test.js:6:22:6:29 | source() | test.js:6:8:6:30 | preserv ... urce()) |
67| test.js:7:41:7:48 | source() | test.js:7:8:7:49 | require ... urce()) |
@@ -56,6 +57,7 @@ taintFlow
5657| test.js:187:31:187:31 | x | test.js:189:10:189:10 | x |
5758| test.js:203:32:203:39 | source() | test.js:203:32:203:39 | source() |
5859isSink
60+ | paramDecorator.ts:9:50:9:50 | x | test-sink |
5961| test.js:54:18:54:25 | source() | test-sink |
6062| test.js:55:22:55:29 | source() | test-sink |
6163| test.js:57:24:57:31 | source() | test-sink |
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ class Sinks extends ModelInput::SinkModelCsv {
3737 "testlib;;Member[FieldDecoratorSink].DecoratedMember;test-sink" ,
3838 "testlib;;Member[MethodDecorator].DecoratedMember.ReturnValue;test-sink" ,
3939 "testlib;;Member[MethodDecoratorWithArgs].ReturnValue.DecoratedMember.ReturnValue;test-sink" ,
40+ "testlib;;Member[ParamDecoratorSink].DecoratedParameter;test-sink" ,
4041 ]
4142 }
4243}
@@ -48,7 +49,7 @@ class Sources extends ModelInput::SourceModelCsv {
4849 "testlib;;Member[getSource].ReturnValue;test-source" ,
4950 "testlib;;Member[ClassDecorator].DecoratedClass.Instance.Member[inputIsSource].Parameter[0];test-source" ,
5051 "testlib;;Member[FieldDecoratorSource].DecoratedMember;test-source" ,
51- "testlib;;Member[ParamDecorator ].DecoratedParameter;test-source" ,
52+ "testlib;;Member[ParamDecoratorSource ].DecoratedParameter;test-source" ,
5253 "testlib;;Member[MethodDecorator].DecoratedMember.Parameter[0];test-source" ,
5354 "testlib;;Member[MethodDecoratorWithArgs].ReturnValue.DecoratedMember.Parameter[0];test-source" ,
5455 ]
You can’t perform that action at this time.
0 commit comments