Skip to content

Netlify deploy error due to secrets scanner detecting PORT environment variable#1

Open
netlify-coding[bot] wants to merge 1 commit into
mainfrom
agent-variable-4280
Open

Netlify deploy error due to secrets scanner detecting PORT environment variable#1
netlify-coding[bot] wants to merge 1 commit into
mainfrom
agent-variable-4280

Conversation

@netlify-coding

Copy link
Copy Markdown

🔗 View agent run: https://app.netlify.com/projects/helpful-banoffee-03d8ac/agent-runs/6a55cad559c6f0932b104280

🤖 Agent: Claude

💬 Prompt: The Netlify deploy errored, with the following guidance provided:

Diagnosis

  • The build was blocked by Netlify's secrets scanner, not by the bundler. See the scanner summary at line 74 and the explicit detection of the env var "PORT" at [lin...

Result: ## Fixed failing deploy caused by secrets scanner false positive

The deploy was failing not because the app failed to build, but because Netlify's secrets scanner flagged the PORT environment variable as a leaked secret. The scanner found a value matching PORT inside third-party dependency files under node_modules (@babel/generator and caniuse-lite), which was just a coincidental numeric match, not an actual secret exposure.

Since a port number isn't sensitive information and this kind of incidental match commonly occurs with third-party packages, a netlify.toml configuration file was added at the project root to tell Netlify's secrets scanner to skip checking the PORT variable specifically. All other configured environment variables (GOOGLE_API_KEY, JWT_SECRET, MONGO_DB_URL) remain fully scanned as before, so real secrets are still protected.

This should allow the site to deploy successfully going forward without needing to remove PORT from the site's environment variables.

@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for helpful-banoffee-03d8ac ready!

Name Link
🔨 Latest commit 24a7d63
🔍 Latest deploy log https://app.netlify.com/projects/helpful-banoffee-03d8ac/deploys/6a55cb27d87cd600099a1393
😎 Deploy Preview https://deploy-preview-1--helpful-banoffee-03d8ac.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant