Skip to content

fix: Set defaults for the securityContext#149

Merged
maksym-iv-ef merged 2 commits into
mainfrom
sec-fix
Jun 2, 2026
Merged

fix: Set defaults for the securityContext#149
maksym-iv-ef merged 2 commits into
mainfrom
sec-fix

Conversation

@maksym-iv-ef

@maksym-iv-ef maksym-iv-ef commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description

Introduce default security context for the deployment to align with trivy rules:

securityContext:
  capabilities:
    drop:
    - ALL
  readOnlyRootFilesystem: true
  runAsNonRoot: true
  runAsUser: 1000
  allowPrivilegeEscalation: false
  seccompProfile:
    type: RuntimeDefault

Please take the rules into the account when upgrading

@maksym-iv-ef maksym-iv-ef self-assigned this May 29, 2026
@maksym-iv-ef
maksym-iv-ef requested a review from alex-b-ef May 29, 2026 17:28
@maksym-iv-ef maksym-iv-ef changed the title fix: Security warnings from Semgrep/Trivy fix: Set defaults for the securityContext May 29, 2026
Introduce default security context for the deployment to align with trivy rules:
```yaml
securityContext:
  capabilities:
    drop:
    - ALL
  readOnlyRootFilesystem: true
  runAsNonRoot: true
  runAsUser: 1000
  allowPrivilegeEscalation: false
  seccompProfile:
    type: RuntimeDefault
    ```
@kgrubb

kgrubb commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

this looks good to me. i originally was going to say to make this a major version bump since its a breaking change technically, but i think the only situation where its breaking is if readOnlyRootFilesystem is turned on (the change in this pr) and the collector writes state/logs to an unmounted path, which it doesn't do by default anyway.

@maksym-iv-ef
maksym-iv-ef merged commit 13de26e into main Jun 2, 2026
5 checks passed
@maksym-iv-ef
maksym-iv-ef deleted the sec-fix branch June 2, 2026 18:55
@maksym-iv-ef

Copy link
Copy Markdown
Contributor Author

this looks good to me. i originally was going to say to make this a major version bump since its a breaking change technically, but i think the only situation where its breaking is if readOnlyRootFilesystem is turned on (the change in this pr) and the collector writes state/logs to an unmounted path, which it doesn't do by default anyway.

Moreover, we are on the v0.x.x, where minor version bumps can have breaking changes

maksym-iv-ef added a commit that referenced this pull request Jun 2, 2026
# Description
Release the v0.11.0 version

# Changelog
## [netobserv-flow-0.11.0] - 2026-06-02

### Bug Fixes

- Set defaults for the `securityContext` (#149)
### Features

- **netobserv-flow:** Bump collector appVersion to 7.26.0 (#148)


[netobserv-flow-0.10.0..netobserv-flow-0.11.0](netobserv-flow-0.10.0...netobserv-flow-0.11.0)

Co-authored-by: maksym-iv-ef <146473578+maksym-iv-ef@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants