| Crates.io | maskit |
| lib.rs | maskit |
| version | 0.1.1 |
| created_at | 2025-06-26 16:26:23.960126+00 |
| updated_at | 2025-06-27 05:18:21.382809+00 |
| description | A CLI tool to mask sensitive fields in configuration files (JSON/YAML/TOML) |
| homepage | |
| repository | https://github.com/chikaku/maskit |
| max_upload_size | |
| id | 1727546 |
| size | 40,569 |
A command-line tool for masking sensitive fields in configuration files.
cargo install maskit
Mask sensitive fields in a configuration file using default keywords:
maskit config.json
This creates config.maskit.json with sensitive fields replaced by *****.
Default keywords: key, secret, password, token, credential, auth, private, cert
Specify custom keywords to identify sensitive fields:
maskit config.yaml -k api,key,secret,token,password,credential
Save the masked file to a specific location:
maskit config.toml -o /path/to/masked-config.toml
USAGE:
maskit [OPTIONS] <INPUT>
ARGS:
<INPUT> Input configuration file path
OPTIONS:
-h, --help Print help information
-k, --keywords <KEYWORDS> Keywords to search for in field names
[default: key,secret,password,token,credential,auth,private,cert]
-o, --output <OUTPUT> Output file path (default: adds .maskit before extension in current directory)
-s, --silent Silent mode - suppress all output
-V, --version Print version information
Input (config.json):
{
"api_key": "sk-1234567890abcdef",
"password": "super_secret_123",
"auth_token": "Bearer xyz789",
"private_key": "-----BEGIN RSA PRIVATE KEY-----",
"base_url": "https://api.example.com",
"database": {
"host": "localhost",
"db_password": "db_pass_123",
"connection_string": "postgresql://user:pass@localhost/db"
}
}
Output (config.maskit.json):
{
"api_key": "*****",
"password": "*****",
"auth_token": "*****",
"private_key": "*****",
"base_url": "https://api.example.com",
"database": {
"host": "localhost",
"db_password": "*****",
"connection_string": "postgresql://user:pass@localhost/db"
}
}
maskit app.yaml -k key,secret,token
maskit settings.toml -o safe-settings.toml
Execute without any output (useful for scripts):
maskit config.json -s
.json).yaml, .yml).toml)While Maskit helps prevent accidental exposure of sensitive data, always review masked files before sharing to ensure all sensitive information has been properly redacted.