File tree Expand file tree Collapse file tree
python/ql/test/library-tests/examples/custom-sanitizer Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments