Skip to content

Conversation

@vprashar2929
Copy link
Collaborator

Apply principle of least privilege by dropping all capabilities except CAP_SYS_PTRACE which Kepler needs to read /proc/ Also enforce readonly root filesystem and prevent privilege escalation

Security improvements:

  • Set privileged: false (no full root capabilities)
  • Drop ALL capabilities, add only SYS_PTRACE
  • Set allowPrivilegeEscalation: false
  • Set readOnlyRootFilesystem: true
  • Updated OpenShift SCC with same constraints

Apply principle of least privilege by dropping all capabilities
except CAP_SYS_PTRACE which Kepler needs to read /proc/<pid>
Also enforce readonly root filesystem and prevent privilege escalation

Security improvements:
- Set privileged: false (no full root capabilities)
- Drop ALL capabilities, add only SYS_PTRACE
- Set allowPrivilegeEscalation: false
- Set readOnlyRootFilesystem: true
- Updated OpenShift SCC with same constraints

Signed-off-by: vprashar2929 <vibhu.sharma2929@gmail.com>
@github-actions github-actions bot added the fix A bug fix label Dec 3, 2025
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.89%. Comparing base (796c151) to head (983ed0b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #651      +/-   ##
==========================================
+ Coverage   78.65%   78.89%   +0.23%     
==========================================
  Files          11       11              
  Lines        1073     1085      +12     
==========================================
+ Hits          844      856      +12     
  Misses        199      199              
  Partials       30       30              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vimalk78
Copy link
Collaborator

vimalk78 commented Dec 4, 2025

pls mention if this fix is tested on which openshift version

Comment on lines +353 to +354
RequiredDropCapabilities: []corev1.Capability{"ALL"},
AllowedCapabilities: []corev1.Capability{"SYS_PTRACE"},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect

Copy link
Collaborator

@vimalk78 vimalk78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add an e2e test which checks kepler's privileges

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants