π‘οΈ Sentinel: [CRITICAL] Fix SQL injection vulnerability in metadata generator#231
π‘οΈ Sentinel: [CRITICAL] Fix SQL injection vulnerability in metadata generator#231thebearwithabite wants to merge 1 commit intomasterfrom
Conversation
β¦enerator Co-authored-by: thebearwithabite <216692431+thebearwithabite@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π¨ Severity: CRITICAL
π‘ Vulnerability: SQL injection vulnerability in
metadata_generator.pyvia untrusted dictionary keys passed tosave_file_metadataand injected directly into query strings.π― Impact: Attackers could inject arbitrary SQL to modify schemas or drop tables (e.g., column name injection).
π§ Fix: Fetched schema with
PRAGMA table_infoand filtered metadata keys against this explicitly allowlisted set before building the dynamicINSERTquery.β Verification: Tested via a mock script executing a drop table payload, verified table persistence and column sanitization. All unit tests successfully executed.
PR created automatically by Jules for task 12165267220019104563 started by @thebearwithabite