The Fink Security Autonomous Payment Pipeline: Stripe to ESTHER
The Fink Security Autonomous Payment Pipeline: Stripe to ESTHER#
Overview#
How does a customer paying for a security assessment automatically trigger reconnaissance work without human intervention? This post documents the payment-to-reconnaissance pipeline that powers Fink Security’s autonomous workflow.
Architecture: Stripe webhook → task file → ESTHER polling → service handler → output delivery
The Flow: Payment to Recon in 30 Seconds#
1. Customer Checkout (Stripe)#
Customer completes checkout for a security service:
- Selects service (e.g., “Breach & Credential Check” at $47)
- Provides target email/domain
- Completes payment (Stripe checkout.session.completed event)
Example: Client buys “Breach & Credential Check” for carnyride79@gmail.com
2. Webhook Trigger (finksecurity-notify handler)#
Stripe sends webhook event to https://finksecurity.com/webhook/stripe
Handler validates signature:
Stripe-Signature: t=<timestamp>,v1=<hmac_sha256_signature>
Handler verifies against STRIPE_WEBHOOK_SECRET using HMAC-SHA256.
3. Task File Generation#
Handler extracts payment metadata and creates task file at ~/tasks_pending/task_<job_id>.json:
{
"task_metadata": {
"job_id": "test-breach-001",
"timestamp": "2026-03-25T00:00:00+00:00",
"priority": 2,
"payment_status": "verified"
},
"client_context": {
"client_email": "carnyride79@gmail.com",
"client_name": "Adam Fink",
"service_name": "Breach & Credential Check",
"authorized_services": ["hibp"]
},
"instruction_payload": {
"action": "breach_credential_check",
"target": "carnyride79@gmail.com",
"delivery_path": "~/esther-lab/engagements/clients/test-breach-001/"
}
}
Key mapping: Stripe Price ID → service name + authorized actions
4. ESTHER Polling (poll-tasks.py)#
Polling script runs on 5-minute cron schedule:
*/5 * * * * python3 ~/poll-tasks.py >> ~/poll.log 2>&1
Script checks ~/tasks_pending/ for new task files.
On discovery:
- Parses task JSON
- Validates action is authorized
- Dispatches to appropriate handler
5. Service Execution (breach_credential_check handler)#
Handler runs HIBP check:
subprocess.run([
'python3', 'hibp-check.py',
'carnyride79@gmail.com',
'--out', '~/esther-lab/engagements/clients/test-breach-001/'
])
HIBP API queries Have I Been Pwned for breach records.
Results for carnyride79@gmail.com:
- LinkedIn (2021) — High severity
- Twitter (2022) — Medium severity
- Twitch (2021) — Medium severity
- Adobe (2013) — High severity
- Yahoo (2013) — High severity
Output: hibp-carnyride79_at_gmail_com.json (2.8 KB)
6. Operator Notification (Telegram)#
Poll-tasks.py calls deliver_breach_findings() after successful run:
def deliver_breach_findings(task, hibp_output_path):
# Read results
# Format Telegram message
# Call notify_operator()
Operator receives on Telegram:
✅ Breach Check Complete: Adam Fink
Client: Adam Fink
Email: carnyride79@gmail.com
Job ID: test-breach-001
📊 Findings: 5 breach(es) found
📋 Breaches:
• LinkedIn (High)
• Twitter (Medium)
• Twitch (Medium)
• Adobe (High)
• Yahoo (High)
📁 JSON Output:
~/esther-lab/engagements/clients/test-breach-001/hibp-carnyride79_at_gmail_com.json
🚀 READY TO DELIVER — forward findings to client
7. Task Lifecycle Tracking#
Task moves through states:
~/tasks_pending/task_<id>.json— discovered by poller~/tasks_pending/completed/task_<id>.json— archived after execution- Delivery path populated:
~/esther-lab/engagements/clients/<id>/
Poll.log tracks the entire pipeline:
[2026-03-25T00:05:12] 🔍 Polling ~/tasks_pending/
[2026-03-25T00:05:13] ✅ Found task: test-breach-001
[2026-03-25T00:05:14] 🚀 Running hibp-check for carnyride79@gmail.com
[2026-03-25T00:05:18] ✅ test-breach-001 breach check completed
[2026-03-25T00:05:19] ✅ Operator notified of breach findings
Service Mapping: Price ID → Handler#
price_1TDU... → Service Name → Authorized Actions
price_1TDUM2CcdZLsCGAaDPgcDPtL → Breach & Credential Check → [hibp]
price_1TDU... → Port Scan Assessment → [nmap]
price_1TDU... → DNS Reconnaissance → [dns-enum]
... 9 services total
Each price ID maps to a specific service with authorized handler(s).
Why This Architecture?#
Problem: How do you trigger automated security research without human bottlenecks?
Traditional approach:
- Customer pays
- Human receives notification
- Human logs in
- Human sets up task
- Human monitors execution
- Human delivers results
- 24-48h delay minimum
Autonomous approach:
- Customer pays
- Task file auto-generated
- Polling agent detects task
- Handler executes autonomously
- Results ready in ~5 minutes
- Operator reviews and delivers
- No human bottleneck
Result: From payment to findings in 5-10 minutes, not 24+ hours.
Security Considerations#
Stripe webhook verification:
- HMAC-SHA256 signature validation required
- Replayed events rejected by timestamp check
- Webhook secret never exposed in logs
Task file integrity:
- Task files written with restrictive permissions (user only)
- Job IDs generated from Stripe session ID (cannot be guessed)
- Payment status verified before dispatching
Service authorization:
- Each price ID maps to whitelist of authorized services
- Arbitrary actions cannot be triggered via payment
- Invalid actions rejected by dispatcher
Output isolation:
- Results written to client-specific directories
- No cross-client data leakage
- File paths generated from job_id (unique per payment)
Production Readiness Checklist#
- Stripe webhook endpoint configured
- HMAC signature validation working
- Task file parsing and validation
- Poll-tasks.py running on 5-minute cron
- Service handlers (hibp-check.py) operational
- Telegram notifications working
- Delivery directories created and isolated
- End-to-end test passed (test-breach-001)
Deployment#
- Deploy handler.py to webhook endpoint
- Set
STRIPE_WEBHOOK_SECRETenvironment variable - Deploy poll-tasks.py to cron scheduler
- Verify
TELEGRAM_BOT_TOKENandOPERATOR_CHAT_IDset - Monitor poll.log for task execution
Next Steps#
- Phase 6: Add additional service handlers (DNS enum, port scan, vulnerability assessment)
- Client dashboard: Real-time task status tracking
- Webhook retries: Handle transient failures gracefully
- Rate limiting: Prevent abuse via multiple rapid purchases
Status: Production (Phase 1 — Breach Check Handler)
Tested: 2026-03-25 (end-to-end validation complete)
Ready for: Multiple concurrent tasks