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

False positive 'CapabilityOrSecurityContextMissing' #572

Open
1 of 2 tasks
alice-vsk opened this issue Sep 13, 2023 · 1 comment
Open
1 of 2 tasks

False positive 'CapabilityOrSecurityContextMissing' #572

alice-vsk opened this issue Sep 13, 2023 · 1 comment

Comments

@alice-vsk
Copy link

ISSUE TYPE
  • Bug Report
  • Feature Idea

BUG REPORT

SUMMARY

We defined securityContext for containers in our deployments, but Kubeaudit still returns an error 'CapabilityOrSecurityContextMissing. Message: Security Context not set'.

ENVIRONMENT
  • Kubeaudit version: 0.22.0
  • Kubeaudit install method: Binary
STEPS TO REPRODUCE

Run kubeaudit all

EXPECTED RESULTS

Not having error 'CapabilityOrSecurityContextMissing. Message: Security Context not set'.

ACTUAL RESULTS
[error] CapabilityOrSecurityContextMissing
Message: Security Context not set. The Security Context should be specified and all Capabilities should be dropped by setting the Drop list to ALL.

ADDITIONAL INFORMATION

To debug the problem we also tried to output both pod and deployment as a yaml and run Kubeaudit on that, but still seeing an error.

SecurityContext in pod:

apiVersion: v1
kind: Pod
spec:
  containers:
    securityContext:
      allowPrivilegeEscalation: false
      runAsGroup: 100
      runAsNonRoot: true
      runAsUser: 1000
@github-actions
Copy link

Thanks for opening your first issue here! Be sure to follow the issue template!

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

No branches or pull requests

1 participant