mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-08-23 22:26:34 +00:00
* Add missingNetworkPolicy, automountServiceAccountToken, and linuxHardening checks
37 lines
998 B
YAML
37 lines
998 B
YAML
successMessage: The ServiceAccount will not be automounted
|
|
failureMessage: The ServiceAccount will be automounted
|
|
category: Security
|
|
target: PodSpec
|
|
schema:
|
|
'$schema': http://json-schema.org/draft-07/schema
|
|
type: object
|
|
required: ["serviceAccountName"]
|
|
properties:
|
|
serviceAccountName:
|
|
type: string
|
|
automountServiceAccountToken:
|
|
type: boolean
|
|
not:
|
|
const: true
|
|
additionalSchemaStrings:
|
|
ServiceAccount: |
|
|
type: object
|
|
required:
|
|
- metadata
|
|
{{ if not (eq .Polaris.PodSpec.automountServiceAccountToken false) }}
|
|
- automountServiceAccountToken
|
|
{{ end }}
|
|
properties:
|
|
metadata:
|
|
type: object
|
|
required: ["name"]
|
|
properties:
|
|
name:
|
|
type: string
|
|
const: "{{ .Polaris.PodSpec.serviceAccountName }}"
|
|
{{ if not (eq .Polaris.PodSpec.automountServiceAccountToken false) }}
|
|
automountServiceAccountToken:
|
|
type: boolean
|
|
const: false
|
|
{{ end }}
|