Skip to content

Commit fc6b779

Browse files
committed
Added modeling for aliases.
1 parent dcc1e88 commit fc6b779

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@ extensions:
44
extensible: typeModel
55
data:
66
- ["'underscore.string'.Wrapper", "'underscore.string'", "ReturnValue"]
7-
- ["'underscore.string'.Wrapper", "'underscore.string'.Wrapper", "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,value].ReturnValue"]
8-
- ["'underscore.string'.Wrapper", "'underscore.string'.Wrapper", "Member[insert,replaceAll,join,splice,prune,pad,lpad,rpad,repeat,surround,quote].ReturnValue"]
7+
- ["'underscore.string'.Wrapper", "'underscore.string'.Wrapper", "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,value,strip,lstrip,rstrip,camelcase].ReturnValue"]
8+
- ["'underscore.string'.Wrapper", "'underscore.string'.Wrapper", "Member[insert,replaceAll,join,splice,prune,pad,lpad,rpad,repeat,surround,quote,q,rjust,ljust].ReturnValue"]
99
- ["'underscore.string'.Wrapper", "'underscore.string'.Wrapper", "Member[toUpperCase,toLowerCase,replace,slice,substring,substr,concat].ReturnValue"]
1010

1111
- addsTo:
1212
pack: codeql/javascript-all
1313
extensible: summaryModel
1414
data:
15-
- ["'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"]
15+
- ["'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,strip,lstrip,rstrip,camelcase]", "Argument[0]", "ReturnValue", "taint"]
1616
- ["'underscore.string'", "Member[chop,chars,words,lines]", "Argument[0]", "ReturnValue", "taint"]
1717
- ["'underscore.string'", "Member[toSentence,toSentenceSerial]", "Argument[0].ArrayElement", "ReturnValue", "taint"]
18-
- ["'underscore.string'", "Member[insert,replaceAll,splice,prune,pad,lpad,rpad,repeat]", "Argument[0,2]", "ReturnValue", "taint"]
18+
- ["'underscore.string'", "Member[insert,replaceAll,splice,prune,pad,lpad,rpad,repeat,rjust,ljust]", "Argument[0,2]", "ReturnValue", "taint"]
1919
- ["'underscore.string'", "Member[splice]", "Argument[0,3]", "ReturnValue", "taint"]
2020
- ["'underscore.string'", "Member[join]", "Argument[0..N-1]", "ReturnValue", "taint"]
21-
- ["'underscore.string'", "Member[surround,quote]", "Argument[0,1]", "ReturnValue", "taint"]
21+
- ["'underscore.string'", "Member[surround,quote,q]", "Argument[0,1]", "ReturnValue", "taint"]
2222
- ["'underscore.string'", "", "Argument[0]", "ReturnValue", "taint"]
23-
- ["'underscore.string'.Wrapper", "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,value]", "Argument[this]", "ReturnValue", "taint"]
24-
- ["'underscore.string'.Wrapper", "Member[insert,replaceAll,join,splice,prune,pad,lpad,rpad,repeat,surround,quote]", "Argument[this]", "ReturnValue", "taint"]
25-
- ["'underscore.string'.Wrapper", "Member[insert,replaceAll,prune,pad,lpad,rpad,repeat]", "Argument[1]", "ReturnValue", "taint"]
26-
- ["'underscore.string'.Wrapper", "Member[surround,quote]", "Argument[0]", "ReturnValue", "taint"]
23+
- ["'underscore.string'.Wrapper", "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,value,strip,lstrip,rstrip,camelcase]", "Argument[this]", "ReturnValue", "taint"]
24+
- ["'underscore.string'.Wrapper", "Member[insert,replaceAll,join,splice,prune,pad,lpad,rpad,repeat,surround,quote,q,rjust,ljust]", "Argument[this]", "ReturnValue", "taint"]
25+
- ["'underscore.string'.Wrapper", "Member[insert,replaceAll,prune,pad,lpad,rpad,repeat,rjust,ljust]", "Argument[1]", "ReturnValue", "taint"]
26+
- ["'underscore.string'.Wrapper", "Member[surround,quote,q]", "Argument[0]", "ReturnValue", "taint"]
2727
- ["'underscore.string'.Wrapper", "Member[splice]", "Argument[2]", "ReturnValue", "taint"]
2828
- ["'underscore.string'.Wrapper", "Member[join,concat]", "Argument[0..N-1]", "ReturnValue", "taint"]
2929
- ["'underscore.string'.Wrapper", "Member[toUpperCase,toLowerCase,replace,slice,substring,substr,split]", "Argument[this]", "ReturnValue", "taint"]

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ function strToStr() {
3232
sink(s.stripTags(source("s29"))); // $ hasTaintFlow=s29
3333
sink(s.unquote(source("s30"), "quote")); // $ hasTaintFlow=s30
3434
sink(s.map(source("s31"), (x) => {return x;})); // $ hasTaintFlow=s31
35-
sink(s.strip(source("s32"),"charsToStrim")); // $ MISSING: hasTaintFlow=s32
36-
sink(s.lstrip(source("s33"),"charsToStrim")); // $ MISSING: hasTaintFlow=s33
37-
sink(s.rstrip(source("s34"),"charsToStrim")); // $ MISSING: hasTaintFlow=s34
38-
sink(s.camelcase(source("s35"))); // $ MISSING: hasTaintFlow=s35
35+
sink(s.strip(source("s32"),"charsToStrim")); // $ hasTaintFlow=s32
36+
sink(s.lstrip(source("s33"),"charsToStrim")); // $ hasTaintFlow=s33
37+
sink(s.rstrip(source("s34"),"charsToStrim")); // $ hasTaintFlow=s34
38+
sink(s.camelcase(source("s35"))); // $ hasTaintFlow=s35
3939
}
4040

