π‘οΈ Sentinel: [CRITICAL] Fix SQL injection in sqliteColumnExists#105
π‘οΈ Sentinel: [CRITICAL] Fix SQL injection in sqliteColumnExists#105mattjoyce wants to merge 1 commit into
Conversation
Replaced the unsafe string interpolation in `PRAGMA table_info(%s)` with a parameterized query using the `pragma_table_info(?)` table-valued function. This prevents SQL injection vulnerabilities if the table name is ever derived from an untrusted source. Also documented this critical finding in `.jules/sentinel.md`. 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 | 6c9caaf | Commit Preview URL Branch Preview URL |
May 27 2026, 11:56 AM |
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: π Files selected for processing (2)
π WalkthroughWalkthroughThis PR fixes a SQL injection vulnerability in the ChangesSQL Injection Prevention
Estimated code review effortπ― 2 (Simple) | β±οΈ ~8 minutes Poem
π₯ 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)
Warning Review ran into problemsπ₯ ProblemsGit: Failed to clone repository. Please run the Comment |
β¦o test, #105 FHS install artifact #104 enforces the filesystem-layout ADR load-bearing invariant (age key never in a --scope config backup) as a regression test. #105 turns the hand-run deploy-as-new into a repeatable v1.0 install implementing the full ADR layout (/opt code, /etc/ductile/secret, /run, packaged binary+units).
Operator direction: convert fully to the new enforced/FHS ductile and migrate everything. #103 updated (all confinable, shared default, fabric last, establish via #105 packaging, 5-step migration sequence). #106 = the unconfinable admin automation (docker/apt/perf/file_handler + notifies) gets its own unconfined ductile instance β the ADR data-plane/admin split made concrete.
Enforced data-plane gateway live on :8081: vault carried, 5 keyless integrations enforced+attested on default(1001), config/plugin lock, admission re-enabled, all wall-bites pass. #93 downgrade proven live. Remaining carded as dev workstreams: #107 (HEAVY, secret-holders), #106 (admin instance), #108 (vault fail-open), #105 (FHS package). Old --user decommission deferred until #106+#107 land.
Idempotent root installer lays the ADR filesystem-layout package layer: service accounts + the FHS dir skeleton (/etc/ductile + secret/ ductile-0700, /opt/ductile/plugins root-0755 world-rx, /var/lib + /run via tmpfiles), the binary (root 0755 never-setuid), and the cap-only systemd unit. Config/secrets/plugin-code stay operator data (runbook). Extended tmpfiles for /run/ductile. Turns the hand-run deploy-as-new into "run the package", validated by the upcoming redeploy.
π¨ Severity: CRITICAL
π‘ Vulnerability: A SQL injection vulnerability existed in
internal/storage/sqlite.gowherefmt.Sprintfwas used to insert an unvalidated table name directly into aPRAGMA table_infoSQL string.π― Impact: If
sqliteColumnExistswas ever called with an untrustedtableargument, an attacker could inject arbitrary SQL queries.π§ Fix: Switched from using a direct
PRAGMAstatement to using SQLite's table-valued functionpragma_table_info(?), which properly supports standard parameter binding (?) and entirely eliminates the injection vector. The column names were explicitly mapped to preserve compatibility. Added a critical entry to the.jules/sentinel.mdjournal.β Verification: Ran
go test -v ./internal/storage/...successfully, confirming no regressions in SQLite database operations or schema validations.PR created automatically by Jules for task 1210334762389177713 started by @mattjoyce
Summary by CodeRabbit