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

Fix reg cannot scan vulnerabilities on images with empty layers #168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KeyboardNerd
Copy link

The name of layer was not properly computed because some empty layer causes the layer map to have missing indexes.

Fixes #167

@jessfraz
Copy link
Collaborator

@jzelinskie can you make sure this seems right to you too, thanks!

@jzelinskie
Copy link
Contributor

I think this change is correct, but it took me far longer to understand than it should. The filtering stuff needs to get pulled out into its own function and maybe be applied just before POSTing. That way we can keep track of these invariants in one place, rather than all over the place.

@KeyboardNerd
Copy link
Author

I don't understand why it's hard to understand but yes, the empty layer filtering can be extracted from the function to make it more clear. I'll update the PR.

Instead of filtering the empty layers when getting the layer, we do it
before posting the layer.
@KeyboardNerd
Copy link
Author

cool fixed @jzelinskie

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

3 participants