Skip to content

๐Ÿ›ก๏ธ Sentinel: [CRITICAL] ๊ณต์œ  ์Šค๋ƒ…์ƒท ๋‚ด๋ณด๋‚ด๊ธฐ ์‹œ ๋ฏผ๊ฐ ๋ฐ์ดํ„ฐ ์œ ์ถœ ์ทจ์•ฝ์  ์ˆ˜์ •#624

Open
seonghobae wants to merge 2 commits into
mainfrom
sentinel-fix-snapshot-leakage-11329532268294628035
Open

๐Ÿ›ก๏ธ Sentinel: [CRITICAL] ๊ณต์œ  ์Šค๋ƒ…์ƒท ๋‚ด๋ณด๋‚ด๊ธฐ ์‹œ ๋ฏผ๊ฐ ๋ฐ์ดํ„ฐ ์œ ์ถœ ์ทจ์•ฝ์  ์ˆ˜์ •#624
seonghobae wants to merge 2 commits into
mainfrom
sentinel-fix-snapshot-leakage-11329532268294628035

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

๐Ÿšจ Severity: CRITICAL
๐Ÿ’ก Vulnerability: ํผ๋ธ”๋ฆญ ๊ณต์œ  ๋งํฌ๋ฅผ ํ†ตํ•ด ์Šค๋ƒ…์ƒท์„ ๋‚ด๋ณด๋‚ผ ๋•Œ (SQL, Markdown, LLM ํ”„๋กฌํ”„ํŠธ ๋“ฑ) ๋ฏผ๊ฐํ•œ ํ•„๋“œ(์ฝ”๋ฉ˜ํŠธ, ์˜ˆ์‹œ ๊ฐ’)๊ฐ€ ์œ ์ถœ๋˜๋Š” ์ทจ์•ฝ์ ์ด ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
๐ŸŽฏ Impact: ์ธ์ฆ๋˜์ง€ ์•Š์€ ์‚ฌ์šฉ์ž๊ฐ€ ๋ฏผ๊ฐํ•œ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์„ค๊ณ„ ๋ฐ ์˜ˆ์‹œ ๋ฐ์ดํ„ฐ์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
๐Ÿ”ง Fix: ๋ชจ๋“  ๋‚ด๋ณด๋‚ด๊ธฐ ์—”๋“œํฌ์ธํŠธ์—์„œ ์ง๋ ฌํ™” ํ•จ์ˆ˜๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•˜๊ธฐ ์ „์— _redact_sensitive_snapshot_fields๋ฅผ ์ ์šฉํ•˜๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
โœ… Verification: ํ…Œ์ŠคํŠธ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•˜์—ฌ ๋‚ด๋ณด๋‚ด๊ธฐ ์‹œ ๋ฏผ๊ฐ ์ •๋ณด๊ฐ€ ์ œ๋Œ€๋กœ ๋งˆ์Šคํ‚น๋˜๋Š”์ง€ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.


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

๋ชจ๋“  ๊ณต์œ  ์Šค๋ƒ…์ƒท ๋‚ด๋ณด๋‚ด๊ธฐ(SQL, Markdown, LLM ํ”„๋กฌํ”„ํŠธ ๋“ฑ) ์—”๋“œํฌ์ธํŠธ์—์„œ
์ง๋ ฌํ™” ํ•จ์ˆ˜๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๋„˜๊ธฐ๊ธฐ ์ „์— `_redact_sensitive_snapshot_fields`๋ฅผ
ํ˜ธ์ถœํ•˜๋„๋ก ํŒจ์น˜ํ•˜์—ฌ ์ฃผ์„, ์˜ˆ์‹œ ๋ฐ์ดํ„ฐ ๋“ฑ ๋ฏผ๊ฐํ•œ ์ •๋ณด๊ฐ€ ์™ธ๋ถ€๋กœ ๋…ธ์ถœ๋˜์ง€
์•Š๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
@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.

Copilot AI review requested due to automatic review settings July 23, 2026 02:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ Not ready to approve

A CRITICAL security regression fix should include a targeted regression test confirming shared export outputs no longer contain original example_value/comment content.

Pull request overview

This PR fixes a critical data-leak vulnerability where publicly shared snapshot export endpoints could expose sensitive fields (schema comments and example_values) by passing the raw snapshot_json into downstream serializers/LLM prompt generators.

Changes:

  • Apply _redact_sensitive_snapshot_fields before generating SQL exports for shared snapshots.
  • Apply _redact_sensitive_snapshot_fields once and reuse the redacted payload for shared reversing-spec and index-design exports (including LLM draft mode).
  • Document the incident/prevention note in .Jules/sentinel.md.
File summaries
File Description
backend/app/api/share.py Ensures shared export endpoints redact sensitive snapshot fields before serialization/LLM prompt generation.
.Jules/sentinel.md Records the data-leak incident and prevention guidance for future PRs.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Low

Note

Your feedback helps us improve the quality of this feature.
Please use ๐Ÿ‘ or ๐Ÿ‘Ž to tell us whether this assessment is correct.


๐Ÿ’ก Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/app/api/share.py Outdated
Comment thread backend/app/api/share.py Outdated
๋ชจ๋“  ๊ณต์œ  ์Šค๋ƒ…์ƒท ๋‚ด๋ณด๋‚ด๊ธฐ(SQL, Markdown, LLM ํ”„๋กฌํ”„ํŠธ ๋“ฑ) ์—”๋“œํฌ์ธํŠธ์—์„œ
์ง๋ ฌํ™” ํ•จ์ˆ˜๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๋„˜๊ธฐ๊ธฐ ์ „์— `_redact_sensitive_snapshot_fields`๋ฅผ
ํ˜ธ์ถœํ•˜๋„๋ก ํŒจ์น˜ํ•˜์—ฌ ์ฃผ์„, ์˜ˆ์‹œ ๋ฐ์ดํ„ฐ ๋“ฑ ๋ฏผ๊ฐํ•œ ์ •๋ณด๊ฐ€ ์™ธ๋ถ€๋กœ ๋…ธ์ถœ๋˜์ง€
์•Š๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
Copilot AI review requested due to automatic review settings July 23, 2026 02:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ Not ready to approve

There is no regression test coverage proving the public share export endpoints no longer leak comment/*_comment/example_value, which is important to prevent reintroducing a CRITICAL issue.

Review details

Comments suppressed due to low confidence (1)

backend/app/api/share.py:176

  • Regression coverage: this change is security-critical (public share exports), but there are no backend tests exercising /api/share/.../export.sql, /reversing-spec.md, or /index-design.md to ensure sensitive fields are actually redacted in the exported output (and remain so). Please add a test that builds a minimal SchemaSnapshotData.snapshot_json containing comment / relation_comment / column_comment / example_value, hits each export endpoint, and asserts those values do not appear in the response body.
    return snapshot_json_to_sql(cast(dict, _redact_sensitive_snapshot_fields(data.snapshot_json)), target_dialect=dialect)
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Low

Note

Your feedback helps us improve the quality of this feature.
Please use ๐Ÿ‘ or ๐Ÿ‘Ž to tell us whether this assessment is correct.

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.

2 participants