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

Fixes #1837 : keep file capabilities on archival #1838

Merged

Conversation

hypnoce
Copy link
Contributor

@hypnoce hypnoce commented Dec 16, 2021

Fixes #1837

Description

Read security.capability from file and store it in XAttrs tar header.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • No unit test: hard to test as xattrs are not kept by git and setting them requires priviledges
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Release Notes

Preserve file capabilities on archival

@hypnoce hypnoce force-pushed the add_security_capability branch 4 times, most recently from caa54c4 to 6534a68 Compare December 20, 2021 22:15
@hypnoce
Copy link
Contributor Author

hypnoce commented Dec 20, 2021

All check failed with

docker: Error response from daemon: Head "https://registry-1.docker.io/v2/library/registry/manifests/2": received unexpected HTTP status: 502 Bad Gateway.

Rebased

@hypnoce
Copy link
Contributor Author

hypnoce commented Dec 21, 2021

@imjasonh I rebased, hope it fixes the builds.

@hypnoce
Copy link
Contributor Author

hypnoce commented Dec 21, 2021

Kaniko should also keep security xattr when unpacking. Added the writeXattr when unpacking.

Copy link
Collaborator

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

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

Thank you!🙏

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

Successfully merging this pull request may close these issues.

File capabilities are lost during archival
2 participants