Skip to content

🔒 Fix SQL injection vulnerability in DashboardSurveyOutboxStore#345

Merged
PlataformasInformaticas merged 4 commits intomainfrom
fix-sql-injection-dashboard-outbox-15992879467027651578
Apr 14, 2026
Merged

🔒 Fix SQL injection vulnerability in DashboardSurveyOutboxStore#345
PlataformasInformaticas merged 4 commits intomainfrom
fix-sql-injection-dashboard-outbox-15992879467027651578

Conversation

@dogi
Copy link
Copy Markdown
Member

@dogi dogi commented Apr 13, 2026

🎯 What: Fixed a SQL Injection vulnerability in DashboardSurveyOutboxStore.kt.
⚠️ Risk: The vulnerability was caused by variable interpolation in execSQL for DROP TABLE, CREATE TABLE, and CREATE INDEX statements. While the interpolated variables were constants in this specific implementation, statically substituting strings into execSQL is generally flagged by static analyzers as a SQL injection risk because it bypasses parameter binding, which could be exploited if those constants were ever changed to dynamic inputs.
🛡️ Solution: Replaced the interpolated variables ($TABLE_SUBMISSIONS, $COLUMN_ID, etc.) with explicit hardcoded string literals in the execSQL statements within the onCreate and onUpgrade methods. This ensures the foundational schema creation scripts remain completely immutable and free of static analysis warnings.


PR created automatically by Jules for task 15992879467027651578 started by @dogi

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@dogi dogi added the review label Apr 13, 2026
@PlataformasInformaticas PlataformasInformaticas linked an issue Apr 14, 2026 that may be closed by this pull request
- Normalize language codes to prevent redundant translations between language variants (e.g., es-MX and es-ES).
- Ensure existing cached translations are returned when server configuration or API keys cannot be retrieved.
- Enhance language detection accuracy by sampling multiple questions and choices from the survey.
- Add unit tests for language normalization and error-case fallback behavior.
@PlataformasInformaticas PlataformasInformaticas merged commit 2f85f3f into main Apr 14, 2026
2 checks passed
@PlataformasInformaticas PlataformasInformaticas deleted the fix-sql-injection-dashboard-outbox-15992879467027651578 branch April 14, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: fix SQL schema queries

2 participants