[Golang][C#] Sinks from external libraries/projects #20431
Replies: 3 comments 1 reply
-
I'm interested in an automatic method of making codeql recognise external sinks. Making it follow the call and analyse the tiny part of the external project which concerns the sql mechanism |
Beta Was this translation helpful? Give feedback.
-
I'm double-checking on model-packs. Meanwhile one thing you could consider would be creating a single CodeQL database containing both your library and your application, thereby allowing CodeQL to see 'inside' the library calls and complete the path from source to sink. This could be achieved using a CodeQL traced build (either use the |
Beta Was this translation helpful? Give feedback.
-
Side note: the model editor is not available for Go, but it is still possible to write models by hand and put them in a model pack. It is more cumbersome though. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Suppose I'm scanning a go-project 'MyRestApiProject' locally, where there is a sql-injection. The sink is defined in another project which is stored under
/Users/me/go/pkg/mod/github.dev-course.com/smpl-projects/
directory. This sink is supported by codeql. 'MyRestApiProject' makes a call to the sink but codeql doesn't recognise it as it comes from the external project.Is there any way I could make codeql look inside this call into the external project?
For C# there is Modeling the calls your codebase makes to external APIs, but if it becomes cumbersome to add sinks manually in the future, how can I facilitate this process?
Besides, it's unavailable for golang. What possibilities do I have?
Thank you for taking time with my request)
Beta Was this translation helpful? Give feedback.
All reactions