Repository navigation
Conversation
…ore a raw body The audit request-body scrubber redacted an exact list of keys (password, token, secret, kubeconfig, ...). Butler's own request bodies use prefixed keys the list did not match (harvesterKubeconfig, nutanixPassword, proxmoxTokenSecret, azureClientSecret, gcpServiceAccount, awsSecretAccessKey), so a provider or identity provider request retained its credential in the audit event, which the platform audit log serves to any platform viewer. Match secret-bearing keys by normalized substring at any depth, which subsumes the old list and covers the prefixed fields. Top-level arrays are now scrubbed too. A body that is not JSON (including a large body truncated mid-object, the previous silent leak path) is summarized as omitted rather than returned raw, and the middleware no longer pre-truncates the body into invalid JSON. Tests assert that a sentinel credential never survives, for every Butler credential field and for nested, array, truncated, oversized and top-level-array bodies. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01APpgCYzvB1vEntdFm3py2n
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.
Summary
The audit request-body scrubber (
internal/audit/scrub.go, since #35) redacts an exact list of keys. Butler's own request bodies use prefixed credential keys the list does not match, so provider and identity-provider credentials are retained in the in-memory audit ring and served byGET /admin/auditto any platform viewer.Reproduced live on butler-beta:
POST /api/providers/testwith{"harvesterKubeconfig":"SENTINEL..."}→ the sentinel appears verbatim in the stored audit event'srequestSummary.Exposed fields include
harvesterKubeconfig,nutanixPassword,proxmoxPassword,proxmoxTokenSecret,azureClientSecret,gcpServiceAccount,awsSecretAccessKey.Change
password,secret,token,kubeconfig,privatekey,serviceaccount,credential,apikey,accesskey); this subsumes the old exact list and covers the prefixed fields. CA bundles (public certs) are intentionally not redacted.Independent of the parity train; based on
main. Not for merge as part of any train — staged for maintainer review as a security fix.Test plan
go build ./...go test ./...go test ./internal/audit -run Scrub -v[REDACTED]🤖 Generated with Claude Code
https://claude.ai/code/session_01APpgCYzvB1vEntdFm3py2n