Skip to content

Commit 30623cd

Browse files
committed
Added modeling of underscore.string for str to array.
1 parent c256b9c commit 30623cd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

javascript/ql/lib/ext/underscore.string.model.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ extensions:
44
extensible: summaryModel
55
data:
66
- ["'underscore.string'", "Member[slugify,capitalize,decapitalize,clean,cleanDiacritics,swapCase,escapeHTML,unescapeHTML,wrap,dedent,reverse,pred,succ,titleize,camelize,classify,underscored,dasherize,humanize,trim,ltrim,rtrim,truncate,sprintf,strRight,strRightBack,strLeft,strLeftBack,stripTags,unquote,map]", "Argument[0]", "ReturnValue", "taint"]
7+
- ["'underscore.string'", "Member[chop,chars,words,lines]", "Argument[0]", "ReturnValue", "taint"]

javascript/ql/test/library-tests/TripleDot/underscore.string.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ function strToStr() {
3535
}
3636

3737
function strToArray() {
38-
sink(s.chop(source("s1"), 3)[0]); // $ MISSING: hasTaintFlow=s1
39-
sink(s.chars(source("s2")[0])); // $ MISSING: hasTaintFlow=s2
40-
sink(s.words(source("s3")[0])); // $ MISSING: hasTaintFlow=s3
41-
sink(s.lines(source("s7")[0])); // $ MISSING: hasTaintFlow=s7
38+
sink(s.chop(source("s1"), 3)[0]); // $ hasTaintFlow=s1
39+
sink(s.chars(source("s2")[0])); // $ hasTaintFlow=s2
40+
sink(s.words(source("s3")[0])); // $ hasTaintFlow=s3
41+
sink(s.lines(source("s7")[0])); // $ hasTaintFlow=s7
4242
}

0 commit comments

Comments
 (0)