-
Notifications
You must be signed in to change notification settings - Fork 0
Env template and ignore files cleanup #64
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
Open
JoshD94
wants to merge
2
commits into
master
Choose a base branch
from
josh-cleanup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Git | ||
| .git/ | ||
| .gitignore | ||
| .github/ | ||
|
|
||
| # Python | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *.pyo | ||
| *.pyd | ||
|
|
||
| # Virtual environments | ||
| venv/ | ||
| .venv/ | ||
| env/ | ||
|
|
||
| # Secrets & credentials (inject at runtime via env vars or secrets) | ||
| .env | ||
| .envrc | ||
| firebase-service-account-key.json | ||
| ca-certificate.crt | ||
|
|
||
| # Docker | ||
| docker-compose.yml | ||
| .dockerignore | ||
|
|
||
| # Logs | ||
| *.log | ||
|
|
||
| # macOS | ||
| .DS_Store | ||
|
|
||
| # IDEs | ||
| .idea/ | ||
| .vscode/ | ||
|
|
||
| # Docs | ||
| README.md |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,5 @@ YOUTUBE_API_KEY= | |
| MONGO_URI= | ||
| MONGO_DB= | ||
| STAGE= | ||
| DAILY_SUN_URL= | ||
| DAILY_SUN_URL= | ||
| JWT_SECRET_KEY= | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,39 @@ | ||
| venv/ | ||
| .venv | ||
| # Python | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *.pyd | ||
| *.pyo | ||
| .Python | ||
|
|
||
| # Virtual environments | ||
| venv/ | ||
| .venv/ | ||
| env/ | ||
| ENV/ | ||
|
|
||
| # Distribution / packaging | ||
| build/ | ||
| dist/ | ||
| *.egg-info/ | ||
| *.egg | ||
|
|
||
| # Testing & coverage | ||
| .pytest_cache/ | ||
| .coverage | ||
| htmlcov/ | ||
| .tox/ | ||
|
|
||
| # Logs | ||
| *.log | ||
| pip-log.txt | ||
|
|
||
| # Secrets & credentials | ||
| .env | ||
| .envrc | ||
| firebase-service-account-key.json | ||
| ca-certificate.crt | ||
|
|
||
| # macOS | ||
| .DS_Store | ||
| ca-certificate.crt | ||
| firebase-service-account-key.json | ||
| firebase-service-account-key.json |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
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.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: cuappdev/score-backend
Length of output: 2597
🏁 Script executed:
Repository: cuappdev/score-backend
Length of output: 7234
🌐 Web query:
Flask-JWT-Extended 4.7.1 empty JWT_SECRET_KEY behavior config validation💡 Result:
In Flask-JWT-Extended (including version 4.7.1), the library validates the secret key configuration at runtime during the token encoding or decoding process, rather than during the initial Flask application startup [1][2]. If you are using a symmetric signing algorithm (the default), the library checks for the secret key using the following logic [1]: 1. It first checks if JWT_SECRET_KEY is defined in the Flask application configuration (app.config). 2. If JWT_SECRET_KEY is not set (is None or empty), it automatically falls back to using the application's Flask SECRET_KEY [1][3][4]. 3. If neither JWT_SECRET_KEY nor the Flask SECRET_KEY is set, the library will raise a RuntimeError when an attempt is made to encode or decode a token [1][2]. The library does not perform an eager validation of these keys when the JWTManager is initialized; therefore, an empty configuration will not prevent the application from starting [1][2]. Instead, the runtime error occurs only when the application attempts to perform a cryptographic operation requiring the key [1][2]. For asymmetric algorithms (e.g., RS256), the library mandates the explicit configuration of JWT_PRIVATE_KEY and/or JWT_PUBLIC_KEY, and it will raise a RuntimeError if these specific keys are missing [1][2].
Citations:
🏁 Script executed:
Repository: cuappdev/score-backend
Length of output: 3305
🏁 Script executed:
Repository: cuappdev/score-backend
Length of output: 3946
Fail fast when
JWT_SECRET_KEYis blank.docker-compose.ymlloads.env; the deployment workflows do not load.env_template. If.envcontains a blank value, the application accepts it, and Flask-JWT-Extended raises aRuntimeErrorduring token operations because no fallback secret is configured. Reject blank values at startup and document that deployments must provide a high-entropy secret.🤖 Prompt for AI Agents