-
Notifications
You must be signed in to change notification settings - Fork 419
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
Explicitly reduce user to the same as defined in the container #688
base: master
Are you sure you want to change the base?
Explicitly reduce user to the same as defined in the container #688
Conversation
Signed-off-by: rtweed <RichardoC@users.noreply.github.com>
Welcome @RichardoC! |
Hi @RichardoC. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: RichardoC The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Looks like https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#run-local-verifications needs updating $ make test-integration
++ cat version.txt
+ VERSION=dev
+ [[ ! dev =~ ^([0-9]+[.][0-9]+)[.]([0-9]+)(-(alpha|beta)[.]([0-9]+))?$ ]]
+ printerr 'Version dev must be '\''X.Y.Z'\'', '\''X.Y.Z-alpha.N'\'', or '\''X.Y.Z-beta.N'\'''
+ echo 'Version dev must be '\''X.Y.Z'\'', '\''X.Y.Z-alpha.N'\'', or '\''X.Y.Z-beta.N'\'''
Version dev must be 'X.Y.Z', 'X.Y.Z-alpha.N', or 'X.Y.Z-beta.N'
+ exit 1
++ cat version.txt
+ VERSION=dev
+ [[ ! dev =~ ^([0-9]+[.][0-9]+)[.]([0-9]+)(-(alpha|beta)[.]([0-9]+))?$ ]]
+ printerr 'Version dev must be '\''X.Y.Z'\'', '\''X.Y.Z-alpha.N'\'', or '\''X.Y.Z-beta.N'\'''
+ echo 'Version dev must be '\''X.Y.Z'\'', '\''X.Y.Z-alpha.N'\'', or '\''X.Y.Z-beta.N'\'''
Version dev must be 'X.Y.Z', 'X.Y.Z-alpha.N', or 'X.Y.Z-beta.N'
+ exit 1
make: *** No rule to make target 'test-integration'. Stop.
$ make verify
++ cat version.txt
+ VERSION=dev
+ [[ ! dev =~ ^([0-9]+[.][0-9]+)[.]([0-9]+)(-(alpha|beta)[.]([0-9]+))?$ ]]
+ printerr 'Version dev must be '\''X.Y.Z'\'', '\''X.Y.Z-alpha.N'\'', or '\''X.Y.Z-beta.N'\'''
+ echo 'Version dev must be '\''X.Y.Z'\'', '\''X.Y.Z-alpha.N'\'', or '\''X.Y.Z-beta.N'\'''
Version dev must be 'X.Y.Z', 'X.Y.Z-alpha.N', or 'X.Y.Z-beta.N'
+ exit 1
++ cat version.txt
+ VERSION=dev
+ [[ ! dev =~ ^([0-9]+[.][0-9]+)[.]([0-9]+)(-(alpha|beta)[.]([0-9]+))?$ ]]
+ printerr 'Version dev must be '\''X.Y.Z'\'', '\''X.Y.Z-alpha.N'\'', or '\''X.Y.Z-beta.N'\'''
+ echo 'Version dev must be '\''X.Y.Z'\'', '\''X.Y.Z-alpha.N'\'', or '\''X.Y.Z-beta.N'\'''
Version dev must be 'X.Y.Z', 'X.Y.Z-alpha.N', or 'X.Y.Z-beta.N'
+ exit 1
make: *** No rule to make target 'verify'. Stop. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Hey sorry for the late review, I see a |
You're right, I'd thought https://github.com/kubernetes-sigs/aws-iam-authenticator/blob/2596d17f99149e9ce518e8bc4447e404aa655a57/Dockerfile#L26C59-L26C79 was a container running as 65532 with that user directive but based on https://github.com/kubernetes/kubernetes/blob/1c93be24ee8a607f6add6bb1869d5d2006ffa783/build/go-runner/Dockerfile it isn't. I can add the USER directive, but you're right about that host volume needing to be mounted as the correct group. We could default to the current group, and update the docs that this folder needs to be owned by that gid, or the manifest updated? |
Altering the Given that the file here is just an example ( |
What this PR does / why we need it:
This reduces the pod user permissions to the same defined in Dockerfile:23
This makes it easier for administrators and security tooling to tell this workload is running as non-root