Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add required values and exceptions for pss policies #383

Merged
merged 4 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .nancy-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ sonatype-2022-0204 until=2024-02-01

sonatype-2022-6522 until=2024-02-01
CVE-2020-8561

#pkg:golang/github.com/gin-gonic/gin@v1.7.7(indirect)
CVE-2023-26125
CVE-2023-29401

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added required values for pss policies.
- Added pss exceptions for volumes and ports.

### Removed

- Stop pushing to `openstack-app-collection`.
Expand Down
33 changes: 33 additions & 0 deletions helm/etcd-backup-operator/templates/pss-exceptions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: kyverno.io/v2alpha1
kind: PolicyException
metadata:
name: {{ include "resource.default.name" . }}-exceptions
namespace: {{ include "resource.default.namespace" . }}
spec:
exceptions:
- policyName: disallow-host-namespaces
ruleNames:
- host-namespaces
- autogen-host-namespaces
- policyName: disallow-host-path
ruleNames:
- host-path
- autogen-host-path
- policyName: restrict-volume-types
ruleNames:
- restricted-volumes
- autogen-restricted-volumes
- policyName: require-run-as-nonroot
ruleNames:
- run-as-non-root
- autogen-run-as-non-root
match:
any:
- resources:
kinds:
- Deployment
- Pod
namespaces:
- {{ include "resource.default.namespace" . }}
names:
- {{ include "resource.default.name" . }}*
16 changes: 16 additions & 0 deletions helm/etcd-backup-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,29 @@
"securityContext": {
"type": "object",
"properties": {
"allowPrivilegeEscalation": {
"type": "boolean",
"default": false
},
"seccompProfile": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"capabilities":{
"type": "object",
"properties": {
"drop": {
"type": "array",
"items": {
"type": "string"
},
"default": ["ALL"]
}
}
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions helm/etcd-backup-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ podSecurityContext:

# Add seccomp to container security context
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
capabilities:
drop:
- ALL

# Set a password to enable backup encryption
etcdBackupEncryptionPassword: ""
Loading