fix(gateway): allow required Google Fonts origins in Control UI CSP#29279
Conversation
Greptile SummaryThis PR adds Google Fonts origins ( Critical Issue: The PR is incomplete. While it adds CSP allowlist entries for Google Fonts, the actual Google Fonts import was removed from
To fix: Either (1) add the Google Fonts import back to Confidence Score: 1/5
Last reviewed commit: cca598f |
|
Hey @vincentkoc, thanks for picking this up. A few notes for consideration:
Would it make sense to either reopen #28202 or adopt its test structure here? |
cca598f to
0cd83a7
Compare
|
Addressed the feedback in follow-up commits:
Force-pushed updated branch: |
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
…penclaw#29579) (cherry picked from commit 5d51e99) # Conflicts: # CHANGELOG.md
…penclaw#29279) Cherry-pick of upstream d123ade.
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
|
Great progress in this cluster. If you think there is a gap, tell me and I'll reopen review right away. |
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
…penclaw#29579) (cherry picked from commit 5d51e99) # Conflicts: # CHANGELOG.md
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
…penclaw#29279) Cherry-pick of upstream d123ade.
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
…penclaw#29279) * Gateway: allow Google Fonts stylesheet and font CDN in Control UI CSP * Tests: assert Control UI CSP allows required Google Fonts origins * Gateway: fix CSP comment for Google Fonts allowlist intent * Tests: split dedicated Google Fonts CSP assertion
Summary
style-srcincludeshttps://fonts.googleapis.com,font-srcincludeshttps://fonts.gstatic.com).control-ui-csp+ its tests.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Control UI CSP now allows the required Google Fonts origins for style/font requests.
Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
buildControlUiCspHeader().style-src ... https://fonts.googleapis.com.font-src ... https://fonts.gstatic.com.pnpm vitest run src/gateway/control-ui-csp.test.ts.Expected
Actual
Evidence
Human Verification (required)
pnpm vitest run src/gateway/control-ui-csp.test.tslocally after change.Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
src/gateway/control-ui-csp.ts,src/gateway/control-ui-csp.test.tsRisks and Mitigations
fonts.googleapis.com(style) andfonts.gstatic.com(font).