gitRepo volume: directory must be max 1 level deep

More details on Hackerone #2266560
This commit is contained in:
Imre Rad
2024-04-25 14:21:51 +00:00
parent 8a9031f9c9
commit c7846fd24c
2 changed files with 20 additions and 0 deletions

View File

@@ -267,6 +267,20 @@ func TestPlugin(t *testing.T) {
},
isExpectedFailure: true,
},
{
name: "invalid-revision-directory-combo",
vol: &v1.Volume{
Name: "vol1",
VolumeSource: v1.VolumeSource{
GitRepo: &v1.GitRepoVolumeSource{
Repository: gitURL,
Revision: "main",
Directory: "foo/bar",
},
},
},
isExpectedFailure: true,
},
}
for _, scenario := range scenarios {