Skip to content

Commit 92db3ad

Browse files
committed
security: remove landing-only third-party CSP permissions
1 parent fd6c2f5 commit 92db3ad

4 files changed

Lines changed: 3 additions & 18 deletions

File tree

‎apps/sim/components/logo-shell/logo-shell.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { DesktopTitleBarLane } from '@/app/_shell/desktop-title-bar'
66
/**
77
* Logo-only page frame shared by status pages and public interfaces. Interfaces
88
* default to light tokens; status pages inherit the active theme. The home link
9-
* uses document navigation so marketing initializes its own theme store.
9+
* uses document navigation across the independently served website boundary.
1010
*
1111
* Children decide their own layout: pass `center` for a single centered column
1212
* (404 message, simple gates); omit it for full-width content (the live chat

‎apps/sim/components/status-page/return-home-link.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { ChipLink } from '@sim/emcn'
44

5-
/** A document navigation initializes the landing theme when leaving an app status page. */
5+
/** Leave the app router when navigating to the independently served homepage. */
66
export function ReturnHomeLink() {
77
return (
88
<ChipLink

‎apps/sim/lib/api/contracts/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Deliberately NOT re-exported from this barrel: `./tools` (per-integration tool
3-
* contracts), `./selectors`, `./v1` (admin API), and `./demo-requests`. All of their
3+
* contracts), `./selectors`, and `./v1` (admin API). All of their
44
* consumers import those files directly, and re-exporting them here shipped their Zod
55
* schema construction (~60 KB gzip) to every route that touches any contract — schema
66
* objects are built at module scope, so `export *` defeats tree-shaking for them.

‎apps/sim/lib/core/security/csp.ts‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ const STATIC_SCRIPT_SRC = [
9999
'https://*.google.com',
100100
'https://apis.google.com',
101101
'https://challenges.cloudflare.com',
102-
// Cal.com booking embed (landing /demo) — embed.js is served from app.cal.com
103-
'https://app.cal.com',
104102
...(isReactGrabEnabled ? ['https://unpkg.com'] : []),
105103
...(isHosted
106104
? [
@@ -111,9 +109,6 @@ const STATIC_SCRIPT_SRC = [
111109
'https://www.googleadservices.com',
112110
'https://googleads.g.doubleclick.net',
113111
'https://analytics.ahrefs.com',
114-
// X (Twitter) conversion pixel (landing pages) — the base code injects
115-
// uwt.js as a <script> tag from static.ads-twitter.com
116-
'https://static.ads-twitter.com',
117112
// Freebuff Ads conversion tag — freebuff-tag.js
118113
'https://freebuff.com',
119114
]
@@ -139,9 +134,6 @@ const STATIC_CONNECT_SRC = [
139134
'https://github.com/*',
140135
'https://status.sim.ai',
141136
'https://challenges.cloudflare.com',
142-
// Cal.com booking embed (landing /demo) — embed XHR/availability calls
143-
'https://app.cal.com',
144-
'https://cal.com',
145137
...(isReactGrabEnabled ? ['https://www.react-grab.com'] : []),
146138
...(isDev ? ['ws://localhost:4722'] : []),
147139
...(isHosted
@@ -158,10 +150,6 @@ const STATIC_CONNECT_SRC = [
158150
'https://*.g.doubleclick.net',
159151
// Google Ads conversion tag — conversion beacons
160152
'https://www.googleadservices.com',
161-
// X (Twitter) conversion pixel — uwt.js sends conversion beacons here
162-
// via fetch/sendBeacon. The t.co image-pixel fallback is already
163-
// covered by the `https:` wildcard in img-src.
164-
'https://analytics.twitter.com',
165153
// Freebuff Ads conversion tag — beacons to /api/advertisers/conversions/client
166154
'https://freebuff.com',
167155
]
@@ -172,9 +160,6 @@ const STATIC_FRAME_SRC = [
172160
"'self'",
173161
'blob:',
174162
'https://challenges.cloudflare.com',
175-
// Cal.com booking embed (landing /demo) — the booking iframe
176-
'https://app.cal.com',
177-
'https://cal.com',
178163
'https://drive.google.com',
179164
'https://docs.google.com',
180165
'https://*.google.com',

0 commit comments

Comments
 (0)