Skip to content

Commit

Permalink
Update Content Security Policy (#8858)
Browse files Browse the repository at this point in the history
* remove items that are not approved/in use

* add security as codeowners to csp

* remove youtube
  • Loading branch information
Jeffreyhung authored Jan 11, 2024
1 parent 89246be commit f8444ff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 27 deletions.
8 changes: 7 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
/src/docs/product/discover-queries/ @getsentry/visibility
/src/docs/product/performance/ @getsentry/visibility

/src/docs/product/cli/ @kamilogorek
/src/docs/product/cli/dif/ @getsentry/owners-native

/.github/labels.yml @getsentry/open-source
Expand All @@ -45,3 +44,10 @@
/src/wizard/javascript/replay-onboarding/ @getsentry/replay @getsentry/replay-sdk

###### End Replays #######

###### Security ########

# Requiring review from security team for Content-Security-Policy changes
/vercel.json @getsentry/security

###### End Security ####
3 changes: 1 addition & 2 deletions src/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {PiiFields} from './relayPiifields';
import {SandboxLink, SandboxOnly} from './sandboxLink';
import {SignInNote} from './signInNote';
import {SmartLink} from './smartLink';
import {VimeoEmbed, YouTubeEmbed} from './video';
import {VimeoEmbed} from './video';

const mdxComponents = {
Alert,
Expand Down Expand Up @@ -60,7 +60,6 @@ const mdxComponents = {
RelayMetrics,
LambdaLayerDetail,
VimeoEmbed,
YouTubeEmbed,
SandboxLink,
SandboxOnly,
SignInNote,
Expand Down
23 changes: 0 additions & 23 deletions src/components/video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,3 @@ const StyledVimeoIframe = styled.iframe`
height: 100%;
border: 0;
`;

export function YouTubeEmbed({id, className}: Video) {
return (
<ResponsiveEmbed className={className}>
<StyledYouTubeIframe
src={`https://www.youtube-nocookie.com/embed/${id}?rel=0`}
frameBorder="0"
allowFullScreen
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
/>
</ResponsiveEmbed>
);
}

const StyledYouTubeIframe = styled.iframe`
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
`;
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
{
"key": "Content-Security-Policy",
"value": "upgrade-insecure-requests; default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' *.sentry-cdn.com googleads.g.doubleclick.net m.servedby-buysellads.com www.googletagmanager.com plausible.io *.plausible.io; connect-src 'self' *.sentry.io sentry.io adservice.google.com *.algolia.net *.algolianet.com *.algolia.io plausible.io *.plausible.io reload.getsentry.net stats.g.doubleclick.net vitals.vercel-analytics.com; img-src * 'self' data: www.google.com img.youtube.com www.googletagmanager.com plausible.io *.plausible.io; style-src 'self' 'unsafe-inline'; font-src 'self' fonts.gstatic.com; frame-src demo.arcade.software player.vimeo.com; worker-src blob:; report-uri https://o1.ingest.sentry.io/api/1297620/security/?sentry_key=b3cfba5788cb4c138f855c8120f70eab"
"value": "upgrade-insecure-requests; default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' *.sentry-cdn.com www.googletagmanager.com plausible.io *.plausible.io; connect-src 'self' *.sentry.io sentry.io *.algolia.net *.algolianet.com *.algolia.io plausible.io *.plausible.io reload.getsentry.net; img-src * 'self' data: www.google.com www.googletagmanager.com plausible.io *.plausible.io; style-src 'self' 'unsafe-inline'; font-src 'self' fonts.gstatic.com; frame-src demo.arcade.software player.vimeo.com; worker-src blob:; report-uri https://o1.ingest.sentry.io/api/1297620/security/?sentry_key=b3cfba5788cb4c138f855c8120f70eab"
}
]
}
Expand Down

1 comment on commit f8444ff

@vercel
Copy link

@vercel vercel bot commented on f8444ff Jan 11, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

sentry-docs – ./

sentry-docs.sentry.dev
docs.sentry.io
sentry-docs-git-master.sentry.dev

Please sign in to comment.