-
Notifications
You must be signed in to change notification settings - Fork 1
Remove leaked .env files and add secret management infrastructure (Resolves #82) #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Environment variable examples | ||
| BCRYPT_SALT="" | ||
| COMPOSE_PROJECT_NAME="" | ||
| DB_NAME="" | ||
| DB_PASSWORD="" | ||
| DB_PORT="" | ||
| DB_URL="" | ||
| DB_USER="" | ||
| PORT="" | ||
| VITE_REACT_APP_SERVER_URL="" | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent client server URL variable name Frontend code expects Suggested fix: Rename the variable in |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Sensitive files | ||
| *.env | ||
| *.env.* | ||
|
|
||
| # Allow the public template | ||
| !.env.example |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -203,6 +203,26 @@ npm run test | |
|
|
||
| --- | ||
|
|
||
| ## Security & Secret Management | ||
|
|
||
| **Important:** As of [PR #??](https://github.com/overcut-ai/awesome-overcut/pull/XXX) we removed all plaintext secret files from version control. | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Placeholder PR link left in docs
Suggested fix: Update the sentence to reference this PR: |
||
|
|
||
| 1. Secrets such as database credentials and API keys **must not** be committed to the repository. | ||
| 2. Runtime configuration is supplied exclusively via **environment variables** or your CI/CD secrets store. | ||
| 3. A template file [`.env.example`](./.env.example) lists all required variables with empty placeholder values. Copy it to `.env` (which is git-ignored) and fill in values for **local development only**: | ||
|
|
||
| ```bash | ||
| cp .env.example .env # create local env file | ||
| # then edit .env and set the variables | ||
| ``` | ||
|
|
||
| 4. For production/staging environments use your orchestrator (Docker, Kubernetes, Vercel, etc.) or a dedicated secrets manager (AWS Secrets Manager, HashiCorp Vault, etc.) to inject environment variables securely. | ||
| 5. Our CI pipeline includes secret-scanning to prevent accidental leaks on future commits. | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CI secret-scanning claim inaccurate The documentation states that the CI pipeline already includes secret scanning, but this PR explicitly says the workflow is deferred due to permissions. Documenting a non-existent control can mislead contributors. Suggested fix: Clarify that secret-scanning will be added in a follow-up once permissions are granted, or link to the relevant workflow if it already exists. |
||
|
|
||
| --- | ||
|
|
||
| --- | ||
|
|
||
| ## Contributing | ||
|
|
||
| Pull requests are welcome! For major changes please open an issue first to discuss what you would like to change. | ||
|
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing JWT-related environment variables
JWT_SECRET_KEYandJWT_EXPIRATIONare required by the server (seeapps/hotel-management-service-server/README.md) but are absent from.env.example, risking misconfiguration and runtime failures.Suggested fix: Add the following placeholders (with explanatory comments) to
.env.example: