Skip to content

Remove committed secrets; use env vars and GitHub secrets; add gitleaks guardrails - #923

Open
devin-ai-integration[bot] wants to merge 3 commits into
mainfrom
devin/1787576490-secrets-sweep
Open

devin-ai-integration[bot] wants to merge 3 commits into
mainfrom
devin/1787576490-secrets-sweep

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

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/secret AKIA**** / ****
  • .github/workflows/deploy.yml:23 — Slack bot token xoxb-****
  • .github/workflows/deploy.yml:29 — GitHub PAT ghp_****
  • .github/workflows/deploy.yml:35 — Stripe live key sk_live_****
  • backend/src/config/production.js:7,11,14 — JWT signing secret, Postgres URL with password, SendGrid key (all ****)
  • History-only findings (11 total) remain in git history: rotation required.

Changes:

  • deploy.yml: all literals → ${{ secrets.* }} references.
  • backend/src/config/production.js: values read via requireEnv(name) which throws when the env var is missing (fail-fast, no fallback literals).
  • Root .gitignore: ignore .env files (keeps !*.env.example); removed tracked frontend/.env (non-secret VITE_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

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants