Repository navigation
Redact whole-env manifest diff as a map, not a scalar string - #5746
Merged
Merged
Conversation
The cf CLI's redactDiff type-asserts map[string]interface{} on diffs
whose path ends in /env; a scalar redaction string panics it
(cf push --redact-env against CAPI >= 1.253.0). Emit a map for the
whole-env node instead.
Contributor
|
Note: CF CLI versions v8.7.9 through v8.19.1 are affected. |
jochenehret
approved these changes
Dec 3, 2026
ari-wg-gitbot
added a commit
to cloudfoundry/capi-release
that referenced
this pull request
Dec 3, 2026
Changes in cloud_controller_ng:
- Redact whole-env manifest diff as a map, not a scalar string
PR: cloudfoundry/cloud_controller_ng#5746
Author: Katharina Przybill <30441792+kathap@users.noreply.github.com>
This was referenced Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cf CLI's redactDiff type-asserts map[string]interface{} on diffs whose path ends in /env; a scalar redaction string panics it (
cf push --redact-env). Emit a map for the whole-env node instead.A short explanation of the proposed change:
When generating a manifest diff, Cloud Controller redacts sensitive keys (env, credentials, cnb-credentials) by replacing the diff value with the scalar string [PRIVATE DATA HIDDEN]. For a diff that targets the whole env node (path ending in /env), this now emits a map (
{ "keys" => "[PRIVATE DATA HIDDEN]" }) instead of the scalar string.An explanation of the use cases your change solves
cf push --redact-envcrashes against any Cloud Controller on CAPI ≥ 1.253.0 (the nfs-broker errand adds this flag automatically, so its deploy fails too).The CF CLI expects the env part of a manifest diff to be a map. Since Improve redaction of sensitive manifest values #5712, the server started sending a plain string ([PRIVATE DATA HIDDEN]) for it, so the CLI panics. In BOSH errands this shows up as the confusing error Response exceeded maximum allowed length.
This change sends env back as a map, so the CLI stops crashing
Links to any other associated PRs
Improve redaction of sensitive manifest values #5712
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests