Vercel Sandbox installs private npm packages without exposing tokens
A coding agent running in Vercel Sandbox can now pull from private npm, GitHub Packages or JFrog registries using your team's stored credentials, and the token itself never reaches the sandbox.
Vercel Sandbox can now install private npm packages without putting the registry credentials inside the sandbox. Pass credentials: { npm: true } when creating a sandbox and it authenticates against your team’s registries using tokens stored in Shared Environment Variables, including custom registries like GitHub Packages and JFrog Artifactory.
A firewall layer in front of the sandbox adds the authentication to outgoing install requests itself, so the token never enters the environment a coding agent runs code in. The feature needs the latest @vercel/sandbox package, the vercel-sandbox Python package, or the global sandbox CLI.
import { Sandbox } from '@vercel/sandbox';
const sandbox = await Sandbox.create({ credentials: { npm: true } });
await sandbox.runCommand('pnpm', ['install']);
Why it matters: agent sandboxes that install dependencies have been a recurring way credentials leak this year, whether through a compromised package or a careless agent. Keeping the token outside the sandbox entirely, rather than trusting the agent to handle it safely, closes off one specific version of that problem.
The caveat: this covers npm-style package registries only. Anything else your agent needs to authenticate against still needs its own credential handling.