Forbid empty AppArmor localhost profile

This commit is contained in:
Tim Allclair
2022-02-15 13:19:02 -08:00
parent 30a21e9abd
commit f780889d4c
2 changed files with 12 additions and 1 deletions

View File

@@ -109,6 +109,8 @@ func TestValidateValidHost(t *testing.T) {
{v1.AppArmorBetaProfileNamePrefix + "foo-container", true},
{v1.AppArmorBetaProfileNamePrefix + "/usr/sbin/ntpd", true},
{"docker-default", false},
{v1.AppArmorBetaProfileNamePrefix + "", false}, // Empty profile explicitly forbidden.
{v1.AppArmorBetaProfileNamePrefix + " ", false},
}
for _, test := range tests {