π‘οΈ Sentinel: [HIGH] HTML λ λλ§ μ XSS(ν¬λ‘μ€ μ¬μ΄νΈ μ€ν¬λ¦½ν ) μ·¨μ½μ λ°©μ§ - #50
π‘οΈ Sentinel: [HIGH] HTML λ λλ§ μ XSS(ν¬λ‘μ€ μ¬μ΄νΈ μ€ν¬λ¦½ν
) μ·¨μ½μ λ°©μ§#50seonghobae wants to merge 1 commit into
Conversation
- `html4tree/main.kt`μμ λλ ν 리 λ° νμΌ μ΄λ¦ μΆλ ₯ μ λ°μν μ μλ XSS(ν¬λ‘μ€ μ¬μ΄νΈ μ€ν¬λ¦½ν ) μ·¨μ½μ μ λ°©μ§νκΈ° μν΄ `String.escapeHtml()` νμ₯ ν¨μλ₯Ό μΆκ°νκ³ μ μ©νμ΅λλ€. - μμ± νμΆ(Attribute Breakout)μ λ°©μ§νκΈ° μν΄ `<a>` νκ·Έμ `href` μμ±μ ν°λ°μ΄ν(`"`)λ‘ κ°μμ΅λλ€. - μ½λ λ³κ²½ μ¬νμ μλ²½νκ² κ²μ¦νκΈ° μν΄ JaCoCo ν μ€νΈ 컀λ²λ¦¬μ§ 리ν¬ν κΈ°λ₯μ μΆκ°νκ³ , 100% 컀λ²λ¦¬μ§λ₯Ό λ¬μ±νλ λ¨μ ν μ€νΈ μνΈλ₯Ό μμ±νμ΅λλ€. - `.jules/sentinel.md` μ 보μ μΈμ¬μ΄νΈ κΈ°λ‘μ μΆκ°νμ΅λλ€.
|
π 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. |
|
Closing as superseded by already-merged XSS hardening (#21 and #45). Current |
μκ² μ΅λλ€. μ΄ μμ μ΄ μ΄λ―Έ λ³ν©λ λ³κ²½ μ¬νμ μν΄ λ체λμμΌλ©° λ μ΄μ μ ν¨νμ§ μμμ νμΈνμ΅λλ€. μ΄ μμ μ λν μΆκ° μμ μ μ€λ¨νκ² μ΅λλ€. |
π¨ Severity: HIGH
π‘ Vulnerability: μ ν리μΌμ΄μ μμ λλ ν 리 λ° νμΌ μ΄λ¦μ μ½μ΄
index.htmlνμΌμ μμ±ν λ, μ΄λ¦μ μ μμ μΈ HTML λ° μ€ν¬λ¦½νΈ μ½λ(μ:<script>alert(1)</script>)κ° ν¬ν¨λμ΄ μμΌλ©΄ κ·Έλλ‘ λ λλ§λμ΄ XSS 곡격μ λ ΈμΆλ μ μμμ΅λλ€.π― Impact: μμ±λ
index.htmlμ μ΄λνλ μ¬μ©μμ λΈλΌμ°μ μμ μμμ μ μ± μ€ν¬λ¦½νΈκ° μ€νλ μ μμ΅λλ€.π§ Fix:
String.escapeHtml()νμ₯ ν¨μλ₯Ό λμ νμ¬ νμΌ λ° λλ ν 리 μ΄λ¦μ<, >, &, ", 'λ¬Έμλ€μ μμ ν HTML μν°ν°λ‘ λ³ννμμ΅λλ€. μΆκ°λ‘hrefμμ±κ°μ λͺ μμ μΌλ‘ λ°μ΄νλ‘ κ°μΈμ μμ± νμΆ κ³΅κ²©λ λ°©μ΄νμ΅λλ€.build.gradleμ JaCoCo νλ¬κ·ΈμΈμ μ€μ νμ¬ 100% λ¨μ ν μ€νΈ 컀λ²λ¦¬μ§λ₯Ό ꡬννμ΅λλ€.β Verification:
./gradlew test jacocoTestReportμ€ν νbuild/reports/jacoco/test/html/index.htmlνμΌμ ν΅ν΄ ν μ€νΈκ° ν΅κ³Όνκ³ 100% 컀λ²λ¦¬μ§λ₯Ό λ¬μ±νμμ νμΈνμ΅λλ€.PR created automatically by Jules for task 5890943741233817557 started by @seonghobae