Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/secret-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Secret Scanning — Protocolo Soberanía V10
# Detecta credenciales y tokens filtrados antes de que lleguen a main.
# Si se filtra un token: REVÓCALO en el servicio (BotFather, Stripe, Firebase…) de inmediato.
name: Secret Scan

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
gitleaks:
name: Detect secrets (gitleaks)
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Gitleaks configuration — TryOnYou Protocolo Soberanía V10
# Docs: https://github.com/gitleaks/gitleaks#configuration
# Si un token real se filtra: REVÓCALO en el servicio origen de inmediato
# (BotFather para Telegram, Dashboard para Stripe/Firebase/Vercel).

title = "TryOnYou gitleaks config"

[extend]
# Use the default ruleset shipped with gitleaks
useDefault = true

[allowlist]
description = "Allowlist for test fixtures and example files"

# Test files use obviously fake keys (sk_test_fake123, sk_live_test, etc.)
paths = [
'''tests/''',
'''\.env\.example$''',
'''ABVETOS_INTELLIGENCE_SYSTEM\.env\.example$''',
]

# Suppress placeholder/example patterns that are not real secrets
regexes = [
# Generic placeholder values
'''(?i)(your[_-]?token|example|placeholder|<token>|xxxx|fake|dummy|test123|abc123)''',
]