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

EphemeralContainers via kubectl debug bypass Pepr webhooks #381

Closed
mjnagel opened this issue Nov 17, 2023 · 0 comments · Fixed by #382
Closed

EphemeralContainers via kubectl debug bypass Pepr webhooks #381

mjnagel opened this issue Nov 17, 2023 · 0 comments · Fixed by #382
Assignees

Comments

@mjnagel
Copy link
Contributor

mjnagel commented Nov 17, 2023

Environment

Device and OS: macOS
App version: 0.16.0
Kubernetes distro being used: k3d

Steps to reproduce

Deploy a pepr capability that includes something operating on a.Pod during both create and update (validate or mutate). Simple example would just be logging something out.

Run a command similar to this kubectl debug -it -n test test-pod --image busybox and validate that the webhook is not triggered.

Expected result

Pepr should see these modifications.

Actual Result

Pepr misses these calls.

Severity/Priority

For validate calls this is pretty critical as it would allow someone to bypass validation for these injected debug containers.

Additional Context

I was able to identify this issue thanks to other webhooks like kyverno that made a similar change: https://www.github.com/kyverno/kyverno/issues/2821

@mjnagel mjnagel self-assigned this Nov 17, 2023
cmwylie19 added a commit that referenced this issue Nov 17, 2023
## Description

Adds support for ephemeral containers in the webhook generation

## Related Issue

Fixes #381

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/pepr/blob/main/CONTRIBUTING.md#submitting-a-pull-request)
followed

Co-authored-by: Case Wylie <cmwylie19@defenseunicorns.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant