Skip to content
\n

The problem is, when I click through the steps in the alerts section, the only two steps for this function I see are:
\nfunc GetImageWH(url string) (int32, int32, error) { - definition of url
\nresp, err = transport.RoundTrip(req) - req

\n
    \n
  1. How to make my customised taint step visible in the path?
  2. \n
  3. And when it becomes visible, I'd like to name the taint step as NewRequestStep in the graph visualisation, instead of definition of url. How can I customise this if possible?
  4. \n
\n
\n

I need to explicitly reflect in the query results that my taint step contributed to the flow, for my internal SAST metrics/statistics.

\n

Thanks for taking time with this!

","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

You could try in your data-flow configuration specifying predicate neverSkip(Node node) -- by default, the edges relation that populates the user-facing graph will skip nodes unless they are join points (have multiple predecessors) or are interprocedural edges.

\n

The names printed in the path explanation refer to nodes, not edges, but you could try something like class CustomNamedNode extends DataFlow::Node { ... CustomNamedNode() { ... characterise your node ... } ... override string toString() { ... stringify your node ... }, and ensure your custom node definition is in scope in the context of whatever query produces your path explanation.

","upvoteCount":1,"url":"https://github.com/github/codeql/discussions/20596#discussioncomment-14619540"}}}
Discussion options

You must be logged in to vote

You could try in your data-flow configuration specifying predicate neverSkip(Node node) -- by default, the edges relation that populates the user-facing graph will skip nodes unless they are join points (have multiple predecessors) or are interprocedural edges.

The names printed in the path explanation refer to nodes, not edges, but you could try something like class CustomNamedNode extends DataFlow::Node { ... CustomNamedNode() { ... characterise your node ... } ... override string toString() { ... stringify your node ... }, and ensure your custom node definition is in scope in the context of whatever query produces your path explanation.

Replies: 2 comments 5 replies

Comment options

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

@KseniiaSmirn0va
Comment options

@smowton
Comment options

Answer selected by KseniiaSmirn0va
Comment options

You must be logged in to vote
2 replies
@KseniiaSmirn0va
Comment options

@owen-mc
Comment options

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