-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(k8spspallowprivilegeescalationcontainer): suite test confirming…
… exemptImages I recently found (#584) that some K8sNativeValidation implementations of certain templates that iterate over and exempt containers by image had a bug preventing the exemption logic from working. The k8spspallowprivilegeescalationcontainer turns out not to have this problem, as proved by the passing tests with the addition of an image exemption suite test. Signed-off-by: juliankatz <[email protected]>
- Loading branch information
1 parent
5153330
commit 1955d05
Showing
7 changed files
with
61 additions
and
3 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
12 changes: 12 additions & 0 deletions
12
...lation/1.1.0/samples/psp-allow-privilege-escalation-container/example_allowed_exempt.yaml
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,12 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx-privilege-escalation-disallowed | ||
labels: | ||
app: nginx-privilege-escalation | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: "safeimages.com/nginx" | ||
securityContext: | ||
allowPrivilegeEscalation: true |
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
12 changes: 12 additions & 0 deletions
12
...e-escalation/samples/psp-allow-privilege-escalation-container/example_allowed_exempt.yaml
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,12 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx-privilege-escalation-disallowed | ||
labels: | ||
app: nginx-privilege-escalation | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: "safeimages.com/nginx" | ||
securityContext: | ||
allowPrivilegeEscalation: true |
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