Skip to content

Customizing RemoteFlowSource for javascript #15200

Closed Answered by beescuit
beescuit asked this question in Q&A
Discussion options

You must be logged in to vote

I have kind of figured this out.

In case anyone has this question in the future, you need to create a new class that extends RemoteFlowSource. In my case, I created a new file under javascript/ql/lib/semmle/javascript/frameworks/, you can start with a simple module like this and then adapt it to be similar to the other framework implementations in that folder:

import javascript
import semmle.javascript.frameworks.HTTP
private import DataFlow

module CustomFramework {
    private class RequestArguments extends RemoteFlowSource {
        RequestArguments() {
          // source query goes here, set the results to the "this variable"
        }
      
        override string getSourceType() {…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mbg
Comment options

@beescuit
Comment options

@mbg
Comment options

Answer selected by beescuit
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