π‘οΈ Sentinel: [HIGH] Fix SQL Injection vulnerability in ERD Tool - #334
π‘οΈ Sentinel: [HIGH] Fix SQL Injection vulnerability in ERD Tool#334seonghobae wants to merge 3 commits into
Conversation
ERD λꡬμ DDL μμ± μ μ»¬λΌ νμ μ λν κ²μ¦μ΄ μμ΄ λ°μν μ μλ SQL μΈμ μ μ·¨μ½μ μ μμ νμ΅λλ€. μ»¬λΌ νμ μ μΈλ―Έμ½λ‘ μ΄ ν¬ν¨λμ΄ μλμ§ κ²μ¦νλ ν¨μλ₯Ό μΆκ°νκ³ , addColumn λ©μλμμ μ΄λ₯Ό κ²μ¦νλλ‘ λ³κ²½νμ΅λλ€.
|
π 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. |
|
Warning Review limit reached
Next review available in: 40 seconds Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review detailsβοΈ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: π Files selected for processing (3)
β¨ Finishing Touchesπ Generate docstrings
π§ͺ Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR hardens the ERD DDL generator in @argos/web by adding validation for user-provided column SQL types to reduce the risk of DDL/SQL injection via column.type interpolation.
Changes:
- Added
assertValidSqlTypeand invoked it duringERDModel.addColumn()to reject semicolons incolumn.type. - Added a unit test covering semicolon-containing column types.
- Documented the vulnerability and prevention note in
.jules/sentinel.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/web/src/lib/erd.ts | Adds SQL type validation and enforces it when adding columns. |
| packages/web/src/lib/erd.test.ts | Adds a regression test for semicolon-based injection attempts. |
| .jules/sentinel.md | Records the security learning/prevention note for this issue. |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Superseded by #397. This predecessor only rejects semicolons in the ERD SQL type field. #397 is the current focused replacement on a newer base and fails closed with positive SQL-type/default grammar validation, identifier/foreign-key validation, protected validated state, and broader adversarial tests. Closing the stale competing fix; predecessor evidence is not reused. |
Understood. Acknowledging that this work is superseded by #397 and stopping work on this task. |
π¨ Severity: HIGH
π‘ Vulnerability: ERD λꡬμ DDL μμ± μ μ»¬λΌ νμ μ λν κ²μ¦μ΄ μμ΄ SQL μΈμ μ μ·¨μ½μ λ°μ κ°λ₯.
π― Impact: μ¬μ©μκ° μ μμ μΌλ‘ μΈλ―Έμ½λ‘ μ΄ ν¬ν¨λ μ»¬λΌ νμ μ μ λ ₯ν κ²½μ°, DDL 쿼리μ μ μ± μΏΌλ¦¬κ° μ½μ λμ΄ μ€νλ μνμ΄ μμ΅λλ€.
π§ Fix: `assertValidSqlType` ν¨μλ₯Ό μΆκ°νμ¬ μ»¬λΌ νμ μ μΈλ―Έμ½λ‘ μ΄ ν¬ν¨λ κ²½μ° μλ¬λ₯Ό λμ§λλ‘ νμμ΅λλ€.
β Verification: κ΄λ ¨ μ λ ν μ€νΈλ₯Ό `packages/web/src/lib/erd.test.ts`μ μΆκ°νκ³ 100% ν μ€νΈ 컀λ²λ¦¬μ§λ₯Ό μ μ§ν¨μ νμΈνμ΅λλ€.
PR created automatically by Jules for task 14276269119169641456 started by @seonghobae