-
-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect misuse of psycopg2.sql.SQL
composable
#608
base: main
Are you sure you want to change the base?
Conversation
Add a plugin test to detect when something other than a string literal is passed to the constructor of the `psycopg2.sql.SQL` composable object. Resolves: PyCQA#412
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solution is specific to psycopg2. I'd rather see a fix that can reuse the existing general SQL statements plugin to detect this particular case.
This plugin needs to be updated so that it works for @ericwb The general plugin If consensus can't be reached on merging this plugin into bandit, then it should be released as a separate package. |
Add a plugin test to detect when something other than a string literal is passed to the constructor of the
psycopg2.sql.SQL
composable object.See issue #412
Closes #412