Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[csharp] How to add a flow step with a separate class#20090

Unanswered
KseniiaSmirn0va asked this question inQ&A
Discussion options

Hello,
I'm facing a problem with csharp global data flow. It breaks at property accessors:

Order {      get { return order_; }  // order_ is the last node which codeql tracks      set {        order_ = value;      }    }

Because of this problem, codeql build-in queries sometimes fail to build proper flow between a source and a sink.
To fix this problem, I could adddefault predicate isAdditionalFlowStep(Node node1, Node node2) into sql/ssrf/xss/... queries, as was suggested in#19794 but it's cumbersome in my case.

I'd prefer to create a single class in a customization.qll file which would add the missing flowstep throughout codeql. This mechanism is claimed to be already availablehttps://codeql.github.com/docs/codeql-language-guides/analyzing-data-flow-in-csharp/#extending-library-data-flow, but it isn't))
There is no such predicate ascallableFlow() in the source code of codeql latest versions.

Could you tell me how to create an additional flow step so that it is recognized by the global dataflow across codeql, please?
My codeql version is 2.21.0

You must be logged in to vote

Replies: 1 comment

Comment options

Here are the latest docs for library modelling -- apologies for the out-of-date reference to the old way of doing things; I'll pass that onto the team:

https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-csharp/

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@KseniiaSmirn0va@smowton

[8]ページ先頭

©2009-2025 Movatter.jp