-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
INSIGHTS-475 Add 3 new checks to polaris (#1082)
* INSIGHTS-448 Add Two Polaris Checks * Added another chec * Added another chec * Added another chec * Added another chec * Added another chec * Added another chec * Fixing issue * Fixing issue * Added another validation * Added some tests cases * Added some tests cases * Update pkg/config/checks/hostProcess.yaml * Update pkg/validator/pod_test.go --------- Co-authored-by: Andy Suderman <andy@fairwinds.com>
- Loading branch information
1 parent
4b87baf
commit 4dd3a81
Showing
15 changed files
with
227 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
successMessage: HostPath volumes are not configured | ||
failureMessage: HostPath volumes must be forbidden | ||
category: Security | ||
target: PodSpec | ||
schema: | ||
'$schema': http://json-schema.org/draft-07/schema | ||
type: object | ||
properties: | ||
volumes: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
hostPath: | ||
type: string | ||
const: '' |
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,31 @@ | ||
successMessage: Privileged access to the host check is valid | ||
failureMessage: Privileged access to the host is disallowed | ||
category: Security | ||
target: PodSpec | ||
schema: | ||
'$schema': http://json-schema.org/draft-07/schema | ||
type: object | ||
properties: | ||
containers: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
securityContext: | ||
type: object | ||
properties: | ||
windowsOptions: | ||
type: object | ||
properties: | ||
hostProcess: | ||
type: boolean | ||
const: false | ||
securityContext: | ||
type: object | ||
properties: | ||
windowsOptions: | ||
type: object | ||
properties: | ||
hostProcess: | ||
type: boolean | ||
const: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
successMessage: The default /proc masks are set up to reduce attack surface, and should be required | ||
failureMessage: Proc mount must not be changed from the default | ||
category: Security | ||
target: PodSpec | ||
schema: | ||
'$schema': http://json-schema.org/draft-07/schema | ||
type: object | ||
properties: | ||
containers: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
securityContext: | ||
type: object | ||
properties: | ||
procMount: | ||
type: string | ||
const: Default |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
volumes: | ||
- name: log-volume | ||
hostPath: | ||
path: /var/log |
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 | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
volumes: | ||
- name: log-volume |
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: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
hostPort: 8080 | ||
securityContext: | ||
windowsOptions: | ||
hostProcess: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
hostPort: 8080 | ||
securityContext: | ||
windowsOptions: | ||
hostProcess: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
hostPort: 8080 | ||
securityContext: | ||
windowsOptions: | ||
hostProcess: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
hostPort: 8080 | ||
securityContext: | ||
windowsOptions: | ||
hostProcess: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
hostPort: 8080 | ||
securityContext: | ||
procMount: Other |
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: nginx | ||
labels: | ||
app.kubernetes.io/name: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
hostPort: 8080 | ||
securityContext: | ||
procMount: Default |