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 11consistencyIssue
2+ | library-tests/frameworks/data/test.js:261 | expected an alert, but found none | NOT OK | |
23taintFlow
34| paramDecorator.ts:6:54:6:54 | x | paramDecorator.ts:7:10:7:10 | x |
45| 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 {
272272sink ( new MySubclass2 ( ) . baseclassSource ( ) ) ; // NOT OK
273273
274274sink ( 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
22import testUtilities.ConsistencyChecking
33import semmle.javascript.frameworks.data.internal.ApiGraphModels as ApiGraphModels
44
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+
516class BasicTaintTracking extends TaintTracking:: Configuration {
617 BasicTaintTracking ( ) { this = "BasicTaintTracking" }
718
You can’t perform that action at this time.
0 commit comments