Skip to content

[javascript] TaintTracking of html with external scripts #87

Answered by asgerf
codeqln00b asked this question in General
Discussion options

You must be logged in to vote

Hi 👋. I can confirm that we don't track data flow from global variables in main.js to global variables index.html.

We'll look into improving this, but in the meantime you can add this extra step to your taint-tracking configuration to enable full flow through globals: (here is the query with that step added)

  override predicate isAdditionalTaintStep(DataFlow::Node pred, DataFlow::Node succ) {
    exists(GlobalVariable var |
      pred = var.getAnAssignedExpr().flow() and
      succ = var.getAnAccess().flow()
    )
  }

I understand you might be wondering why we don't include this step by default. A lot of our work is driven by variant-analysis of real-world vulnerabilities, and this type …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by codeqln00b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants