Remove committed secrets; use env vars and GitHub secrets; add gitleaks guardrails - #923
Open
devin-ai-integration[bot] wants to merge 3 commits into
Open
devin-ai-integration[bot] wants to merge 3 commits into
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
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
Weekly gitleaks sweep found committed secrets on
main(values redacted, never valid going forward — rotate all of them, since git history still contains them; this PR removes them from the working tree only, history purging is a separate task):.github/workflows/deploy.yml:15-16— AWS access key/secretAKIA****/****.github/workflows/deploy.yml:23— Slack bot tokenxoxb-****.github/workflows/deploy.yml:29— GitHub PATghp_****.github/workflows/deploy.yml:35— Stripe live keysk_live_****backend/src/config/production.js:7,11,14— JWT signing secret, Postgres URL with password, SendGrid key (all****)Changes:
deploy.yml: all literals →${{ secrets.* }}references.backend/src/config/production.js: values read viarequireEnv(name)which throws when the env var is missing (fail-fast, no fallback literals)..gitignore: ignore.envfiles (keeps!*.env.example); removed trackedfrontend/.env(non-secretVITE_API_URL, moved to.env.example)..pre-commit-config.yaml: gitleaks pre-commit hook (pinned rev)..github/workflows/gitleaks.yml: CI gate running the gitleaks CLI on push/PR against the working tree (--no-git, since history still contains leaks); checkout pinned to SHA, HTTPS-enforced download.Post-fix working-tree scan: clean. Backend tests (161) and frontend lint pass.
Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/c22da787ca4940e0a042dcb2b2e8231e