File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
javascript/ql/test/library-tests/frameworks/data Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
consistencyIssue
2
+ | library-tests/frameworks/data/test.js:261 | expected an alert, but found none | NOT OK | |
2
3
taintFlow
3
4
| paramDecorator.ts:6:54:6:54 | x | paramDecorator.ts:7:10:7:10 | x |
4
5
| test.js:5:30:5:37 | source() | test.js:5:8:5:38 | testlib ... urce()) |
Original file line number Diff line number Diff line change @@ -272,3 +272,9 @@ class MySubclass2 extends MySubclass {
272
272
sink ( new MySubclass2 ( ) . baseclassSource ( ) ) ; // NOT OK
273
273
274
274
sink ( testlib . parenthesizedPackageName ( ) ) ; // NOT OK
275
+
276
+ function dangerConstant ( ) {
277
+ sink ( "danger-constant" . danger ) ; // NOT OK
278
+ sink ( "danger-constant" . safe ) ; // OK
279
+ sink ( "danger-constant" ) ; // OK
280
+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,17 @@ import javascript
2
2
import testUtilities.ConsistencyChecking
3
3
import semmle.javascript.frameworks.data.internal.ApiGraphModels as ApiGraphModels
4
4
5
+ class TypeModelFromCodeQL extends ModelInput:: TypeModel {
6
+ override DataFlow:: Node getASource ( string type ) {
7
+ type = "danger-constant" and
8
+ result .getStringValue ( ) = "danger-constant"
9
+ }
10
+ }
11
+
12
+ class SourceFromDangerConstant extends ModelInput:: SourceModelCsv {
13
+ override predicate row ( string row ) { row = "danger-constant;Member[danger];test-source" }
14
+ }
15
+
5
16
class BasicTaintTracking extends TaintTracking:: Configuration {
6
17
BasicTaintTracking ( ) { this = "BasicTaintTracking" }
7
18
You can’t perform that action at this time.
0 commit comments