Skip to content

security: add gitleaks secret scanning CI workflow#300

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-bot-token-to-env
Draft

security: add gitleaks secret scanning CI workflow#300
Copilot wants to merge 2 commits intomainfrom
copilot/add-bot-token-to-env

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

A Telegram bot token was leaked in a GitHub issue. The token was not hardcoded in the codebase (all Telegram credentials already use os.environ), but no CI gate existed to catch future accidental commits of secrets.

Changes

  • .github/workflows/secret-scan.yml — New workflow running gitleaks/gitleaks-action@v2 on every push/PR to main. Fails the build if any hardcoded credential is detected.
  • .gitleaks.toml — Allowlist config to suppress false positives:
    • tests/ — uses obviously fake keys (sk_test_fake123, sk_live_test, etc.)
    • *.env.example files — document variable names only, no real values

Action required (out of band)

The exposed token 8788913760:AAE2g87I0eGtlydPlkXYeABBPrbu3eDeb7k was published publicly in the issue and must be revoked via @BotFather/revoke regardless of this PR.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tryonyou-app Ready Ready Preview, Comment May 4, 2026 8:51am
tryonyou-app-1776375445 Ready Ready Preview, Comment May 4, 2026 8:51am
tryonyou-app-work Ready Ready Preview, Comment May 4, 2026 8:51am
tryonyou-pilot Ready Ready Preview, Comment May 4, 2026 8:51am
workspace Ready Ready Preview, Comment May 4, 2026 8:51am

Adds .github/workflows/secret-scan.yml to detect hardcoded secrets on
every push/PR to main using gitleaks/gitleaks-action@v2.
Adds .gitleaks.toml allowlist to suppress false positives from test
fixtures and .env.example files.

The leaked Telegram token in the issue was NOT present in the codebase;
it only appeared in the GitHub issue text and must be revoked via BotFather.

Agent-Logs-Url: https://github.com/Tryonme-com/tryonyou-app/sessions/0a89b63e-d6b9-41d0-9cd1-56ad094f1e57

Co-authored-by: LVT-ENG <[email protected]>
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.

.env secrets

2 participants