ECOPROJECT-4724 | fix: Escape SQL string fields in query builder to prevent second-order SQL injection#1231
Conversation
…revent second-order SQL injection Cluster names from user-uploaded RVTools spreadsheets were interpolated unescaped into ~27 DuckDB query templates via text/template, allowing single-quote breakout and arbitrary SQL execution (e.g. read_text() for file exfiltration). Apply escapeSQLString() to all user-controlled queryParams fields (ClusterFilter, OSFilter, PowerStateFilter, VmIDFilter, Category) before template execution. Signed-off-by: Aviel Segev <asegev@redhat.com>
05a70bd to
b2c241c
Compare
|
Warning Review limit reached
More reviews will be available in 57 minutes and 15 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tupyy The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Cluster names from user-uploaded RVTools spreadsheets were interpolated
unescaped into ~27 DuckDB query templates via text/template, allowing
single-quote breakout and arbitrary SQL execution (e.g. read_text() for
file exfiltration). Apply escapeSQLString() to all user-controlled
queryParams fields (ClusterFilter, OSFilter, PowerStateFilter, VmIDFilter,
Category) before template execution.