Skip to content

neocrev/jsonmask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonmask

Pipe JSON through it. Secrets get masked. Nothing leaks.

npm License

jsonmask in action


Use cases

  • Debug logging without leaking tokens
  • Sharing API responses with colleagues
  • CI pipelines that dump JSON
  • Any curl | jsonmask situation

Quick start

# Basic usage
echo '{"user":"admin","password":"supersecret"}' | npx @neocrev/jsonmask

# Mask everything
kubectl get secrets -o json | npx @neocrev/jsonmask -f all

# Custom fields
cat response.json | npx @neocrev/jsonmask -f ssn,credit_card,api_key

# Custom mask character
echo '{"token":"abc123"}' | npx @neocrev/jsonmask -c █

Install

# No install needed
npx @neocrev/jsonmask --help

# Or globally
npm install -g @neocrev/jsonmask

Options

Flag Description Default
-f, --fields Fields to mask (comma-separated or all) built-in list
-i, --file Read from file stdin
-c, --char Mask character *
-l, --list Show default sensitive fields
-h, --help Show help

Runs with 20+ built-in field names: password, secret, token, api_key, jwt, session, cookie, ssn, credit_card and more.


License

MIT

About

Pipe JSON through it. Sensitive fields gone. One less thing to leak.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors