Skip to content

Commit d04a8ee

Browse files
committed
Redact network information
1 parent fb460bf commit d04a8ee

2 files changed

Lines changed: 16 additions & 148 deletions

File tree

pkg/enricher/ctrinfo/mock_podSpec.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"status": {
3-
"id": "f3b1405ccf16f0122ef84b756b72ea43b87d851ec374bdd5012d0283784a6cd2",
3+
"id": "X",
44
"metadata": {
55
"attempt": 1,
66
"name": "retina-pod",
77
"namespace": "retina-namespace",
88
"uid": ""
99
},
1010
"state": "SANDBOX_READY",
11-
"createdAt": "2025-03-20T10:02:27.8699572Z",
11+
"createdAt": "X",
1212
"network": {
1313
"additionalIps": [],
1414
"ip": "10.0.0.4"
@@ -34,7 +34,7 @@
3434
"processStatus": "running",
3535
"netNamespaceClosed": false,
3636
"image": "mcr.microsoft.com/windows/nanoserver:ltsc2022",
37-
"snapshotKey": "f3b1405ccf16f0122ef84b756b72ea43b87d851ec374bdd5012d0283784a6cd2",
37+
"snapshotKey": "X",
3838
"snapshotter": "windows",
3939
"runtimeHandler": "runhcs-wcow-process",
4040
"runtimeType": "io.containerd.runhcs.v1",
@@ -68,12 +68,12 @@
6868
},
6969
"annotations": {
7070
"io.kubernetes.cri.container-type": "sandbox",
71-
"io.kubernetes.cri.sandbox-id": "f3b1405ccf16f0122ef84b756b72ea43b87d851ec374bdd5012d0283784a6cd2"
71+
"io.kubernetes.cri.sandbox-id": "X"
7272
},
7373
"windows": {
7474
"layerFolders": null,
7575
"network": {
76-
"networkNamespace": "080b5612-189f-4fe3-a388-43fcc31fe687"
76+
"networkNamespace": "X"
7777
}
7878
}
7979
},

pkg/enricher/statefile/mock_statefile.json

Lines changed: 11 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,168 +1,36 @@
11
{
22
"Network": {
3-
"CnsClient": null,
4-
"Version": "v1.6.17",
5-
"TimeStamp": "2025-01-09T16:21:18.4352991Z",
63
"ExternalInterfaces": {
74
"Ethernet": {
85
"Name": "Ethernet",
96
"Networks": {
10-
"azure-vlan1-192-0-0-0_24": {
11-
"Id": "azure-vlan1-192-0-0-0_24",
12-
"HnsId": "174e3286-fd9a-48c0-9840-2c6a133b7b61",
13-
"Mode": "tunnel",
14-
"VlanId": 1,
15-
"Subnets": [
16-
{
17-
"Family": 2,
18-
"Prefix": {
19-
"IP": "192.0.0.0",
20-
"Mask": "////AA=="
21-
},
22-
"Gateway": "192.0.0.1",
23-
"PrimaryIP": ""
24-
}
25-
],
7+
"mock_network": {
268
"Endpoints": {
27-
"1f20629e-eth0": {
28-
"Id": "1f20629e-eth0",
29-
"HnsId": "41d49f8c-820a-406a-ade6-6b041ff763a6",
30-
"SandboxKey": "1f20629e98eb30e9958ad070354852f452247556f08cb3ff227665ee5125fea8",
31-
"IfName": "eth0",
32-
"HostIfName": "",
33-
"MacAddress": "ABVdtctu",
34-
"InfraVnetIP": {
35-
"IP": "",
36-
"Mask": null
37-
},
38-
"LocalIP": "",
9+
"mock_endpoint_1": {
10+
"Id": "X",
3911
"IPAddresses": [
4012
{
4113
"IP": "192.0.0.5",
42-
"Mask": "////AA=="
43-
}
44-
],
45-
"Gateways": [
46-
"192.0.0.1"
47-
],
48-
"DNS": {
49-
"Suffix": "retina2-namespace.svc.cluster.local",
50-
"Servers": [
51-
"168.63.129.16"
52-
],
53-
"Options": null
54-
},
55-
"Routes": [
56-
{
57-
"Dst": {
58-
"IP": "0.0.0.0",
59-
"Mask": "AAAAAA=="
60-
},
61-
"Src": "",
62-
"Gw": "192.0.0.1",
63-
"Protocol": 0,
64-
"DevName": "",
65-
"Scope": 0,
66-
"Priority": 0,
67-
"Table": 0
14+
"Mask": "X"
6815
}
6916
],
70-
"VlanID": 1,
71-
"EnableSnatOnHost": false,
72-
"EnableInfraVnet": false,
73-
"EnableMultitenancy": false,
74-
"AllowInboundFromHostToNC": true,
75-
"AllowInboundFromNCToHost": true,
76-
"NetworkContainerID": "Swift_00000000-0000-0000-0000-000000000002",
77-
"ContainerID": "1f20629e98eb30e9958ad070354852f452247556f08cb3ff227665ee5125fea8",
7817
"PODName": "retina-pod",
79-
"PODNameSpace": "retina-namespace",
80-
"NetNs": "3be8896f-442f-40d2-a3c8-3be9ed730aff",
81-
"SecondaryInterfaces": null,
82-
"NICType": "InfraNIC"
18+
"PODNameSpace": "retina-namespace"
8319
},
84-
"ecb287b4-eth0": {
85-
"Id": "ecb287b4-eth0",
86-
"HnsId": "40cdffea-5a95-4f30-aa6a-a7d65355ef65",
87-
"SandboxKey": "ecb287b4bedd9fcf02cc4bd00d05cb2be1a40055880d8de1a57ca727e5b5ef5b",
88-
"IfName": "eth0",
89-
"HostIfName": "",
90-
"MacAddress": "ABVdtcrw",
91-
"InfraVnetIP": {
92-
"IP": "",
93-
"Mask": null
94-
},
95-
"LocalIP": "",
20+
"mock_endpoint_2": {
21+
"Id": "Y",
9622
"IPAddresses": [
9723
{
9824
"IP": "192.0.0.4",
99-
"Mask": "////AA=="
100-
}
101-
],
102-
"Gateways": [
103-
"192.0.0.1"
104-
],
105-
"DNS": {
106-
"Suffix": "retina2-namespace.svc.cluster.local",
107-
"Servers": [
108-
"168.63.129.16"
109-
],
110-
"Options": null
111-
},
112-
"Routes": [
113-
{
114-
"Dst": {
115-
"IP": "0.0.0.0",
116-
"Mask": "AAAAAA=="
117-
},
118-
"Src": "",
119-
"Gw": "192.0.0.1",
120-
"Protocol": 0,
121-
"DevName": "",
122-
"Scope": 0,
123-
"Priority": 0,
124-
"Table": 0
25+
"Mask": "Y"
12526
}
12627
],
127-
"VlanID": 1,
128-
"EnableSnatOnHost": false,
129-
"EnableInfraVnet": false,
130-
"EnableMultitenancy": false,
131-
"AllowInboundFromHostToNC": true,
132-
"AllowInboundFromNCToHost": true,
133-
"NetworkContainerID": "Swift_00000000-0000-0000-0000-000000000001",
134-
"ContainerID": "ecb287b4bedd9fcf02cc4bd00d05cb2be1a40055880d8de1a57ca727e5b5ef5b",
13528
"PODName": "retina2-pod",
136-
"PODNameSpace": "retina2-namespace",
137-
"NetNs": "86cba19c-b544-4a43-ada0-463b3d56899d",
138-
"SecondaryInterfaces": null,
139-
"NICType": "InfraNIC"
29+
"PODNameSpace": "retina2-namespace"
14030
}
141-
},
142-
"DNS": {
143-
"Suffix": "",
144-
"Servers": null,
145-
"Options": null
146-
},
147-
"EnableSnatOnHost": false,
148-
"NetNs": "82a70e8e-3e7c-4f50-a211-ff4062f08cac",
149-
"SnatBridgeIP": ""
31+
}
15032
}
151-
},
152-
"Subnets": [
153-
"10.0.0.0/24"
154-
],
155-
"BridgeName": "",
156-
"DNSInfo": {
157-
"Suffix": "",
158-
"Servers": null,
159-
"Options": null
160-
},
161-
"MacAddress": "AA06PtyI",
162-
"IPAddresses": null,
163-
"Routes": null,
164-
"IPv4Gateway": "0.0.0.0",
165-
"IPv6Gateway": "::"
33+
}
16634
}
16735
}
16836
}

0 commit comments

Comments
 (0)