|
12 | 12 |
|
13 | 13 | import javascript |
14 | 14 | import ConfigFlow::PathGraph |
15 | | - import DataFlow |
16 | | - import browserextension.BrowserInjectionFieldCustomizations::BrowserInjection |
17 | | - private import semmle.javascript.security.dataflow.XssThroughDomCustomizations::XssThroughDom as XssThroughDom |
18 | | - |
19 | | - //private import semmle.javascript.security.dataflow.DomBasedXssCustomizations |
20 | | - //private import semmle.javascript.security.dataflow.XssThroughDomCustomizations::XssThroughDom as XssThroughDom |
21 | | - |
22 | | - //private import semmle.javascript.security.dataflow.CodeInjectionCustomizations |
23 | | - |
24 | | - module Config implements DataFlow::ConfigSig { |
25 | | - |
26 | | - predicate isSource(DataFlow::Node source) { |
27 | | - source instanceof Source |
28 | | - } |
29 | | - |
30 | | - predicate isSink(DataFlow::Node sink) { |
31 | | - sink instanceof Sink |
32 | | - } |
33 | | - |
34 | | - additional predicate isAdditionalLoadStep(DataFlow::Node pred, DataFlow::Node succ, string prop) { |
35 | | - (pred = succ) and |
36 | | - ((pred instanceof Update and prop = ["url", "openerTabId"]) |
37 | | - or |
38 | | - (pred instanceof DownloadsDangerous and prop = ["body", "conflictAction","filename", "url", "method"]) |
39 | | - or |
40 | | - (pred instanceof Delete and prop = ["startTime", "endTime", "url"]) |
41 | | - //or |
42 | | - //(pred instanceof SetContentSettings and succ instanceof SetContentSettings and prop = any(string s)) |
43 | | - //or |
44 | | - //(pred instanceof GetContentSettings and succ instanceof GetContentSettings and prop = any(string s)) |
45 | | - //(pred instanceof StorageSet and succ instanceof StorageSet and prop = any(string s)) |
46 | | - //or |
47 | | - //(pred instanceof SearchHistory and prop = any(string s)) |
48 | | - or |
49 | | - (pred instanceof GetCookie and prop = ["domain", "firstPartyDomain", "name", "url", "session", "path", "storeId"]) |
50 | | - or |
51 | | - (pred instanceof UpdateBookmarks and prop= ["title", "url"]) |
52 | | - or |
53 | | - (pred = succ and pred instanceof RemoveBrowsingData and prop = ["cookieStoreId", "hostnames", "originTypes", "since"]) |
54 | | - or |
55 | | - (pred = succ and pred instanceof AddHistory and prop = ["url"]) |
56 | | - or |
57 | | - (pred = succ and pred instanceof CreateWindows and prop = ["url"])) |
58 | | - } |
59 | | - } |
60 | | - |
61 | | - module ConfigFlow = TaintTracking::Global<Config>; |
62 | | - |
| 15 | + import browserextension.BrowserInjectionFieldQuery |
63 | 16 |
|
64 | 17 | from ConfigFlow::PathNode source, ConfigFlow::PathNode sink |
65 | 18 | where ConfigFlow::flowPath(source, sink) |
|
0 commit comments