mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-05-06 09:16:36 +00:00
* add more mutations * fix tests * add more test cases * Update insecureCapabilities.yaml * Update dangerousCapabilities.yaml * fix tests * fix tests * add pullPolicyNotAlways as default mutation
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
successMessage: Filesystem is read only
|
|
failureMessage: Filesystem should be read only
|
|
category: Security
|
|
target: Container
|
|
schemaTarget: PodSpec
|
|
schema:
|
|
'$schema': http://json-schema.org/draft-07/schema
|
|
definitions:
|
|
goodSecurityContext:
|
|
type: object
|
|
anyOf:
|
|
- required:
|
|
- readOnlyRootFilesystem
|
|
properties:
|
|
readOnlyRootFilesystem:
|
|
const: true
|
|
notBadSecurityContext:
|
|
type: object
|
|
properties:
|
|
readOnlyRootFilesystem:
|
|
const: true
|
|
type: object
|
|
anyOf:
|
|
- required:
|
|
- securityContext
|
|
properties:
|
|
securityContext:
|
|
$ref: "#/definitions/goodSecurityContext"
|
|
containers:
|
|
type: array
|
|
items:
|
|
properties:
|
|
securityContext:
|
|
$ref: "#/definitions/notBadSecurityContext"
|
|
- properties:
|
|
containers:
|
|
type: array
|
|
items:
|
|
required:
|
|
- securityContext
|
|
properties:
|
|
securityContext:
|
|
$ref: "#/definitions/goodSecurityContext"
|
|
mutations:
|
|
- op: add
|
|
path: /securityContext/readOnlyRootFilesystem
|
|
value: true
|
|
|