Repository navigation
fix(security): replace hardcoded credentials with .env variables - #66
Open
jasonjose007 wants to merge 1 commit into
Open
jasonjose007 wants to merge 1 commit into
jasonjose007 wants to merge 1 commit into
Conversation
Automation scripts had email credentials hardcoded in source files, risking accidental exposure when pushed to version control. Adds python-dotenv to load credentials from environment variables. Provides .env.example as a template so contributors know which variables to configure. The .gitignore already excludes .env. Closes Vaibhav2154#59
|
@jasonjose007 is attempting to deploy a commit to the vaibhav2154's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thanks for creating a PR for your Issue!
|
This branch has not been deployed
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.
Summary
scripts/automation/1.pyhad an email address hardcoded in source and expected the password to be pasted directly into the filescripts/automation/auto_email_sender.pyfell back to empty credentials when no JSON config file existed, with no guidance on where to put thempython-dotenvto load credentials from environment variables (EMAIL_ADDRESS,EMAIL_PASSWORD,SMTP_SERVER,SMTP_PORT)Changes
backend/scripts/automation/1.py— replaced hardcoded email/password withos.getenv()+load_dotenv()backend/scripts/automation/auto_email_sender.py— fallback config now reads from env vars instead of empty stringsbackend/.env.example— new template documenting all required variablesbackend/requirements.txt— addedpython-dotenv==1.1.0.envwas already in.gitignore(no change needed)Test plan
.envfile when presentauto_email_sender.py(takes precedence).env.exampledocuments all variables contributors need to setCloses #59