Skip to content

feat!: enable secret redaction in API responses by default - #69

Merged
Siumauricio merged 1 commit into
mainfrom
fix/redact-by-default
Aug 7, 2026
Merged

feat!: enable secret redaction in API responses by default#69
Siumauricio merged 1 commit into
mainfrom
fix/redact-by-default

Conversation

@Siumauricio

Copy link
Copy Markdown
Contributor

Part of #65 (see also #26).

Summary

Flips the default of DOKPLOY_REDACT_ENV from false to true: a default installation now redacts secret-bearing fields (env vars, compose files, passwords, tokens, keys) from API responses before they reach the MCP client, instead of silently sending them to LLM context and provider logs.

  • Users who explicitly need raw secret values can opt out with DOKPLOY_REDACT_ENV=false.
  • DOKPLOY_REDACT_FIELDS still customizes the field list.
  • Adds a regression test asserting the secure default; README updated.

Why

Secure-by-default: #65 and #26 both reported real secret leakage from default installs. The redaction capability existed but was opt-in, which means most deployments never enable it. Reading secrets back through an LLM is the niche case and should be the explicit opt-in, not the other way around.

Note: this is a behavior change — worth a minor version bump and a changelog mention. Together with #66 (suffix matching for provider-prefixed fields like githubPrivateKey), this fully addresses the MCP side of #65; the remaining ask (omitting secrets server-side) belongs to Dokploy core.

Verification

  • Full test suite: 34/34 across 3 files, plus type-check and build.

🤖 Generated with Claude Code

DOKPLOY_REDACT_ENV now defaults to true: secret-bearing fields (env
vars, compose files, passwords, tokens, keys) are redacted from API
responses before they reach the MCP client, so a default installation
no longer leaks secrets into LLM context. Users who explicitly need raw
values can opt out with DOKPLOY_REDACT_ENV=false.

Requested in #65 (and previously #26).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant