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

bake: add filesystem entitlements support #2796

Merged
merged 6 commits into from
Nov 21, 2024

Conversation

tonistiigi
Copy link
Member

Adds support for entitlements when bake definition accesses local files. Accessing files within the current working directory is allowed by default.

part of #179
closes #2697

In this version, privileged path accesses for local bake definitions only warns, unless BUILDX_BAKE_ENTITLEMENTS_FS is set. In next version, the intention is to make this case fail as with other entitlements.

@crazy-max
Copy link
Member

Needs follow-up for GA:

  • Remove volumes handling for root path on Windows and instead use volume of current working dir
  • Check long path name handling in stdlib instead of using conversion from osutil

@tonistiigi
Copy link
Member Author

@profnandaa FYI, if you would like to double-check any of the Windows path stuff. We can also ping you on follow-up PR>

@tonistiigi
Copy link
Member Author

Discussing with @crazy-max the difference seems to be that in windows EvalSymlinks has extra toNorm call https://github.com/golang/go/blob/c37d9a0f9313ff2936b1b0b82476416e6cb03c62/src/path/filepath/symlink_windows.go#L113 that is missing in our custom evaluateToExistingPath implementation.

@tonistiigi tonistiigi merged commit a34c641 into docker:master Nov 21, 2024
122 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible to escape working directory with cwd:// for remote plaintext Bake definitions
2 participants