Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Add securityContexts to secureCodeBox Components #129

Merged
merged 17 commits into from
Oct 5, 2020

Conversation

J12934
Copy link
Member

@J12934 J12934 commented Oct 2, 2020

Add configurable Kubernetes securityContext to all included pods.

For all direct "secureCodeBox" components (Operator, Lurcher, Parser & Hooks) these are completely pre-configured to enable all securityContext features which are generally available on all supported Kubernetes Versions.

For the scanner container these have not yet been configured, as this might required more tweaking to properly support the individual scanner without messing with their functionality. For now only Nmap has been configured with a proper securityContext. As the securityContext is exposed via the Helm values it can be configured individually by the user.

J12934 and others added 14 commits October 2, 2020 09:10
The `nonroot` user assignment was removed from the dockerfile as this
was already set via the `:nonroot` tag. This user is already set using
its uid.

This allows the `runAsNonRoot` securityContext Flag to work correctly.
This is more online with the parser and allows them to run in cluster
with extremly high security requirements / or hard enforced multi tenancy.

See: https://kubernetes.io/docs/concepts/containers/images/#use-cases
These will be extended later to best represent the needs of the
individual scanners.

Also added `env`, `extraVolumes`, `extraVolumeMounts`, `extraContainers`
config values missing in scanner templates.
@J12934 J12934 added the enhancement New feature or request label Oct 2, 2020
@J12934 J12934 requested a review from rseedorff October 2, 2020 16:03
@J12934
Copy link
Member Author

J12934 commented Oct 2, 2020

While adding the securityContext i've noticed that all scanners had env, extraVolumes, extraVolumeMounts, extraContainers config values in their Helm values but their templates didn't really support them. I've added them to all integrated scanners.

@J12934 J12934 self-assigned this Oct 5, 2020
@J12934 J12934 requested a review from nigthknight October 5, 2020 11:24
@nigthknight nigthknight merged commit 4695e1e into master Oct 5, 2020
@nigthknight nigthknight deleted the security-contexts branch October 5, 2020 13:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants