-
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.
Browse files
Browse the repository at this point in the history
Co-authored-by: Pilaniya <[email protected]> Co-authored-by: [email protected] <pilaniya50966125>
- Loading branch information
1 parent
a97af93
commit ea67baa
Showing
8 changed files
with
163 additions
and
42 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
File renamed without changes.
20 changes: 20 additions & 0 deletions
20
assets/queries/k8s/containers_running_as_root/test/negative2.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,20 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: security-context-demo-1 | ||
spec: | ||
securityContext: | ||
runAsUser: 1000 | ||
runAsNonRoot: true | ||
containers: | ||
- name: sec-ctx-demo-100 | ||
image: gcr.io/google-samples/node-hello:1.0 | ||
securityContext: | ||
runAsUser: 1000 | ||
runAsNonRoot: false | ||
- name: sec-ctx-demo-200 | ||
image: gcr.io/google-samples/node-hedwfwllo:1.0 | ||
securityContext: | ||
runAsUser: 2000 | ||
runAsNonRoot: true | ||
|
15 changes: 15 additions & 0 deletions
15
assets/queries/k8s/containers_running_as_root/test/negative3.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,15 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: containers-runs-as-root | ||
spec: | ||
securityContext: | ||
runAsUser: 0 | ||
runAsNonRoot: false | ||
containers: | ||
- name: sec-ctx-demo-100 | ||
image: gcr.io/google-samples/node-hello:1.0 | ||
securityContext: | ||
runAsUser: 1000 | ||
runAsNonRoot: false | ||
|
File renamed without changes.
20 changes: 20 additions & 0 deletions
20
assets/queries/k8s/containers_running_as_root/test/positive2.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,20 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: security-context-demo-2 | ||
spec: | ||
securityContext: | ||
runAsUser: 10 | ||
runAsNonRoot: false | ||
containers: | ||
- name: sec-ctx-demo-100 | ||
image: gcr.io/google-samples/node-hello:1.0 | ||
securityContext: | ||
runAsUser: 0 | ||
runAsNonRoot: false | ||
- name: sec-ctx-demo-200 | ||
image: gcr.io/google-samples/node-hedwfwllo:1.0 | ||
securityContext: | ||
runAsUser: 0 | ||
runAsNonRoot: false | ||
|
16 changes: 16 additions & 0 deletions
16
assets/queries/k8s/containers_running_as_root/test/positive3.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,16 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: containers-runs-as-root | ||
spec: | ||
securityContext: | ||
runAsUser: 0 | ||
runAsNonRoot: false | ||
containers: | ||
- name: sec-ctx-demo-100 | ||
image: gcr.io/google-samples/node-hello:1.0 | ||
securityContext: | ||
runAsUser: 0 | ||
runAsNonRoot: false | ||
|
||
|
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