Redact API keys, tokens, and credentials before logs reach CI, GitHub issues, Slack, or third-party support. No AI. No cloud. No config.
npm install -g logshield-cli
One accidental console.log() with an API key exposes your infrastructure. Once it's in your logs, it flows everywhere.
Bug reports, Slack channels, monitoring services, support tickets. Each destination is a potential leak point.
When production is down, devs paste logs without checking for secrets. Speed beats security in the moment.
Secrets in logs sit in third-party systems for months. You don't know they're exposed until it's too late.
LogShield uses explicit pattern matching. The same input always produces the same output. You can write tests against it and trust the results.
No flags, config files, or setup required. STDIN to STDOUT automatically. Works the moment you install it.
Format, whitespace, and context stay intact. Only the sensitive values are replaced. Safe for debugging, diff, and audit.
Explicit patterns mean we only redact what matches. No accidental corruption of legitimate data. No broken JSON.
Use --fail-on-detect to break your pipeline if secrets are found. Exit codes are stable and documented.
Tools should be transparent about what they do and don't do.
Add to any build step
Before Datadog, Splunk
Safe to paste anywhere
Share logs without risk
--dry-run Report onlyReport detected redactions only. Does not output log content.
--strict Security-firstAggressive detection for logs shared externally. Redacts more patterns.
--fail-on-detect CI gateExit with code 1 if secrets found. Blocks pipeline.
--summary Compact reportRule-based summary of what was redacted.
Same input produces same output. No randomness. No environment-dependent behavior. Safe for CI, audits, and reproducible builds.
Aggressive, security-first redaction
Report detected redactions only
Exit code 1 if secrets found (CI-safe)
Print compact redaction summary
Machine-readable output for tooling
Explicitly read from stdin
LogShield reads from stdin, applies explicit rules, and writes sanitized logs to stdout. Structure preserved. Secrets replaced.
-> STDIN is auto-detected when piped.
Install and sanitize your first log file. No signup. No config. No cloud.
npm install -g logshield-cli