Skip to content

Commit

Permalink
Updated function to hash and replace sensitive values using
Browse files Browse the repository at this point in the history
  • Loading branch information
JaylonmcShan03 committed Oct 25, 2024
1 parent d825fd0 commit 725d616
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helm-framework/helm/manifest_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ func hashSensitiveValue(v string) string {
// redactSensitiveValues removes values that appear in `set_sensitive` blocks from the manifest JSON
func redactSensitiveValues(text string, sensitiveValues map[string]string) string {
masked := text
for originalValue, hashedValue := range sensitiveValues {

for originalValue := range sensitiveValues {
hashedValue := hashSensitiveValue(originalValue)
masked = strings.ReplaceAll(masked, originalValue, hashedValue)
}

return masked
}

0 comments on commit 725d616

Please sign in to comment.