Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc9dbf3

Browse files
committed
Python: Autoformat
1 parent 12c6997 commit dc9dbf3

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

  • python/ql/test/library-tests/examples/custom-sanitizer

python/ql/test/library-tests/examples/custom-sanitizer/Taint.qll

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ class MySimpleSanitizer extends Sanitizer {
1717
* The test `if is_safe(arg):` sanitizes `arg` on its `true` edge.
1818
*
1919
* Can't handle `if not is_safe(arg):` :\ that's why it's called MySimpleSanitizer
20-
*
2120
*/
2221
override predicate sanitizingEdge(TaintKind taint, PyEdgeRefinement test) {
2322
taint instanceof ExternalStringKind and
24-
exists(CallNode call |
25-
test.getTest() = call and test.getSense() = true
26-
|
23+
exists(CallNode call | test.getTest() = call and test.getSense() = true |
2724
call = Value::named("test.is_safe").getACall() and
2825
test.getInput().getAUse() = call.getAnArg()
2926
)
@@ -75,11 +72,7 @@ class TestConfig extends TaintTracking::Configuration {
7572
sanitizer instanceof MySanitizerHandlingNot
7673
}
7774

78-
override predicate isSource(TaintTracking::Source source) {
79-
source instanceof SimpleSource
80-
}
75+
override predicate isSource(TaintTracking::Source source) { source instanceof SimpleSource }
8176

82-
override predicate isSink(TaintTracking::Sink sink) {
83-
none()
84-
}
77+
override predicate isSink(TaintTracking::Sink sink) { none() }
8578
}

0 commit comments

Comments
 (0)