Cotool + Vercel
Connect Vercel to Cotool to read team activity, ingest Audit Log Drain and runtime log events with Firewall actions, and run built-in detections on them.
The short answer
Vercel's Activity Log, Audit Log Drains, and log drains record who changed a team's settings and which requests reached each deployment, including what the Firewall did with them. Cotool added Vercel in release 0.76.0 with managed log ingestion and built-in detections, so those events feed detections whose alerts agents investigate.[1][2][5][8][10]
How it connects: Cotool calls the Vercel REST API with an access token scoped to one team, and receives logs through drains, which Vercel pushes over HTTPS to a custom endpoint and signs with an x-vercel-signature header.[1][4][5][9]
What Cotool uses from Vercel
- Audit Log Drain events
- Enterprise teams can drain audit events in the
vercel.audit_log.v1schema. Each event has an action, the actor's type, ID, name, and email, any delegation chain, the request's IP address and user agent, the token ID used, and an event-specific payload.[6][7] - Runtime, build, and Firewall logs
- Log drains on Pro and Enterprise send entries whose source is build, edge, lambda, static, external, firewall, or redirect. Request entries carry the method, host, path, status code, and client IP, plus the Firewall action (log, challenge, deny, bypass, or rate_limit) and the matched rule ID.[6][8]
Detections, hunts, and triage
- Detect risky team changesDetection
- Built-in detections run on ingested Vercel audit events, where actions such as a new drain or a change made with an access token arrive with the actor, IP address, and token ID. An agent investigates each alert they raise.[1][2][7]
- Triage Firewall denialsTriage
- For a burst of log entries with a Firewall action of deny or challenge, an agent groups them by client IP, path, and rule ID, and checks the same IP against the rest of the stack before deciding whether it was an attack.[3][8]
- Follow one access tokenHunt
- Audit events record the token that authenticated each request, so filtering on one token ID and its source IPs shows everything a suspect token did across the team.[7]
Example query
GET https://api.vercel.com/v3/events?teamId=team_123&principalId=user_123&limit=20
Authorization: Bearer YOUR_ACCESS_TOKENReturns team events generated by one principal. Replace the team and principal IDs, and add types, projectIds, since, or until to narrow the results.[11]
Setup and permissions
On your personal account's Account Tokens page, name the token, open Scope and select the team, choose All Projects, set an expiration, and create it. Vercel shows the value only once.[4]
| Permission | Access | Why |
|---|---|---|
| Team-scoped access token (All Projects)Reaches the team's resources across all of its projects. A project-scoped token is denied team-level resources.[4] | Read | Reaches the team's resources across all of its projects. A project-scoped token is denied team-level resources.[4] |
| Owner roleOwners can modify all team and project settings. Use an Owner's token if the integration should create drains.[12] | Write | Owners can modify all team and project settings. Use an Owner's token if the integration should create drains.[12] |
| Audit Log Drain (Enterprise)Forwards team activity events. It applies to the whole team, with no filtering, sampling, or project selection.[7] | Read | Forwards team activity events. It applies to the whole team, with no filtering, sampling, or project selection.[7] |
| Log drain (Pro or Enterprise)Forwards runtime, build, and static logs from deployments to a custom HTTP endpoint.[5][6] | Read | Forwards runtime, build, and static logs from deployments to a custom HTTP endpoint.[5][6] |
- Add drains under Team Settings > Drains. Verify the
x-vercel-signatureheader with the drain's signature secret, which you can find by editing the drain.[6][9] - Some teams require two-factor authentication or SAML before you can create a token scoped to them; the dashboard says so when you select the team.[4]
How Cotool works with Vercel
- Cotool added Vercel in release 0.76.0, alongside TruffleHog, Jamf Pro, Material Security, and Zoom, each with managed log ingestion and built-in detections.[1]
- A Cotool detection can run on logs stored in Cotool or directly against a connected tool, so not every source has to be ingested to be covered.[2]
FAQ
- Which Vercel plan is needed to send logs to Cotool?
- Vercel log drains for runtime, build, and static logs need a Pro or Enterprise plan, and Audit Log Drains need Enterprise. The Activity Log is available on every Vercel plan.[1][6][10]
- Can a project-scoped Vercel token be used?
- A project-scoped Vercel token is denied requests for team-level resources, such as team activity. Scope the token to the team and choose All Projects instead.[4]
Sources
- Changelog (Cotool docs) · accessed November 22, 2026
- Detections are code (Cotool Detect) · accessed November 22, 2026
- Respond to every signal (Cotool Respond) · accessed November 22, 2026
- Access tokens (Vercel docs) · accessed November 22, 2026
- Working with Drains (Vercel docs) · accessed November 22, 2026
- Using Drains (Vercel docs) · accessed November 22, 2026
- Audit Log Drains reference (Vercel docs) · accessed November 22, 2026
- Log Drains reference (Vercel docs) · accessed November 22, 2026
- Drains security (Vercel docs) · accessed November 22, 2026
- Using the Activity Log (Vercel docs) · accessed November 22, 2026
- List user events (Vercel REST API) · accessed November 22, 2026
- Access roles (Vercel docs) · accessed November 22, 2026

