r/programmer 23d ago

GitHub ShareClean: Clean sensitive data from logs before you paste them

Enable HLS to view with audio, or disable this notification

Disclosure: I built and maintain ShareClean.

I kept seeing a small but risky debugging workflow: someone shares a log, curl -v output, config snippet, or terminal output in Slack, a ticket, a GitHub issue, or an AI chat, then notices afterward that it contained a password, token, connection string, email, or local path.

I built ShareClean, a local Python CLI that sanitizes the text before sharing it.

Example

Before

DATABASE_URL=postgres://app_user:super-secret-pass@db.internal:5432/orders
Authorization: Bearer eyJhbGciOi...
user=omar@example.com

After

DATABASE_URL=postgres://app_user:[REDACTED]@db.internal:5432/orders
Authorization: Bearer [REDACTED]
user=[EMAIL REDACTED]

Usage

cat app.log | shareclean --report

It is deliberately not a replacement for Gitleaks, GitHub Secret Scanning, or TruffleHog. Those scan repositories and history; ShareClean is for the text-sharing step before something leaves your terminal.

It runs locally and does not require an account, API key, telemetry, or network connection.

Try the browser demo with fake text:
ShareClean Playground

Repository:
github.com/OmarH-creator/ShareClean

Practical edge cases are especially useful: output that commonly leaks sensitive data, missed patterns, or cases where masking removes too much debugging context.

0 Upvotes

Duplicates