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

Validate digest in repo for pull by digest #44327

Merged
merged 3 commits into from Oct 21, 2022

Conversation

thaJeztah
Copy link
Member

Upstreaming the patch for GHSA-vjgr-4595-fc6r to master.

This is a rebase and squash of https://github.com/moby/moby-ghsa-vjgr-4595-fc6r/pull/3

This is accomplished by storing the distribution source in the content labels. If the distribution source is not found then we check to the registry to see if the digest exists in the repo, if it does exist then the puller will use it.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Member Author

Ah, still need to revert 1f21c4d

integration/image/pull_test.go:123:36: undefined: registry.WithStdout
integration/image/pull_test.go:123:68: undefined: registry.WithStderr

@thaJeztah thaJeztah force-pushed the ghsa-ambiguous-pull-by-digest_master branch from ab18022 to 0697ba1 Compare October 19, 2022 10:21
@thaJeztah

This comment was marked as outdated.

@thaJeztah

This comment was marked as outdated.

@thaJeztah
Copy link
Member Author

Looks only on Windows (ran it locally on Linux, and that worked).

@thaJeztah
Copy link
Member Author

Ah, never mind; we don't build the registry on Windows (we don't run docker-in-docker, and it's not in the Dockerfile.windows).

@thaJeztah
Copy link
Member Author

Interesting; it seems like in Jenkins we are running a registry; maybe it's installed on those machines; let me check that. #44326 (comment)

@thaJeztah
Copy link
Member Author

Interesting; it seems like in Jenkins we are running a registry; maybe it's installed on those machines; let me check that. #44326 (comment)

Nevermind, I was looking at the wrong results; it's failing on rootless (not Windows), so no registry on Windows in 20.10 either

@thaJeztah

This comment was marked as outdated.

@thaJeztah
Copy link
Member Author

doh!

integration/image/pull_test.go:7:2: `io/ioutil` is in the denylist (depguard)
	"io/ioutil"
	^

@thaJeztah thaJeztah force-pushed the ghsa-ambiguous-pull-by-digest_master branch 3 times, most recently from dac6e1c to b83ebbf Compare October 20, 2022 20:57
thaJeztah and others added 3 commits October 21, 2022 01:48
This reverts commit 1f21c4d.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This is accomplished by storing the distribution source in the content
labels. If the distribution source is not found then we check to the
registry to see if the digest exists in the repo, if it does exist then
the puller will use it.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- On Windows, we don't build and run a local  test registry (we're not running
  docker-in-docker), so we need to skip this test.
- On rootless, networking doesn't support this (currently)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

@cpuguy83 @tianon @tonistiigi ptal

@thaJeztah
Copy link
Member Author

CI is happy; I'm bringing these in

@thaJeztah thaJeztah merged commit 43b8dff into moby:master Oct 21, 2022
@thaJeztah thaJeztah deleted the ghsa-ambiguous-pull-by-digest_master branch October 21, 2022 12:19
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.

None yet

2 participants