Skip to content

Commit c85bf9a

Browse files
authored
BREAKING: remove IP address redaction (#734)
This change removes the IPv4 address redaction which previously ran by default on all support bundle collections. Folks that want to redact IPv4 addresses will need to add that redactor manually to their redactor specs.
1 parent bfb77ad commit c85bf9a

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

pkg/redact/redact.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,6 @@ func getRedactors(path string) ([]Redactor, error) {
167167
regex string
168168
name string
169169
}{
170-
// ipv4
171-
{
172-
regex: `(?P<mask>\b(?P<drop>25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?P<drop>25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?P<drop>25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?P<drop>25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)`,
173-
name: "Redact ipv4 addresses",
174-
},
175-
// TODO: ipv6
176170
// aws secrets
177171
{
178172
regex: `(?i)(\\\"name\\\":\\\"[^\"]*SECRET_?ACCESS_?KEY\\\",\\\"value\\\":\\\")(?P<mask>[^\"]*)(\\\")`,

pkg/redact/redact_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,6 @@ func Test_Redactors(t *testing.T) {
808808
"selector": {
809809
"app": "lazy-api"
810810
},
811-
"clusterIP": "10.152.183.227",
812811
"type": "NodePort",
813812
"sessionAffinity": "None",
814813
"externalTrafficPolicy": "Cluster"
@@ -1663,7 +1662,6 @@ func Test_Redactors(t *testing.T) {
16631662
"selector": {
16641663
"app": "lazy-api"
16651664
},
1666-
"clusterIP": "***HIDDEN***",
16671665
"type": "NodePort",
16681666
"sessionAffinity": "None",
16691667
"externalTrafficPolicy": "Cluster"
@@ -1721,8 +1719,8 @@ func Test_Redactors(t *testing.T) {
17211719
}
17221720
]`
17231721

1724-
wantRedactionsLen := 44
1725-
wantRedactionsCount := 26
1722+
wantRedactionsLen := 43
1723+
wantRedactionsCount := 25
17261724

17271725
t.Run("test default redactors", func(t *testing.T) {
17281726
req := require.New(t)

0 commit comments

Comments
 (0)