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

Scrub user and group names from layer diffs #4181

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

nalind
Copy link
Member

@nalind nalind commented Aug 10, 2022

What type of PR is this?

/kind bug

What this PR does / why we need it:

When generating layer diffs or extracting container contents, scrub the user and group name fields in tar headers before saving them. By default, we were looking up the names of local users and groups, and if we found some that corresponded to contents of layers that we were saving, we stored those names along with the UID and GID information for items in layers.

How to verify it

New integration test!

Which issue(s) this PR fixes:

Fixes #4180.

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Contents of layer diffs now only identify their intended owners by UID and GID, and no longer include user and group names which are not necessarily useful, and which have historically been ignored.

@openshift-ci openshift-ci bot added kind/bug Categorizes issue or PR as related to a bug. approved labels Aug 10, 2022
When generating layer diffs or extracting container contents, scrub the
user and group name fields in tar headers before saving them.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Aug 10, 2022

LGTM
@flouthoc PTAL

Copy link
Collaborator

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

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

LGTM
/approve
/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 11, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, nalind

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 18cd2d5 into containers:main Aug 11, 2022
@nalind nalind deleted the scrub-usernames branch August 15, 2022 21:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved kind/bug Categorizes issue or PR as related to a bug. lgtm locked - please file new issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buildah leaks details about the host into layer tars
4 participants