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 a few bugs in cosign initialize #1280

Merged
merged 1 commit into from
Jan 8, 2022
Merged

Conversation

haydentherapper
Copy link
Contributor

@haydentherapper haydentherapper commented Jan 7, 2022

  • In getRoot, the metadata is always stored at the top level,
    not under repository/. This resulted in initialize always falling
    back to the embedded root.
  • In Initialize, download all metadata and targets. This should
    avoid a disk write on verify.

Signed-off-by: Hayden Blauzvern hblauzvern@google.com

Summary

Ticket Link

Fixes

Release Note


@haydentherapper
Copy link
Contributor Author

cc @asraa @dlorenc

@haydentherapper
Copy link
Contributor Author

Failing on just windows, gotta fix that

@dlorenc
Copy link
Member

dlorenc commented Jan 7, 2022

Failing on just windows, gotta fix that

Maybe useful- files seem to silently get converted to /r/n line endings when accessed on windows, even from the embedded data I had to jump through some hoops to convert back before checking signatures.

pkg/cosign/tuf/client.go Outdated Show resolved Hide resolved
* In getRoot, the metadata is always stored at the top level,
  not under repository/.
* In Initialize, download all metadata and targets. This should
  avoid a disk write on verify.
* Use path instead of filepath for Windows

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
@dlorenc
Copy link
Member

dlorenc commented Jan 8, 2022

Thanks! Nicely done.

@dlorenc dlorenc merged commit 76e691b into sigstore:main Jan 8, 2022
@github-actions github-actions bot added this to the v1.5.0 milestone Jan 8, 2022
mlieberman85 pushed a commit to mlieberman85/cosign that referenced this pull request May 6, 2022
* In getRoot, the metadata is always stored at the top level,
  not under repository/.
* In Initialize, download all metadata and targets. This should
  avoid a disk write on verify.
* Use path instead of filepath for Windows

Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
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.

None yet

3 participants