🔓

Pipeline de Liberación Open Source

Proyecto: lead-scoring-engine · CULTIVA IA → GitHub público · cultiva-ia/lead-scoring-engine

✓ LISTO PARA PUBLICAR
$ /opensource fork lead-scoring-engine --license MIT --org cultiva-ia --desc "Lightweight lead scoring engine for B2B SaaS agencies"
Fase 1
Forker Agent
Copia + elimina secretos
!
Fase 2
Sanitizer Agent
Verificación (2 reintentos)
Fase 3
Packager Agent
README + setup.sh + CLAUDE.md
6
Secretos eliminados
3
Referencias PII purgadas
247
Commits del historial limpiados
7
Archivos generados
🍴

FORK_REPORT.md — Agente Forker

COMPLETADO

Secretos detectados y reemplazados por variables de entorno en el staging ~/opensource-staging/lead-scoring-engine/

Archivo Tipo Hallazgo Acción
config/settings.py:12 CRÍTICO SUPABASE_URL hardcoded → os.getenv("SUPABASE_URL")
config/settings.py:13 CRÍTICO SUPABASE_KEY JWT hardcoded → os.getenv("SUPABASE_KEY")
config/settings.py:19 CRÍTICO RESEND_API_KEY hardcoded → os.getenv("RESEND_API_KEY")
.env CRÍTICO Archivo .env con credenciales prod Eliminado → .env.example generado
credentials.json CRÍTICO Google OAuth client secret Eliminado → .gitignore actualizado
scripts/seed.py:8 WARNING Email de cliente real hardcoded → "example@yourcompany.com"
notebooks/analysis.ipynb WARNING Comentario "Data from Acme Corp" → "Data from SampleCo"
git history CRÍTICO 3 commits con secrets en mensajes Historial limpiado con git-filter-repo

DIFF — config/settings.py (fragmento)

- SUPABASE_URL = "https://xyzxyzxyz.supabase.co"
- SUPABASE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inh5enp5enp5eiIsInJvbGUiOiJhbm9uIi..."
- RESEND_API_KEY = "re_AbCdEfGhIjKlMnOpQrStUv"
+ import os
+ SUPABASE_URL = os.getenv("SUPABASE_URL")
+ SUPABASE_KEY = os.getenv("SUPABASE_KEY")
+ RESEND_API_KEY = os.getenv("RESEND_API_KEY")
# Lead scoring thresholds
HOT_THRESHOLD = 0.75
WARM_THRESHOLD = 0.45

.env.example generado

# Supabase
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-supabase-anon-key
# Resend (email delivery)
RESEND_API_KEY=re_your_resend_key
# Optional: scoring model
MODEL_PATH=models/scoring_v1.pkl
SCORE_THRESHOLD_HOT=0.75
SCORE_THRESHOLD_WARM=0.45
🔍

SANITIZATION_REPORT.md — Agente Sanitizer

PASS (2 intentos)
⚠ Intento 1 — FAIL: Se detectó referencia residual a "Acme Corp" en docs/case-study-draft.md (no procesada por el forker). Se aplicó fix automático y se relanzó el sanitizer.
  • Secrets scan — PASS
    gitleaks + regex custom: 0 secretos detectados. Patrones: API keys, JWTs, private keys, tokens OAuth, passwords hardcoded.
    CRÍTICO
  • PII scan — PASS
    0 emails reales, 0 teléfonos, 0 nombres de clientes en código. docs/case-study-draft.md anonymizado.
    CRÍTICO
  • Internal references — PASS
    No hay URLs internas (*.internal, 192.168.x.x, localhost:* con puertos no estándar) en el código de producción.
    CRÍTICO
  • Dangerous files — PASS
    Ausentes: .env, *.pem, credentials.json, *.p12, id_rsa, serviceAccount*.json
    CRÍTICO
  • Configuration completeness — PASS
    .env.example cubre todas las variables usadas (6/6). pyproject.toml con dependencias declaradas.
    WARNING
  • Git history audit — PASS
    247 commits reescritos con git-filter-repo. No quedan refs a secretos en mensajes ni blobs eliminados.
    CRÍTICO
✓ VEREDICTO FINAL: PASS Proyecto seguro para publicación pública. 0 hallazgos críticos pendientes.
📦

Agente Packager — Archivos generados

7 archivos

ESTRUCTURA STAGING

~/opensource-staging/lead-scoring-engine/
├── .github/
│ └── ISSUE_TEMPLATE/
│ ├── bug_report.md ✦
│ └── feature_request.md ✦
├── config/
│ └── settings.py ✎
├── lead_scoring/
│ ├── engine.py
│ ├── features.py
│ └── models.py
├── tests/
│ └── test_engine.py
├── CLAUDE.md ✦
├── CONTRIBUTING.md ✦
├── FORK_REPORT.md ✦
├── LICENSE ✦
├── README.md ✦
├── SANITIZATION_REPORT.md ✦
├── setup.sh ✦
├── .env.example ✎
├── .gitignore ✎
└── pyproject.toml

✦ Generado · ✎ Modificado

CLAUDE.md (preview)

# lead-scoring-engine
Lightweight B2B lead scoring: rule-based
+ ML pipeline for SaaS agencies.
## Commands
- `make install` — setup venv + deps
- `make test` — pytest suite
- `make score LEAD=...` — score a lead
## Architecture
engine.py → features.py → models.py
Supabase (storage) + Resend (alerts)
## Key files
config/settings.py — all env vars
lead_scoring/engine.py — entry point

setup.sh (preview)

#!/usr/bin/env bash
# One-command bootstrap
set -euo pipefail
 
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
 
if [ ! -f .env ]; then
cp .env.example .env
echo "✔ .env creado — edita las variables"
fi
echo "✔ Setup completo. Ejecuta: make test"

✓ Fork Listo — lead-scoring-engine

Staging
~/opensource-staging/lead-scoring-engine
Licencia
MIT
Sanitización
PASS
Variables en .env.example
6 / 6
1
Revisar staging antes de publicar
cd ~/opensource-staging/lead-scoring-engine && ls -la
2
Crear repo público en GitHub
gh repo create cultiva-ia/lead-scoring-engine --public --source=. --push --description "Lightweight lead scoring engine for B2B SaaS agencies"
3
Verificar que el repo está limpio post-push
gh secret scan cultiva-ia/lead-scoring-engine # via GitHub Advanced Security
4
Limpiar staging local (opcional)
rm -rf ~/opensource-staging/lead-scoring-engine
MIT License Python Supabase Resend scikit-learn Lead Scoring B2B SaaS Open Source