Netlify deploy error due to secrets scanner detecting PORT environment variable#1
Open
netlify-coding[bot] wants to merge 1 commit into
Open
Netlify deploy error due to secrets scanner detecting PORT environment variable#1netlify-coding[bot] wants to merge 1 commit into
netlify-coding[bot] wants to merge 1 commit into
Conversation
…t variable (6a55cad559c6f0932b104280)
✅ Deploy Preview for helpful-banoffee-03d8ac ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 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
✅ 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
PORTenvironment variable as a leaked secret. The scanner found a value matchingPORTinside third-party dependency files undernode_modules(@babel/generatorandcaniuse-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.tomlconfiguration file was added at the project root to tell Netlify's secrets scanner to skip checking thePORTvariable 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
PORTfrom the site's environment variables.