зеркало из https://github.com/github/codeql.git
JavaScript: Update `Dependencies` library to not rely on `File`s being `Locatable`.
Previously, we would consider an HTML file to be a dependent of all scripts embedded in it. Now we instead consider each JavaScript toplevel inside the HTML file to be a dependent, which is more sensible anyway.
This commit is contained in:
Родитель
7487c79271
Коммит
ec2ba735de
|
@ -194,7 +194,8 @@ abstract class ScriptDependency extends Dependency {
|
|||
abstract Expr getAnApiUse();
|
||||
|
||||
override Locatable getAUse(string kind) {
|
||||
kind = "import" and result.(HTML::HtmlFile) = this.getFile()
|
||||
kind = "import" and
|
||||
result = this.getFile().(HTML::HtmlFile).getATopLevel()
|
||||
or
|
||||
kind = "use" and result = getAnApiUse()
|
||||
}
|
||||
|
|
|
@ -1,50 +1,108 @@
|
|||
| angular-ui-bootstrap-2.1.2 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| angularjs-1.5.8 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| angularjs-2.0.0-beta.17 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| bootstrap-3.3.7 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| angular-ui-bootstrap-2.1.2 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| angular-ui-bootstrap-2.1.2 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| angular-ui-bootstrap-2.1.2 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| angularjs-1.5.8 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| angularjs-1.5.8 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| angularjs-1.5.8 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| angularjs-2.0.0-beta.17 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| angularjs-2.0.0-beta.17 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| angularjs-2.0.0-beta.17 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| bootstrap-3.3.7 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| bootstrap-3.3.7 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| bootstrap-3.3.7 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| bootstrap-3.3.7 | use | src/tst.html:52:5:52:5 | $ |
|
||||
| bundled-package-23.42.0 | import | src/tst.js:1:1:1:26 | require ... ckage") |
|
||||
| closure-unknown | import | src/closure-test.js:1:1:3:20 | <toplevel> |
|
||||
| dojo-1.11.2 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| dojo-1.11.2 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| dojo-1.11.2 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| dojo-1.11.2 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| esprima-0.9.0 | import | src/tst.js:2:1:2:18 | require("esprima") |
|
||||
| extjs-6.0.1 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| footools-1.2.3 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| jquery-1.12.4 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| extjs-6.0.1 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| extjs-6.0.1 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| extjs-6.0.1 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| footools-1.2.3 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| footools-1.2.3 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| footools-1.2.3 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| jquery-1.12.4 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| jquery-1.12.4 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| jquery-1.12.4 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| jquery-1.12.4 | use | src/tst.html:52:5:52:5 | $ |
|
||||
| jquery-2.0.1 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| jquery-2.0.1 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| jquery-2.0.1 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| jquery-2.0.1 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| jquery-2.0.1 | use | src/tst.html:4:3:4:3 | _ |
|
||||
| jquery-2.0.1 | use | src/tst.html:7:5:7:5 | _ |
|
||||
| jquery-2.0.1 | use | src/tst.html:52:5:52:5 | $ |
|
||||
| jquery-2.2.4 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| jquery-2.2.4 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| jquery-2.2.4 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| jquery-2.2.4 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| jquery-2.2.4 | use | src/tst.html:52:5:52:5 | $ |
|
||||
| jquery-3.1.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| jquery-3.1.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| jquery-3.1.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| jquery-3.1.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| jquery-3.1.0 | use | src/tst.html:52:5:52:5 | $ |
|
||||
| jquery-mobile-1.4.5 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| jquery-textext-1.3.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| jquery-ui-1.7.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| jquery-mobile-1.4.5 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| jquery-mobile-1.4.5 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| jquery-mobile-1.4.5 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| jquery-textext-1.3.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| jquery-textext-1.3.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| jquery-textext-1.3.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| jquery-ui-1.7.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| jquery-ui-1.7.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| jquery-ui-1.7.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| jquery-ui-1.7.0 | use | src/tst.html:52:5:52:8 | $.ui |
|
||||
| jquery-ui-1.12.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| jquery-ui-1.12.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| jquery-ui-1.12.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| jquery-ui-1.12.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| jquery-ui-1.12.0 | use | src/tst.html:52:5:52:8 | $.ui |
|
||||
| knockout-3.4.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| lodash-2.0.2 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| knockout-3.4.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| knockout-3.4.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| knockout-3.4.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| lodash-2.0.2 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| lodash-2.0.2 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| lodash-2.0.2 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| lodash-2.0.2 | use | src/tst.html:4:3:4:3 | _ |
|
||||
| lodash-2.0.2 | use | src/tst.html:7:5:7:5 | _ |
|
||||
| lodash-2.0.2 | use | src/tst.html:52:5:52:5 | $ |
|
||||
| lodash-3.4.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| lodash-3.4.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| lodash-3.4.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| lodash-3.4.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| lodash-3.4.0 | use | src/tst.html:4:3:4:3 | _ |
|
||||
| lodash-3.4.0 | use | src/tst.html:7:5:7:5 | _ |
|
||||
| lodash-4.15.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| lodash-4.15.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| lodash-4.15.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| lodash-4.15.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| lodash-4.15.0 | use | src/tst.html:4:3:4:3 | _ |
|
||||
| lodash-4.15.0 | use | src/tst.html:7:5:7:5 | _ |
|
||||
| modernizr-2.8.3 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| mootools-1.6.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| polymer-0.3.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| prototype-1.7.3 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| react-15.3.1 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| scriptaculous-1.9.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| swagger-ui-1.0.12 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| underscore-1.8.3 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| modernizr-2.8.3 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| modernizr-2.8.3 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| modernizr-2.8.3 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| mootools-1.6.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| mootools-1.6.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| mootools-1.6.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| polymer-0.3.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| polymer-0.3.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| polymer-0.3.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| prototype-1.7.3 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| prototype-1.7.3 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| prototype-1.7.3 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| react-15.3.1 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| react-15.3.1 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| react-15.3.1 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| scriptaculous-1.9.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| scriptaculous-1.9.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| scriptaculous-1.9.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| swagger-ui-1.0.12 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| swagger-ui-1.0.12 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| swagger-ui-1.0.12 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| underscore-1.8.3 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| underscore-1.8.3 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| underscore-1.8.3 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| underscore-1.8.3 | use | src/tst.html:4:3:4:3 | _ |
|
||||
| underscore-1.8.3 | use | src/tst.html:7:5:7:5 | _ |
|
||||
| vue-0.7.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| yui-3.18.0 | import | src/tst.html:0:0:0:0 | src/tst.html |
|
||||
| vue-0.7.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| vue-0.7.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| vue-0.7.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
| yui-3.18.0 | import | src/tst.html:2:11:5:2 | <toplevel> |
|
||||
| yui-3.18.0 | import | src/tst.html:6:11:8:2 | <toplevel> |
|
||||
| yui-3.18.0 | import | src/tst.html:50:11:53:2 | <toplevel> |
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
| /src/tst.html<\|>jquery<\|>23.0.0 | 4 |
|
||||
| /src/a.js<\|>lib3<\|>unknown | 3 |
|
||||
| /src/tst.html<\|>jquery<\|>23.0.0 | 3 |
|
||||
| /src/tst.html<\|>jquery<\|>42.0.0 | 3 |
|
||||
| /src/a.js<\|>lib1<\|>1.0.2 | 2 |
|
||||
| /src/b.js<\|>lib3<\|>unknown | 2 |
|
||||
| /src/tst.html<\|>jquery<\|>42.0.0 | 2 |
|
||||
| /src/a.js<\|>lib2<\|>1.0.0 | 1 |
|
||||
| /src/b.js<\|>lib2<\|>1.0.0 | 1 |
|
||||
| /src/sub/c.js<\|>lib1<\|>1.0.2 | 1 |
|
||||
|
|
Загрузка…
Ссылка в новой задаче