4141
function strToArray() {
@@ -84,14 +84,14 @@ function multiSource() {
8484
sink(s.quote(source("s21"), "quote")); // $ hasTaintFlow=s21
8585
sink(s.quote("base", source("s22"))); // $ hasTaintFlow=s22
8686

87-
sink(s.q(source("s23"), "quote")); // $ MISSING: hasTaintFlow=s23
88-
sink(s.q("base", source("s24"))); // $ MISSING: hasTaintFlow=s24
87+
sink(s.q(source("s23"), "quote")); // $ hasTaintFlow=s23
88+
sink(s.q("base", source("s24"))); // $ hasTaintFlow=s24
8989

90-
sink(s.rjust(source("s25"), 10, "charsToPad")); // $ MISSING: hasTaintFlow=s25
91-
sink(s.rjust("base", 10, source("s26"))); // $ MISSING: hasTaintFlow=s26
90+
sink(s.rjust(source("s25"), 10, "charsToPad")); // $ hasTaintFlow=s25
91+
sink(s.rjust("base", 10, source("s26"))); // $ hasTaintFlow=s26
9292

93-
sink(s.ljust(source("s27"), 10, "charsToPad")); // $ MISSING: hasTaintFlow=s27
94-
sink(s.ljust("base", 10, source("s28"))); // $ MISSING: hasTaintFlow=s28
93+
sink(s.ljust(source("s27"), 10, "charsToPad")); // $ hasTaintFlow=s27
94+
sink(s.ljust("base", 10, source("s28"))); // $ hasTaintFlow=s28
9595
}
9696

9797
function chaining() {
@@ -115,6 +115,6 @@ function chaining() {
115115

116116
sink(s(source("s16"))
117117
.strip().lstrip().rstrip().camelcase()
118-
.q(source("s17").ljust(10, source("s18"))
119-
.rjust(10, source("s19")))); // $ MISSING: hasTaintFlow=s16 MISSING: hasTaintFlow=s17 MISSING: hasTaintFlow=s18 MISSING: hasTaintFlow=s19
118+
.q(source("s17")).ljust(10, source("s18"))
119+
.rjust(10, source("s19"))); // $ hasTaintFlow=s16 hasTaintFlow=s17 hasTaintFlow=s18 hasTaintFlow=s19
120120
}

0 commit comments

Comments
 (0)