This repository was archived by the owner on Jan 5, 2023. It is now read-only.
Open
Conversation
owen-mc
reviewed
Nov 26, 2021
| result = package(["github.com/jackc/pgx"], "") and result != pgx3PackagePath() | ||
| } | ||
|
|
||
| string pgxAnyPackagePath() { result = package(["github.com/jackc/pgx"], "") } |
Contributor
There was a problem hiding this comment.
Suggested change
| string pgxAnyPackagePath() { result = package(["github.com/jackc/pgx"], "") } | |
| string pgxAnyPackagePath() { result = package("github.com/jackc/pgx", "") } |
No need for a set literal with only one element in it. The same applies in many other places.
owen-mc
suggested changes
Nov 28, 2021
Contributor
There was a problem hiding this comment.
Thank you for your contribution. All of the modelled sinks appear to be correct. It would be great to have some tests.
I'm not sure exactly what you mean about extending SQL:QueryString not working. An example of how it should be done is BeegoOrm.qll - note that the classes extend SQL::QueryString::Range, rather than SQL::QueryString. I don't think that it's important to change it for this PR though - when we promote this from experimental we can do it in the preferred way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, team!
The idea of this PR is to improve default
SqlInjection.qlquery by addinggithub.com/jackc/pgxmodule and related.I basically reused existing
SqlInjection.qlquery, and created a customPgxSqlInjection.qlquery. The CodeQL custom module with implements pgx sql argument is defined inPgx.qllfile. I think that pgx support should be implemented by extendingSQL::QueryString.Also i met stange behavior. When i create custom Query class by extending
DataFlow::Nodethe query works fine. But when i extendSQL::QueryString. I do not understand why. Maybe you can support with that bug?Thanks,
Evgenii.