Repository navigation
🛡️ Sentinel: [HIGH] Reject relative URLs in tab creation URL validation - #1727
RyutaKojima wants to merge 1 commit into
Conversation
Prevent relative URLs (such as //attacker.com or /path) from resolving to base extension protocols in chromeTabs.isSafeTabUrl. Co-authored-by: RyutaKojima <12064805+RyutaKojima@users.noreply.github.com>
|
👋 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. |
🛡️ Sentinel セキュリティ修正サマリー
🚨 Severity
HIGH
💡 Vulnerability
chromeTabs.ts内のisSafeTabUrl関数において、プロトコル相対URL (//attacker.com) やパス相対URL (/path,\path) が渡された場合、new URL(url, 'chrome-extension://dummy/')のパース処理時にベースURLを継承してchrome-extension:プロトコルに解決され、安全なプロトコルとして検証を通過してしまう問題が存在していました。🎯 Impact
悪意のある相対URLがタブ作成API (
chromeTabs.createLastやchromeTabs.createActiveRightなど) に渡された際、無効化・拒否されずにタブが作成されてしまう可能性があります。🔧 Fix
isSafeTabUrl関数内で入力文字列のトリム (trim()) を行い、余分な空白を除去。//,/,\で始まるプロトコル相対/パス相対URLを明示的にチェックし、パース前に即座に拒否 (falseを返却) するように修正。✅ Verification
chromeTabs.test.tsに相対URLの拒否検証テストを追加。yarn testおよびyarn lint:allが正常に通過することを確認。PR created automatically by Jules for task 1041865575528879342 started by @RyutaKojima