-
Notifications
You must be signed in to change notification settings - Fork 697
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
Defined notes for BSI SYS.1.6.A17 #12530
Open
lichtblaugue
wants to merge
6
commits into
ComplianceAsCode:master
Choose a base branch
from
sig-bsi-grundschutz:sys-1-6-A17
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ae3e790
Initial setup for rule SYS.1.6.A17
8e36b64
Existing scc rules added and sandbox rules copied from A26
7663896
Removing rules that already exist in another branch
6c3e1da
add rule to check for sandboxed containers
sluetze 14ae93f
add rule to check for sandboxed containers config
sluetze c880d3b
Defined notes and rules for BSI SYS.1.6.A26
sluetze File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
applications/openshift/general/sandboxed_containers_operator_configured/rule.yml
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,41 @@ | ||
|
||
title: Ensure that Sandboxed Containers Operator is Configured | ||
|
||
description: |- | ||
{{{ weblink(link="https://docs.redhat.com/en/documentation/openshift_sandboxed_containers/1.7", | ||
text="The Sandboxed Containers Operator") }}} | ||
provides containers with a dedicated kernel by running them in a virtual machine. This allows for extended separation, as no kernel is shared. This is done by using RHCOS cluster extension and is only available on RHCOS nodes. | ||
|
||
It is only active, if it is correctly configured with a KataConfig AND you configured each pod spec with <pre>runtimeClassName: kata</pre>. | ||
|
||
Be advised, that on AWS, Azure, IBM Z and IBM LinuxOne you need to enable PeerPods and confiugre additional resources. | ||
|
||
rationale: |- | ||
Using separate kernels for each container provides for better isolation, and makes it harder for adveseries to move laterally to other containers or the container-host. | ||
|
||
severity: medium | ||
|
||
identifiers: | ||
cce@ocp4: CCE-87430-5 | ||
|
||
ocil_clause: 'Sandboxed Containers Operator is not configured' | ||
|
||
ocil: |- | ||
Run the following command to check if a KataConfig for the cluster exists: | ||
<pre>$ oc get kataconfigs openshift-sandboxed-containers-operator</pre> | ||
Make sure at least one KataConfig exists. | ||
|
||
warnings: | ||
- general: |- | ||
{{{ openshift_cluster_setting("/apis/kataconfiguration.openshift.io/v1/kataconfigs?limit=5") | indent(4) }}} | ||
|
||
template: | ||
name: yamlfile_value | ||
vars: | ||
ocp_data: "true" | ||
filepath: /apis/kataconfiguration.openshift.io/v1/kataconfigs?limit=5 | ||
yamlpath: ".items[:].metadata.name" | ||
entity_check: "at least one" | ||
values: | ||
- value: ".*" | ||
operation: "pattern match" |
38 changes: 38 additions & 0 deletions
38
applications/openshift/general/sandboxed_containers_operator_exists/rule.yml
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please do not add the same content, which is already existing in other PRs / commits. just rebase on that branch or wait until the other branch is merged |
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,38 @@ | ||
|
||
title: Ensure that Sandboxed Containers Operator exists in the cluster | ||
|
||
description: |- | ||
{{{ weblink(link="https://docs.redhat.com/en/documentation/openshift_sandboxed_containers/1.7", | ||
text="The Sandboxed Containers Operator") }}} | ||
provides containers with a dedicated kernel by running them in a virtual machine. This allows for extended separation, as no kernel is shared. This is done by using RHCOS cluster extension and is only available on RHCOS nodes. | ||
|
||
rationale: |- | ||
Using separate kernels for each container provides for better isolation, and makes it harder for adveseries to move laterally to other containers or the container-host. | ||
|
||
severity: medium | ||
|
||
identifiers: | ||
cce@ocp4: CCE-86496-7 | ||
|
||
ocil_clause: 'Sandboxed Containers Operator is not installed' | ||
|
||
ocil: |- | ||
Run the following command to check if a subscription for the operator exists in the system: | ||
<pre>$ oc get sub -n openshift-sandboxed-containers-operator</pre> | ||
Make sure the Sandboxed Containers Operator is installed. | ||
|
||
warnings: | ||
- general: |- | ||
{{{ openshift_cluster_setting("/apis/operators.coreos.com/v1alpha1/subscriptions") | indent(4) }}} | ||
|
||
template: | ||
name: yamlfile_value | ||
vars: | ||
ocp_data: "true" | ||
filepath: '/apis/operators.coreos.com/v1alpha1/subscriptions' | ||
yamlpath: ".items[:].status.installedCSV" | ||
check_existence: "at_least_one_exists" | ||
values: | ||
- value: "sandboxed-containers-operator.*" | ||
operation: "pattern match" | ||
entity_check: "at least one" |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do not add the same content, which is already existing in other PRs / commits. just rebase on that branch or wait until the other branch is merged