๐ก๏ธ Sentinel: [CRITICAL] ๊ณต์ ์ค๋ ์ท ๋ด๋ณด๋ด๊ธฐ ์ ๋ฏผ๊ฐ ๋ฐ์ดํฐ ์ ์ถ ์ทจ์ฝ์ ์์ #624
Conversation
๋ชจ๋ ๊ณต์ ์ค๋ ์ท ๋ด๋ณด๋ด๊ธฐ(SQL, Markdown, LLM ํ๋กฌํํธ ๋ฑ) ์๋ํฌ์ธํธ์์ ์ง๋ ฌํ ํจ์๋ก ๋ฐ์ดํฐ๋ฅผ ๋๊ธฐ๊ธฐ ์ ์ `_redact_sensitive_snapshot_fields`๋ฅผ ํธ์ถํ๋๋ก ํจ์นํ์ฌ ์ฃผ์, ์์ ๋ฐ์ดํฐ ๋ฑ ๋ฏผ๊ฐํ ์ ๋ณด๊ฐ ์ธ๋ถ๋ก ๋ ธ์ถ๋์ง ์๋๋ก ์์ ํ์ต๋๋ค.
|
๐ 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. |
There was a problem hiding this comment.
โ ๏ธ 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_fieldsbefore generating SQL exports for shared snapshots. - Apply
_redact_sensitive_snapshot_fieldsonce 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.
๋ชจ๋ ๊ณต์ ์ค๋ ์ท ๋ด๋ณด๋ด๊ธฐ(SQL, Markdown, LLM ํ๋กฌํํธ ๋ฑ) ์๋ํฌ์ธํธ์์ ์ง๋ ฌํ ํจ์๋ก ๋ฐ์ดํฐ๋ฅผ ๋๊ธฐ๊ธฐ ์ ์ `_redact_sensitive_snapshot_fields`๋ฅผ ํธ์ถํ๋๋ก ํจ์นํ์ฌ ์ฃผ์, ์์ ๋ฐ์ดํฐ ๋ฑ ๋ฏผ๊ฐํ ์ ๋ณด๊ฐ ์ธ๋ถ๋ก ๋ ธ์ถ๋์ง ์๋๋ก ์์ ํ์ต๋๋ค.
There was a problem hiding this comment.
โ ๏ธ 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.mdto ensure sensitive fields are actually redacted in the exported output (and remain so). Please add a test that builds a minimalSchemaSnapshotData.snapshot_jsoncontainingcomment/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.
๐จ Severity: CRITICAL
๐ก Vulnerability: ํผ๋ธ๋ฆญ ๊ณต์ ๋งํฌ๋ฅผ ํตํด ์ค๋ ์ท์ ๋ด๋ณด๋ผ ๋ (SQL, Markdown, LLM ํ๋กฌํํธ ๋ฑ) ๋ฏผ๊ฐํ ํ๋(์ฝ๋ฉํธ, ์์ ๊ฐ)๊ฐ ์ ์ถ๋๋ ์ทจ์ฝ์ ์ด ์์์ต๋๋ค.
๐ฏ Impact: ์ธ์ฆ๋์ง ์์ ์ฌ์ฉ์๊ฐ ๋ฏผ๊ฐํ ๋ฐ์ดํฐ๋ฒ ์ด์ค ์ค๊ณ ๋ฐ ์์ ๋ฐ์ดํฐ์ ์ ๊ทผํ ์ ์์์ต๋๋ค.
๐ง Fix: ๋ชจ๋ ๋ด๋ณด๋ด๊ธฐ ์๋ํฌ์ธํธ์์ ์ง๋ ฌํ ํจ์๋ก ๋ฐ์ดํฐ๋ฅผ ์ ๋ฌํ๊ธฐ ์ ์
_redact_sensitive_snapshot_fields๋ฅผ ์ ์ฉํ๋๋ก ์์ ํ์ต๋๋ค.โ Verification: ํ ์คํธ ์ฝ๋๋ฅผ ์คํํ์ฌ ๋ด๋ณด๋ด๊ธฐ ์ ๋ฏผ๊ฐ ์ ๋ณด๊ฐ ์ ๋๋ก ๋ง์คํน๋๋์ง ํ์ธํ์ต๋๋ค.
PR created automatically by Jules for task 11329532268294628035 started by @seonghobae