Repository navigation
Conversation
Automated security fix generated by OrbisAI Security
Contributor
|
Thanks for the suggestion. We're closing this because the current code is not injectable. The WHERE fragments are fixed string literals ('owner_account = ?', 'status = ?'), and every user-supplied value is bound through the ? placeholders in db.prepare(sql).all(...vals). The rewrite runs the same four queries, and the branch-per-combination form scales worse as filters are added. |
Author
|
Thanks for reviewing this. You’re right that the current implementation binds all user-supplied values and uses fixed SQL fragments, so the reported SQL injection risk isn’t exploitable in the existing code. I’ll treat this as a false positive. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The export.mjs script constructs SQL queries dynamically by joining WHERE clause fragments. While the current implementation is safe due to hardcoded column names and parameterized values using prepared statement placeholders (?), the dynamic string concatenation pattern is flagged as a potential SQL injection risk. This pattern could become vulnerable if future modifications introduce user-controlled column names or if developers copy this pattern incorrectly for other queries. The affected code is
linkedin-growth/scripts/export.mjs:20. This change is the fix I would apply.Reference: CWE-89
What changed
linkedin-growth/scripts/export.mjsVerification
No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.
Automated security fix by OrbisAI Security