π‘οΈ Sentinel: CSPμ unsafe-inline μ κ±° λ° nonce μ μ©μ ν΅ν 보μ κ°ν#120
π‘οΈ Sentinel: CSPμ unsafe-inline μ κ±° λ° nonce μ μ©μ ν΅ν 보μ κ°ν#120seonghobae wants to merge 3 commits into
Conversation
- HTML μμ± μ XSS μ·¨μ½μ μ λ°©μ§νκΈ° μν΄ Content-Security-Policy(CSP)μμ 'unsafe-inline'μ μ κ±°. - <style> νκ·Έμ λμ μΌλ‘ μμ±λλ μμμ nonce μμ±μ μΆκ°νμ¬ μ격ν μΈλΌμΈ μ€νμΌ μ μ± μ μ©. - κΈ°μ‘΄μ μΈλΌμΈ μ€νμΌ μμ±(style="...")λ€μ CSS ν΄λμ€(.link-item, .empty-msg)λ‘ μΆμΆνμ¬ CSP μ€μ. - MainTest.ktμ CSPμ nonce κ²μ¦μ μν ν μ€νΈ μΌμ΄μ€ μ λ°μ΄νΈ.
|
π 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. |
- HTML μμ± μ XSS μ·¨μ½μ μ λ°©μ§νκΈ° μν΄ Content-Security-Policy(CSP)μμ 'unsafe-inline'μ μ κ±°. - <style> νκ·Έμ λμ μΌλ‘ μμ±λλ μμμ nonce μμ±μ μΆκ°νμ¬ μ격ν μΈλΌμΈ μ€νμΌ μ μ± μ μ©. - κΈ°μ‘΄μ μΈλΌμΈ μ€νμΌ μμ±(style="...")λ€μ CSS ν΄λμ€(.link-item, .empty-msg)λ‘ μΆμΆνμ¬ CSP μ€μ. - MainTest.ktμ CSPμ nonce κ²μ¦μ μν ν μ€νΈ μΌμ΄μ€ μ λ°μ΄νΈ.
- HTML μμ± μ XSS μ·¨μ½μ μ λ°©μ§νκΈ° μν΄ Content-Security-Policy(CSP)μμ 'unsafe-inline'μ μ κ±°. - <style> νκ·Έμ λμ μΌλ‘ μμ±λλ μμμ nonce μμ±μ μΆκ°νμ¬ μ격ν μΈλΌμΈ μ€νμΌ μ μ± μ μ©. - κΈ°μ‘΄μ μΈλΌμΈ μ€νμΌ μμ±(style="...")λ€μ CSS ν΄λμ€(.link-item, .empty-msg)λ‘ μΆμΆνμ¬ CSP μ€μ. - MainTest.ktμ CSPμ nonce κ²μ¦μ μν ν μ€νΈ μΌμ΄μ€ μ λ°μ΄νΈ.
π‘οΈ Sentinel: [HIGH] Fix XSS Vulnerability in Auto-generated HTML
π¨ Severity: HIGH
π‘ Vulnerability: μμ±λλ HTMLμ Content-Security-Policy(CSP)μ
style-src 'unsafe-inline'μ΄ ν¬ν¨λμ΄ μμ΄ μ μμ μΈ μ€νμΌ μΈμ μ μ ν΅ν XSS 곡격μ μ¬μ§κ° μμμ΅λλ€. λνstyle="..."ννμ μΈλΌμΈ μ€νμΌμ μ¬μ©νκ³ μμμ΅λλ€.π― Impact: 곡격μκ° μ‘°μλ νμΌ μ΄λ¦μ΄λ ꡬ쑰λ₯Ό ν΅ν΄ μ¬μ©μμ λΈλΌμ°μ μμ μμμ μ€ν¬λ¦½νΈλ μ€νμΌμ μ€νν κ°λ₯μ±μ΄ μμμ΅λλ€.
π§ Fix:
java.util.UUIDλ₯Ό νμ©ν΄ HTML λ λλ§ μ κ³ μ νnonceκ°μ λμ μΌλ‘ μμ±νλλ‘ λ³κ²½νμ΅λλ€.unsafe-inlineμ CSPμμ μ κ±°νκ³nonceλ₯Ό μ μ©νμ΅λλ€..link-item,.empty-msg)λ‘ λ³κ²½νμ¬ λ³΄μ μ μ± μ μ€μνκ² νμ΅λλ€.β Verification:
./gradlew test jacocoTestReportλ₯Ό μ€ννμ¬ 100% ν μ€νΈ 컀λ²λ¦¬μ§λ₯Ό κ²μ¦νμμΌλ©°,MainTest.ktμμ μλ‘ λμ λ nonce λ° CSS ν΄λμ€λ₯Ό κ²μ¬νλλ‘ μ λ°μ΄νΈνμ΅λλ€.PR created automatically by Jules for task 18369353024831413462 started by @seonghobae