|
222 | 222 | ], |
223 | 223 | "description": "Type tracking class (select full class path before inserting)", |
224 | 224 | }, |
225 | | - "foo": { |
226 | | - "scope": "ql", |
227 | | - "prefix": "foo", |
228 | | - "body": [ |
229 | | - " /**", |
230 | | - " * Taint propagation for `$1`.", |
231 | | - " */", |
232 | | - " private class InstanceTaintSteps extends InstanceTaintStepsHelper {", |
233 | | - " InstanceTaintSteps() { this = \"$1\" }", |
234 | | - "", |
235 | | - " override DataFlow::Node getInstance() { result = instance() }", |
236 | | - "", |
237 | | - " override string getAttributeName() { none() }", |
238 | | - "", |
239 | | - " override string getMethodName() { none() }", |
240 | | - "", |
241 | | - " override string getAsyncMethodName() { none() }", |
242 | | - " }", |
243 | | - ], |
244 | | - }, |
245 | 225 | "API graph .getMember chain": { |
246 | 226 | "scope": "ql", |
247 | 227 | "prefix": "api graph .getMember chain", |
|
250 | 230 | ], |
251 | 231 | "description": "API graph .getMember chain (select full path before inserting)", |
252 | 232 | }, |
| 233 | + "debug partial flow": { |
| 234 | + "scope": "ql", |
| 235 | + "prefix": "debug partial flow", |
| 236 | + "body": [ |
| 237 | + "// put the line below inside the configuration", |
| 238 | + "// override int explorationLimit() { result = 5 }", |
| 239 | + "// and then run quick evaluation on the predicate below", |
| 240 | + "// (and potentially limit the set of sources)", |
| 241 | + "predicate debugPartialFlow(Location loc, DataFlow::PartialPathNode node, int dist) {", |
| 242 | + " loc = node.getNode().getLocation() and", |
| 243 | + " exists(loc.getFile().getRelativePath()) and", |
| 244 | + " exists(Configuration config, DataFlow::PartialPathNode source |", |
| 245 | + " config.hasPartialFlow(source, node, dist)", |
| 246 | + " )", |
| 247 | + "}", |
| 248 | + ], |
| 249 | + "description": "debug partial flow", |
| 250 | + }, |
253 | 251 | } |
0 commit comments