Skip to content

[python] SRC -> SINK1 -> SINK2 problem #12797

Answered by jketema
Sim4n6 asked this question in Q&A
Discussion options

You must be logged in to vote

It's not possible to extend TaintTracking::Configuration twice in the same query. If you need two configurations then you'll need to import TaintTracking2 and use TaintTracking2::Configuration:

import semmle.python.dataflow.new.TaintTracking
import semmle.python.dataflow.new.TaintTracking2

class Config1 extends TaintTracking::Configuration 

  override predicate isSource(DataFlow::Node source) { source instanceof Source1 }

  override predicate isSink(DataFlow::Node sink) { sink instanceof Sink1 }
}

class Config2 extends TaintTracking2::Configuration 

  override predicate isSource(DataFlow::Node source) { any(Config1 cfg).hasFlow(_, source) }

  override predicate isSink(DataFlow::Node s…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@Sim4n6
Comment options

Comment options

You must be logged in to vote
4 replies
@Sim4n6
Comment options

@jketema
Comment options

@Sim4n6
Comment options

@Sim4n6
Comment options

Answer selected by Sim4n6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants