-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stricter container ID matching in K8s Workload Attestor (#4468)
The current regex groups are too loose in what they will accept as a container ID. Tighten the regex's to only accept 64 hex digits as a container ID. Fixes #4088 Signed-off-by: Andrew Harding <azdagron@gmail.com>
- Loading branch information
Showing
3 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
13 changes: 13 additions & 0 deletions
13
pkg/agent/plugin/workloadattestor/k8s/testdata/systemd_crio_cgroups_pid_in_pod.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
12:hugetlb:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
11:netcls,net_prio:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
10:pids:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
9:cpuset:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
8:devices:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
7:memory:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
6:perf_event:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
5:blkio:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
4:cpu,cpuacct:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
3:rdma:/ | ||
2:freezer:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
1:systemd:/kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-poda2830d0d_b0f0_4ff0_81b5_0ee4e299cf80.slice/crio-09bc3d7ade839efec32b6bec4ec79d099027a668ddba043083ec21d3c3b8f1e6.scope | ||
0::/system.slice/crio.service |