dotset mantle run
Run any command with secrets injected from multiple providers and output protection.Usage
Use
-- to separate dotset options from your command.Options
| Option | Description | Default |
|---|---|---|
-p, --providers <list> | Comma-separated providers | auto |
-s, --scope <scope> | Environment scope | development |
-m, --mode <mode> | Protection mode | redact |
--redact-text <text> | Replacement text | [REDACTED] |
-q, --quiet | Suppress mantle output | false |
--report | Generate HTML protection report | false |
Secret Resolution
Mantle aggregates secrets from configured providers. By default, it usesauto which attempts to detect all available sources.
Supported Providers
- dotenv: Loads from
.env,.env.local,.env.development, etc. - environment: Shell environment variables (with common prefixes like
API_,SECRET_,TOKEN_) - aws-sm: AWS Secrets Manager
Examples
Zero-Setup (.env auto-detection)
Explicit Providers
With Redaction
Production Scope
Compliance Reports
Use the--report flag to generate a standalone HTML report after each run. This is useful for:
- Audit trails: Document what protection was applied
- Compliance evidence: SOC 2, ISO 27001 artifact generation
- CI artifacts: Upload to your build system for review
- Run summary (command, mode, duration)
- Secrets protected (count by provider)
- Exposures detected and blocked
- Pattern matches with severity levels
Security Policies
Mantle uses a curated set of high-accuracy patterns (AWS keys, GitHub tokens, OpenAI keys, etc.) to scan your output. See the Security Policies guide for a full list of supported patterns.How It Works
- Resolution: Aggregates secrets from all specified providers.
- Injection: Injects discovered secrets into the child process environment.
- Sanitization: Intercepts
stdout/stderrusing a streaming line-buffered engine. This ensures secrets are caught even if split across output chunks. - Dynamic Detection: Scans for assignment patterns (e.g.
password=) and high-entropy strings, providing a safety net for secrets not covered by standard regex. - Flush: Flushes any remaining buffered text before exiting.