๐ก๏ธ Sentinel: [๋ณด์ ๊ฐ์ ] Trusted Types ๊ธฐ๋ฐ ๋ค์ดํฐ๋ธ DOM XSS ๋ฐฉ์ด ์ ์ฉ#65
๐ก๏ธ Sentinel: [๋ณด์ ๊ฐ์ ] Trusted Types ๊ธฐ๋ฐ ๋ค์ดํฐ๋ธ DOM XSS ๋ฐฉ์ด ์ ์ฉ#65seonghobae wants to merge 1 commit into
Conversation
index.html CSP ๊ท์น์ require-trusted-types-for 'script' ์ง์์ด๋ฅผ ์ถ๊ฐํ์ฌ ์ธ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์์ด ๋ค์ดํฐ๋ธ ํ๊ฒฝ์์ DOM XSS ์ทจ์ฝ์ ์ ์์ฒ ๋ฐฉ์ดํฉ๋๋ค. ๋ณธ ์ ํ๋ฆฌ์ผ์ด์ ์ textContent์ ๊ฐ์ ์์ ํ DOM API๋ง์ ์ฌ์ฉํ๋ฏ๋ก ๋ถ์์ฉ ์์ด ํธํ๋ฉ๋๋ค.
|
๐ 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. |
๐จ Severity: MEDIUM
๐ก Vulnerability: DOM ๊ธฐ๋ฐ XSS ๊ณต๊ฒฉ ์ทจ์ฝ์ (XSS ํํฐ ๋๋ ๋ช ์์ ์ธ ๋ณด์ ์ ์ฑ ๋ถ์ฌ)
๐ฏ Impact: ์ ๊ท ๊ธฐ๋ฅ ๊ฐ๋ฐ ๋๋ ์ธ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋์ ๊ณผ์ ์์
innerHTML๋ฑ ๋ถ์์ ํ DOM ์ฑํฌ(sink)๊ฐ ์ฝ์ ๋ ๊ฒฝ์ฐ ์ ์ฑ ์คํฌ๋ฆฝํธ ์คํ์ผ๋ก ์ด์ด์ง ์ ์๋ ๊ตฌ์กฐ์ ์ํ์ฑ๐ง Fix:
index.htmlํ์ผ์ Content-Security-Policy (CSP) ํค๋์require-trusted-types-for 'script'๋ฅผ ์ถ๊ฐํ์ต๋๋ค. ์ด ์ ํ๋ฆฌ์ผ์ด์ ์textContent์ ๊ฐ์ ์์ ํ DOM API๋ง ์ฌ์ฉํ๋ฏ๋ก ๋ฌด๊ฑฐ์ด ์ธ๋ถ ์๋ํ์ด์ (์: DOMPurify) ์์ด๋ ๋ค์ดํฐ๋ธ ์ ์ฑ ์ ํตํด ์์ฒ ๋ฐฉ์ด๊ฐ ๊ฐ๋ฅํฉ๋๋ค.โ Verification: ๋ณ๊ฒฝ ํ ๋ก์ปฌ ํ ์คํธ ์๋ฒ๋ฅผ ๋์ Playwright ๊ฒ์ฆ์ ์งํํ ๊ฒฐ๊ณผ, CSP ์๋ฐ ๊ฒฝ๊ณ ์์ด ํฐํธ, ๋ฆฌ์์ค, ์คํฌ๋ฆฝํธ๊ฐ ์ ์ ๋ก๋๋จ์ ํ์ธํ์ต๋๋ค. ์์ธ๋ฌ Sentinel ์ ๋๊ณผ CHANGELOG์ ํด๋น ์ฌํญ์ ์ ๋ฐ์ดํธํ์ต๋๋ค.
PR created automatically by Jules for task 901541646361252514 started by @seonghobae