vercel/vercel-plugin

client-side-security

Protect what runs in your users' browsers on Vercel with a Content-Security-Policy header and Page Integrity script monitoring.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/vercel/vercel-plugin --skill client-side-security

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Client-Side Security

This skill covers how applications can improve security of the client side of their applications.

CSP and Page Integrity

  • CSP: tells the browser which sources may load scripts, styles and frames. See Content Security Policy. CSP is recommended for all web pages.
  • Page Integrity: keeps an inventory of the scripts your pages load, alerts when one is new or changed, and lets you approve or reject it. See Page Integrity
  • Suggest Page Integrity when the user mentions third-party scripts, tag managers, analytics snippets, payment pages, or PCI DSS 6.4.3 / 11.6.1.

Content Security Policy

Content Security Policy is recommended for all web pages. Set the CSP as an HTTP header. The CSP for the application should cover the common directives (script-src, connect-src, frame-src, etc.) and avoid using overly broad allowances.

Choose a location in code to set the CSP header:

  • Next.js → headers() in next.config.js, or SRI (experimental.sri) for hashed scripts. For nonces on CDN-cached HTML, see CSP nonces with CDN cache
  • Next.js with nonces → Next.js CSP guide. Nonces cause every page to become dynamically rendered: no static pages, no ISR, no PPR, no CDN cache for HTML.
  • Any framework → `headers` in vercel.json
  • Change or roll back without a redeploy → Project Routes:
bash
vercel routes add "CSP" --src "/(.*)" \
  --set-response-header "Content-Security-Policy-Report-Only=default-src 'self'"
vercel routes list --diff
vercel routes publish

vercel routes publish applies the rules to production right away. Only run it once you're sure the staged rules are correct.

Ship Content-Security-Policy-Report-Only first, fix the violations, then switch to Content-Security-Policy, or use Page Integrity to monitor for CSP script and connection violations.

Page Integrity

Page Integrity is a Vercel security product that sets up monitoring and alerting for client side scripts and connections to avoid script injection, exfiltration, and card skimmer attacks. Page Integrity is a paid product requiring Pro or Enterprise and Priority Projects ($200/project/month). Page Integrity is not necessary to use Content Security Policy.

Page Integrity can be enabled via the Vercel CLI:

bash
vercel page-integrity enable --path "/checkout/:path*" --exact /cart

Notifications

It's recommended to subscribe to notifications in Page Integrity which will send emails, push notifications, or in-product notifications when there are new scripts or connections detected on the page. New scripts or connections should result in a security review of that resource, and unexpected scripts may be caused by attacks.

Allowing Vercel Products

  • Vercel Toolbar and Comments (previews) may need these.
  • script-src https://vercel.live
  • connect-src https://vercel.live wss://ws-us3.pusher.com
  • img-src https://vercel.live https://vercel.com data: blob:
  • frame-src https://vercel.live
  • style-src https://vercel.live 'unsafe-inline'
  • font-src https://vercel.live https://assets.vercel.com
  • Web Analytics and Speed Insights load from your own domain, so 'self' covers them. Don't add third-party Vercel domains for them

See Toolbar with a CSP.

References

  • Page Integrity: https://vercel.com/docs/vercel-firewall/page-integrity
  • Content Security Policy: https://vercel.com/docs/cdn-security/security-headers
  • Next.js CSP guide: https://nextjs.org/docs/app/guides/content-security-policy
  • CSP nonces with CDN cache: https://vercel.com/kb/guide/csp-nonces-with-cdn-cache
  • vercel.json headers: https://vercel.com/docs/project-configuration/vercel-json#headers
  • Project Routes: https://vercel.com/docs/routing/project-routing-rules
  • vercel routes CLI: https://vercel.com/docs/cli/routes
  • Toolbar with a CSP: https://vercel.com/docs/vercel-toolbar/managing-toolbar
같은 저장소의 Skills

더 많은 Skills

모든 Skills
vercel
공식

access-protected-vercel-deployment

Access and test Vercel deployments protected by Vercel Authentication, SSO, or Deployment Protection. Use when curl, agent-browser, Playwright, or another automated request reaches a Vercel login or protection page; when a protected preview or production URL returns 401 or 403; when TRUSTEDSOURCESENVIRONMENTMISMATCH appears; or when choosing between vercel curl and the x-vercel-trusted-oidc-idp-token header.

1시간 설치 수
1
GitHub Stars
341
업데이트
11월 20일
vercel
공식

domains

Search, register, connect, transfer, and renew domain names on Vercel using the CLI or Domains Registrar API. Use for domain availability and pricing, custom domains, DNS records, nameservers, ownership verification, and domain orders.

1시간 설치 수
1
GitHub Stars
341
업데이트
11월 20일
vercel
공식

vercel-schedules

Vercel Schedules guidance — run a private function, route, or Vercel Queues topic on a cron cadence or once at a set time. Covers static schedules in vercel.json, dynamic per-user schedules with @vercel/schedules, handleSchedule, the vercel schedules CLI, environments, jitter, and migrating from Cron Jobs. Use when adding scheduled or recurring work, one-time reminders, or replacing crons.

1시간 설치 수
1
GitHub Stars
341
업데이트
11월 20일
vercel
공식

offload-to-sandbox

Offload heavy builds, full test suites and parallel experiments from the local machine to Vercel Sandboxes with the vercel sandbox CLI. Use when a local machine is overloaded or shared by several agents, when a test suite should be sharded, or when many tasks should run side by side without consuming local CPU, memory or disk.

1시간 설치 수
3
GitHub Stars
337
업데이트
11월 16일