Trusted Ip Webhook banner
vercel-labs vercel-labs

Trusted Ip Webhook

Development community

Description

Creates a webhook that sets all new projects in a Vercel account to use Trusted IPs for deployment protection. This is a workaround until this feature is built into Vercel Team deployment protections.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

trusted-ip-webhook

Automatically enables [Trusted IPs](https://vercel.com/docs/deployment-protection/methods-to-protect-deployments/trusted-ips) on every new Vercel project the moment it is created. It works by receiving a `project.created` webhook from Vercel and immediately calling the Vercel API to apply your IP allowlist.

**Requirement:** Trusted IPs is a Vercel **Enterprise** plan feature.

[!CAUTION] Once this webhook is active, **every** new project created in your team will have Trusted IPs applied automatically. Projects that should not have IP restrictions — such as public-facing sites or developer sandboxes — will need to be updated manually after creation via **Settings → Deployment Protection** in the Vercel dashboard.


How it works

  1. Vercel sends a POST /api/webhook request when a new project is created.
  2. The webhook signature is verified using VERCEL_WEBHOOK_SECRET.
  3. The Vercel API is called to apply TRUSTED_IPS to the new project for all deployment types.

Setup

1. Deploy this project to Vercel

vercel deploy

Or connect this repository in the [Vercel dashboard](https://vercel.com/new).

2. Create a webhook

Go to your account or team webhook settings and create a new webhook:

  • Team: https://vercel.com/teams/{your-team-slug}/settings/webhooks

Set the **URL** to `https://{your-deployed-domain}/api/webhook` and enable the **`project.created`** event. Vercel will display a **signing secret** after creation — copy it immediately, as it is only shown once.

3. Set environment variables

Add the following environment variables to this project in the Vercel dashboard under **Settings → Environment Variables**.


Environment variables

`VERCEL_API_TOKEN` — required

A Vercel API token used to authenticate calls to the Vercel REST API.

**How to generate:**

  1. Go to https://vercel.com/account/tokens
  2. Click Create Token
  3. Give it a name (e.g. trust-bot), set the scope