Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] Fix SQL Injection in ERD DDL Generator - #360

Closed
seonghobae wants to merge 3 commits into
developmentalfrom
sentinel/fix-sqli-erd-10666500552739841409
Closed

πŸ›‘οΈ Sentinel: [CRITICAL] Fix SQL Injection in ERD DDL Generator#360
seonghobae wants to merge 3 commits into
developmentalfrom
sentinel/fix-sqli-erd-10666500552739841409

Conversation

@seonghobae

Copy link
Copy Markdown

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: packages/web/src/lib/erd.ts의 addColumn λ©”μ„œλ“œμ—μ„œ μ‚¬μš©μž μž…λ ₯인 column.type에 λŒ€ν•œ 검증이 μ—†μ–΄, μ„Έλ―Έμ½œλ‘ (;) 등을 μ΄μš©ν•œ μ•…μ˜μ μΈ SQL Injection(예: integer; DROP TABLE users;) 곡격이 λ°œμƒν•  수 μžˆμ—ˆμŠ΅λ‹ˆλ‹€.
🎯 Impact: κ³΅κ²©μžκ°€ μž„μ˜μ˜ DDL 문을 μ£Όμž…ν•˜μ—¬ λ°μ΄ν„°λ² μ΄μŠ€ ν…Œμ΄λΈ”μ„ μ‚­μ œν•˜κ±°λ‚˜ λ³€μ‘°ν•  수 μžˆλŠ” 치λͺ…적인 μœ„ν—˜μ΄ μžˆμŠ΅λ‹ˆλ‹€.
πŸ”§ Fix: assertNoStatementTerminator ν•¨μˆ˜λ₯Ό μΆ”κ°€ν•˜μ—¬ 컬럼 νƒ€μž… λ¬Έμžμ—΄μ— SQL λ¬Έ μ’…κ²°μžμΈ μ„Έλ―Έμ½œλ‘ (;)이 ν¬ν•¨λ˜μ§€ μ•Šλ„λ‘ μ›μ²œ μ°¨λ‹¨ν–ˆμŠ΅λ‹ˆλ‹€.
βœ… Verification: SQL Injection 곡격 μ‹œλ‚˜λ¦¬μ˜€λ₯Ό λ°©μ–΄ν•˜λŠ” ν…ŒμŠ€νŠΈ μΌ€μ΄μŠ€λ₯Ό erd.test.ts에 μΆ”κ°€ν–ˆμœΌλ©°, λͺ¨λ“  κ΄€λ ¨ μœ λ‹› ν…ŒμŠ€νŠΈμ™€ 컀버리지 체크(100%)λ₯Ό μ„±κ³΅μ μœΌλ‘œ ν†΅κ³Όν–ˆμŠ΅λ‹ˆλ‹€. Sentinel Journal도 μ—…λ°μ΄νŠΈλ˜μ—ˆμŠ΅λ‹ˆλ‹€.


PR created automatically by Jules for task 10666500552739841409 started by @seonghobae

@google-labs-jules

Copy link
Copy Markdown

πŸ‘‹ 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.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 26 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 32ce99a7-6290-4fde-a185-69fb32e03a28

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 9ef092b and 6f06125.

πŸ“’ Files selected for processing (31)
  • .claude/skills/persuasion-review/scripts/probe_harness.py
  • packages/cli/src/__tests__/default-command.test.ts
  • packages/cli/src/__tests__/hook-command.test.ts
  • packages/cli/src/__tests__/hooks-inject.test.ts
  • packages/cli/src/__tests__/logout-command.test.ts
  • packages/cli/src/__tests__/setup-command.test.ts
  • packages/cli/src/__tests__/status-command.test.ts
  • packages/cli/src/__tests__/transcript.test.ts
  • packages/cli/src/adapters.ts
  • packages/cli/src/commands/default.ts
  • packages/cli/src/commands/hook.ts
  • packages/cli/src/commands/logout.ts
  • packages/cli/src/commands/setup.ts
  • packages/cli/src/commands/status.ts
  • packages/cli/src/deps.ts
  • packages/cli/src/index.ts
  • packages/cli/src/lib/api-client.ts
  • packages/cli/src/lib/auth-flow.test.ts
  • packages/cli/src/lib/auth-flow.ts
  • packages/cli/src/lib/config.test.ts
  • packages/cli/src/lib/config.ts
  • packages/cli/src/lib/event-sender.test.ts
  • packages/cli/src/lib/event-sender.ts
  • packages/cli/src/lib/hooks-inject.ts
  • packages/cli/src/lib/inject-agent-hooks.ts
  • packages/cli/src/lib/project.test.ts
  • packages/cli/src/lib/project.ts
  • packages/cli/src/lib/transcript-codex.test.ts
  • packages/cli/src/lib/transcript-codex.ts
  • packages/cli/src/lib/transcript.test.ts
  • packages/cli/src/lib/transcript.ts

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Author

Superseded by #397. This predecessor has the narrower semicolon-only ERD DDL guard and has accumulated a 31-file stale-base diff. #397 is the focused replacement on the newer developmental line with positive SQL-type/default grammar validation, identifier/foreign-key validation, mutation-safe model snapshots, and broader adversarial tests. Closing this competing lineage; its checks and reviews are historical only.

@seonghobae seonghobae closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant