π‘οΈ Sentinel: [CRITICAL] Fix SQL Injection in sqliteColumnExists#110
π‘οΈ Sentinel: [CRITICAL] Fix SQL Injection in sqliteColumnExists#110mattjoyce wants to merge 1 commit into
Conversation
Replaced unsafe string interpolation `fmt.Sprintf("PRAGMA table_info(%s);", table)` with a parameterized query using SQLite's `pragma_table_info(?)` table-valued function. Extracted the needed columns explicitly, ensuring `"notnull"` is properly quoted.
Co-authored-by: mattjoyce <278869+mattjoyce@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. |
Deploying with Β
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| β
Deployment successful! View logs |
ductile | b995e58 | Commit Preview URL Branch Preview URL |
May 31 2026, 11:51 AM |
π WalkthroughWalkthroughThis PR fixes a SQL injection vulnerability in SQLite schema metadata queries. The fix replaces unsafe string interpolation in a ChangesSQL Injection Prevention in SQLite Schema Queries
π― 2 (Simple) | β±οΈ ~8 minutes
π₯ Pre-merge checks | β 4 | β 1β Failed checks (1 warning)
β Passed checks (4 passed)
βοΈ Tip: You can configure your own custom pre-merge checks in the settings. β¨ Finishing Touchesπ Generate docstrings
π§ͺ Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
π€ Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.jules/sentinel.md:
- Line 1: Update the header date on the sentinel entry for "Prevent SQL
Injection via string interpolation in PRAGMA table_info" from "2024-05-18" to
the actual PR creation date "2026-05-31" so the changelog reflects the correct
timeline; locate the heading line in .jules/sentinel.md and replace only the
date portion while preserving the rest of the header text.
πͺ Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
βΉοΈ Review info
βοΈ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 090e9646-8bdb-412d-b4e5-906e5fb11d5c
π Files selected for processing (2)
.jules/sentinel.mdinternal/storage/sqlite.go
| @@ -0,0 +1,4 @@ | |||
| ## 2024-05-18 - Prevent SQL Injection via string interpolation in PRAGMA table_info | |||
There was a problem hiding this comment.
Correct the date to match PR creation.
The date "2024-05-18" predates this PR by over two years. Since this is a new file created in this PR (2026-05-31), the date should reflect when this fix was actually made.
π Proposed fix
-## 2024-05-18 - Prevent SQL Injection via string interpolation in PRAGMA table_info
+## 2026-05-31 - Prevent SQL Injection via string interpolation in PRAGMA table_infoπ Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## 2024-05-18 - Prevent SQL Injection via string interpolation in PRAGMA table_info | |
| ## 2026-05-31 - Prevent SQL Injection via string interpolation in PRAGMA table_info |
π§° Tools
πͺ markdownlint-cli2 (0.22.1)
[warning] 1-1: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
[warning] 1-1: First line in a file should be a top-level heading
(MD041, first-line-heading, first-line-h1)
π€ Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.jules/sentinel.md at line 1, Update the header date on the sentinel entry
for "Prevent SQL Injection via string interpolation in PRAGMA table_info" from
"2024-05-18" to the actual PR creation date "2026-05-31" so the changelog
reflects the correct timeline; locate the heading line in .jules/sentinel.md and
replace only the date portion while preserving the rest of the header text.
β¦on card #110 captures the proven notify model (on-event + on-hook, real Discord posts under enforce), the bucket classification, and the 2 findings (notify_on_complete gating; each notify route needs its own vault_principal'd instance β corrects the trivial-carry assumption). Epic #83 records Phase 3: discord_notify + ap_canary vault-native + fail-closed live, full pipeline model proven, in-binary hardening (#100/#101/#104/#108) redeployed, plugin code @ a1934e5.
π¨ Severity: CRITICAL
π‘ Vulnerability:
fmt.Sprintfwas used to interpolate a table name directly into an SQLite PRAGMA query insqliteColumnExists, allowing potential SQL injection.π― Impact: An attacker could potentially manipulate table names to execute arbitrary SQL or extract sensitive data.
π§ Fix: Replaced the interpolated PRAGMA statement with a parameterized query using the
pragma_table_info(?)table-valued function. Extracted necessary columns explicitly to match theScanlogic, properly quoting the"notnull"keyword.β Verification: Ran
go test -v ./...to ensure no regressions and verified correct column selection and mapping.PR created automatically by Jules for task 8740818745908940614 started by @mattjoyce
Summary by CodeRabbit
Bug Fixes
Documentation