Skip to content

Add secret-scanning (gitleaks) to CI as a general safety net #600

Description

@Marvell69

Description
Beyond the narrow .env-specific guard in Issue 122, a general secret-scanning tool would catch other credential leak patterns (API keys pasted directly into code, Supabase service role keys, Resend API keys) across the entire diff on every PR — a meaningful gap for a project actively integrating multiple third-party services with real credentials.

Requirements and context

  • Add gitleaks (or equivalent) as a CI workflow scanning every PR's diff
  • Run an initial full-history scan to confirm no secrets are already present in git history; if found, treat as a security incident requiring credential rotation, not just a code fix
  • Configure to fail the PR check on any finding

Suggested execution

git checkout -b ci/add-gitleaks-secret-scanning
  • Add gitleaks CI workflow
  • Run initial full-history scan and report findings to maintainers immediately if anything is found
  • Document the process

Example commit message
ci: add gitleaks secret scanning to CI pipeline

Guidelines

  • If the initial full-history scan finds any real secret, stop and report directly to maintainers before proceeding — do not attempt remediation via a public PR, as that would itself disclose the finding

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions