Skip to content

πŸ›‘οΈ Sentinel: [security improvement] CSP base-uri μ œν•œ κ°•ν™” - #105

Closed
seonghobae wants to merge 1 commit into
mainfrom
sentinel/csp-base-uri-none-4553777671447210037
Closed

πŸ›‘οΈ Sentinel: [security improvement] CSP base-uri μ œν•œ κ°•ν™”#105
seonghobae wants to merge 1 commit into
mainfrom
sentinel/csp-base-uri-none-4553777671447210037

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

🚨 Severity: MEDIUM
πŸ’‘ Vulnerability: λͺ…μ‹œμ μΈ <base> νƒœκ·Έκ°€ λΆˆν•„μš”ν•œ 정적 μ‚¬μ΄νŠΈμ—μ„œ CSP에 base-uri 'self'κ°€ μ„€μ •λ˜μ–΄ μžˆμ–΄, μ•…μ˜μ μΈ 베이슀 νƒœκ·Έ μΈμ μ…˜ 곡격을 ν†΅ν•œ DOM 기반 XSSλ‚˜ 경둜 μ‘°μž‘ 곡격의 μ—¬μ§€κ°€ μ‘΄μž¬ν–ˆμŠ΅λ‹ˆλ‹€.
🎯 Impact: 취약점 λ…ΈμΆœ μ‹œ, μ‚¬μš©μžμ˜ μ„Έμ…˜ νƒˆμ·¨ 및 μ‚¬μ΄νŠΈ λ‚΄ μ•…μ„± 슀크립트 싀행이 κ°€λŠ₯ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
πŸ”§ Fix: index.html 파일의 Content Security Policy(CSP) μ„€μ •μ—μ„œ base-uri 'self'λ₯Ό base-uri 'none'으둜 λ³€κ²½ν•˜μ—¬ 베이슀 νƒœκ·Έ μΈμ μ…˜ 곡격을 μ›μ²œ μ°¨λ‹¨ν–ˆμŠ΅λ‹ˆλ‹€.
βœ… Verification: ν…ŒμŠ€νŠΈ μŠ€μœ„νŠΈκ°€ λͺ¨λ‘ ν†΅κ³Όν•˜λŠ” 것을 ν™•μΈν•˜μ˜€κ³  ν”„λ‘ νŠΈμ—”λ“œ 검증을 톡해 CSP 메타 νƒœκ·Έκ°€ μ˜¬λ°”λ₯΄κ²Œ μ μš©λ¨μ„ ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€.


PR created automatically by Jules for task 4553777671447210037 started by @seonghobae

@google-labs-jules

Copy link
Copy Markdown

πŸ‘‹ 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings July 25, 2026 13:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens the site’s CSP for the static GitHub Pages homepage by forbidding <base> tag usage, reducing the risk of base-tag injection leading to DOM-based XSS or URL/path manipulation.

Changes:

  • Update index.html CSP from base-uri 'self' to base-uri 'none'.
  • Document the security hardening in CHANGELOG.md.
  • Add a Sentinel security journal entry describing the base-uri injection prevention rationale.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
index.html Tightens CSP by setting base-uri 'none' to prevent <base>-based injection/rewrites.
CHANGELOG.md Records the CSP base-uri hardening under [Unreleased].
.jules/sentinel.md Adds a security learning/prevention entry for base-uri injection mitigation.

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .jules/sentinel.md
**Vulnerability:** Missing input validation on `setLanguage()` could allow invalid strings (like Prototype Pollution payloads or arbitrary text) to be applied to the DOM (`lang` attribute) and stored in `localStorage`.
**Learning:** The global `setLanguage` function assumed inputs would only come from predefined button clicks, skipping runtime validation.
**Prevention:** Always sanitize and validate function arguments at the application boundary, even if the primary caller is trusted, to enforce defense in depth.
## 2024-07-25 - [Base URI Injection λ°©μ§€]

Copy link
Copy Markdown
Contributor Author

Closing as already implemented on main. The current page uses a stronger deny-by-default CSP with base-uri 'none', explicit same-origin resource directives, blocked forms/frames/objects, and regression tests that reject unsafe inline/eval content. This branch is superseded.

@seonghobae seonghobae closed this Aug 6, 2026
@google-labs-jules

Copy link
Copy Markdown

Closing as already implemented on main. The current page uses a stronger deny-by-default CSP with base-uri 'none', explicit same-origin resource directives, blocked forms/frames/objects, and regression tests that reject unsafe inline/eval content. This branch is superseded.

Understood. Acknowledging that this work is now obsolete and stopping work on this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants