Conversation
🦋 Changeset detectedLatest commit: 245ea70 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude add a changeset |
|
Claude finished @dimaMachina's task in 40s —— View job Adding Changeset
Added changeset |
Co-authored-by: Dimitri POSTOLOV <dimaMachina@users.noreply.github.com>
|
TL;DR — Fixes the Content Security Policy in the manage UI so PostHog and Sentry are allowed via wildcard subdomain patterns ( Key changes
Summary | 2 files | 13 commits | base: Wildcard CSP domains for PostHog and Sentry
The Sentry entry also becomes a simple conditional string instead of a try/catch URL-parsing IIFE. Array-based
|
There was a problem hiding this comment.
PR Review Summary
(0) Total Issues | Risk: Low
This PR correctly updates the CSP policy to accommodate PostHog's and Sentry's use of multiple subdomains. The changes:
-
PostHog wildcard (
https://*.posthog.com): Follows PostHog's official CSP documentation which recommends wildcard patterns because PostHog Cloud uses dynamic subdomains for different services (analytics, feature flags, session recording, etc.) -
PostHog added to script-src: Correctly addresses that PostHog loads JavaScript for analytics/session recording, which requires script-src permissions in addition to connect-src
-
Sentry wildcard (
https://*.sentry.io): Simplifies the previous URL-parsing logic while accommodating Sentry's subdomain structure -
Helpful comment: The reference to PostHog's CSP docs is valuable documentation for future maintainers
💭 Consider (2)
💭 1) proxy.ts:12 Self-hosted PostHog consideration
Issue: The wildcard always uses *.posthog.com regardless of what PUBLIC_POSTHOG_HOST is configured to.
Why: If a deployment uses self-hosted PostHog (e.g., https://analytics.mycompany.com), the CSP would allow posthog.com subdomains but not the actual configured host. This is unlikely to be an issue for Inkeep's use case (PostHog Cloud).
Fix: For full self-hosted support, could conditionally apply the wildcard only when the host contains posthog.com.
💭 2) proxy.ts:18 Self-hosted Sentry consideration
Issue: Similar to PostHog - uses *.sentry.io wildcard regardless of DSN host.
Why: Self-hosted Sentry instances wouldn't be covered. The previous implementation parsed the DSN origin which was more precise but also more complex.
Fix: For self-hosted support, could check if DSN contains sentry.io before applying the wildcard.
Both of these are valid considerations but unlikely to affect Inkeep's deployment which appears to use PostHog Cloud and Sentry SaaS. The current implementation is simpler and follows vendor recommendations.
✅ APPROVE
Summary: Clean, well-structured CSP fix that follows PostHog's official guidance. The wildcard approach is the recommended solution for PostHog Cloud's dynamic subdomains. The code simplification for Sentry is reasonable. Ship it! 🚀
Discarded (0)
No findings were discarded.
Reviewers (2)
| Reviewer | Returned | Main Findings | Consider | While You're Here | Inline Comments | Pending Recs | Discarded |
|---|---|---|---|---|---|---|---|
pr-review-standards |
0 | 0 | 0 | 0 | 0 | 0 | 0 |
pr-review-appsec |
2 | 0 | 2 | 0 | 0 | 0 | 0 |
| Total | 2 | 0 | 2 | 0 | 0 | 0 | 0 |
|
TL;DR — Fixes the Content Security Policy in Key changes
Summary | 2 files | 13 commits | base: Wildcard CSP domains for PostHog and Sentry
The Sentry IIFE that wrapped
|
|
TL;DR — Fixes the Content Security Policy in the manage UI so PostHog and Sentry are allowed via wildcard subdomain patterns ( Key changes
Summary | 2 files | 13 commits | base: Wildcard CSP origins for PostHog and Sentry
The previous approach broke whenever PostHog Cloud rotated to a different subdomain. The Sentry IIFE was also unnecessarily complex — a static wildcard is simpler and equally secure since
|
There was a problem hiding this comment.
Clean CSP fix. The wildcard approach for both PostHog (https://*.posthog.com) and Sentry (https://*.sentry.io) aligns with each vendor's official CSP documentation. Adding posthogHost to script-src closes a gap that likely caused script-load CSP violations. The array refactor for scriptSrcDomains is consistent with the existing connectSrcDomains/frameSrcDomains pattern.
Claude Opus | 𝕏

No description provided.