
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@snytch/nextjs
Advanced tools
Bundle scanning, NEXT_PUBLIC_ exposure detection, and environment drift for Next.js
Bundle scanning, secret detection, and environment exposure analysis for Next.js applications.
npm install -D @snytch/nextjs
snytch scanScan the compiled Next.js bundle for leaked secrets in client-side JavaScript.
snytch scan [--dir ./.next] [--json] [--report] [--fail-on critical|warning|all] [--ai-provider anthropic|openai|none]
| Option | Default | Description |
|---|---|---|
--dir | ./.next | Path to the .next directory |
--json | off | Output results as JSON |
--report | off | Generate an HTML report at ./snytch-report.html |
--fail-on | critical | Exit code threshold: critical, warning, or all |
--ai-provider | anthropic | AI RCA provider (requires ANTHROPIC_API_KEY) |
snytch checkCheck .env files for NEXT_PUBLIC_ variables that look like secrets.
snytch check [--env .env.local] [--json] [--report] [--fail-on critical|warning|all]
--env may be repeated to check multiple files:
snytch check --env .env.local --env .env.production
snytch diffCompare environment variable key presence across two or more .env files.
snytch diff --env .env.staging --env .env.production [--json] [--report] [--strict]
--env may be repeated for more than two files:
snytch diff --env .env.staging --env .env.production --env .env.local
| Option | Default | Description |
|---|---|---|
--strict | off | Exit 1 for any drift, not just serverOnly keys |
snytch mcpStart the snytch MCP server on stdio transport. Exposes snytch_scan, snytch_check, and snytch_diff as tools inside any MCP-compatible editor.
snytch mcp
.next/static/chunks recursively for JavaScript and CSS files--report is set@snytch/nextjs ships an MCP server that exposes three tools to AI editors. Secret values are never transmitted — all findings use truncated values only.
| Tool | Description |
|---|---|
snytch_scan | Scan the Next.js bundle for leaked secrets in client-side JS |
snytch_check | Check .env files for dangerous NEXT_PUBLIC_ prefix usage |
snytch_diff | Compare environment variable key presence across .env files |
snytch_scan
// Input
{ "dir": "./.next" } // optional — defaults to <cwd>/.next
// Output
{
"findings": [...], // truncated values only, rca omitted
"summary": { "scannedFiles": 12, "total": 2, "critical": 1, "warning": 1, "durationMs": 80 }
}
snytch_check
// Input
{ "envFiles": [".env.local", ".env.production"] } // optional — auto-detects from cwd
// Output
{
"findings": [...],
"summary": { "scannedFiles": 2, "total": 1, "critical": 1, "warning": 0, "durationMs": 5 }
}
snytch_diff
// Input
{ "envFiles": [".env.staging", ".env.production"] } // required — minimum 2 files
// Output (key names only — values are never read into output)
{
"inSync": ["DATABASE_URL", "REDIS_URL"],
"drift": [{ "key": "API_KEY", "presentIn": [".env.staging"], "missingFrom": [".env.production"] }],
"onlyInOne": [{ "key": "DEV_FLAG", "file": ".env.staging" }]
}
.cursor/mcp.json{
"mcpServers": {
"snytch": {
"command": "npx",
"args": ["-y", "@snytch/nextjs", "mcp"]
}
}
}
~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"snytch": {
"command": "npx",
"args": ["-y", "@snytch/nextjs", "mcp"]
}
}
}
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"snytch": {
"command": "npx",
"args": ["-y", "@snytch/nextjs", "mcp"]
}
}
}
Tip: The MCP server runs in the directory where the editor is opened, so it automatically uses the correct
.nextdirectory and.envfiles for your project.
Create snytch.config.js in your project root to mark specific environment variables as server-only:
// snytch.config.js
export default {
serverOnly: ['DATABASE_URL', 'STRIPE_SECRET_KEY', 'NEXTAUTH_SECRET'],
failOn: 'critical',
};
When serverOnly is set:
snytch check will flag any listed key that appears under NEXT_PUBLIC_snytch diff will exit 1 in non-strict mode if a serverOnly key has driftedsnytch scan will detect literal values of these variables in the bundle# .github/workflows/security.yml
- name: Scan Next.js bundle for secrets
run: npx @snytch/nextjs scan --json --fail-on critical
MIT
FAQs
Bundle scanning, NEXT_PUBLIC_ exposure detection, and environment drift for Next.js
The npm package @snytch/nextjs receives a total of 316 weekly downloads. As such, @snytch/nextjs popularity was classified as not popular.
We found that @snytch/nextjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.