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

Breaking change: attach signature and attach sbom must use STDIN to upload raw string #2637

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

mozillazg
Copy link
Contributor

Fixed #1307

Summary

Release Note

  • attach signature --signature=<signature> no longer uploads literal filepath if the file <signature> does not exist
  • attach sbom --sbom=<sbom> no longer uploads literal filepath if the file <sbom> does not exist
  • To upload raw string, you should use STDIN and --signature=-/--sbom=-:
echo $SIGNATURE | cosign attach signature --signature=- $IMAGE_DIGEST
echo $SBOM | cosign attach sbom --sbom=- $IMAGE_DIGEST

Documentation

@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2023

Codecov Report

Merging #2637 (cad8d45) into main (29360f6) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main    #2637   +/-   ##
=======================================
  Coverage   30.03%   30.03%           
=======================================
  Files         146      146           
  Lines        9283     9283           
=======================================
  Hits         2788     2788           
  Misses       6065     6065           
  Partials      430      430           
Impacted Files Coverage Δ
cmd/cosign/cli/options/attach.go 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

* attach signature --signature=/path/to/signature no longer uploads literal filepath if file does not exist
* attach sbom --sbom=/path/to/sbom no longer uploads literal filepath if file does not exist

To upload raw string, you shoud using STDIN and --signature=- / --sbom=-

echo $SIGNATURE | cosign attach signature --signature=- $IMAGE_DIGEST
echo $SBOM | cosign attach sbom --sbom=- $IMAGE_DIGEST

Signed-off-by: mozillazg <[email protected]>
Copy link
Contributor

@znewman01 znewman01 left a comment

Choose a reason for hiding this comment

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

Nice, thanks for this change.

@mozillazg
Copy link
Contributor Author

@znewman01 Anything I can help with to get this PR merged?

@znewman01
Copy link
Contributor

@znewman01 Anything I can help with to get this PR merged?

Sorry about that! I think I was waiting on CI to pass and then lost track of this PR.

Feel free to ping after a couple days in the future if you're waiting on me

@znewman01 znewman01 merged commit 81fb9f2 into sigstore:main Feb 13, 2023
@github-actions github-actions bot added this to the v1.14.0 milestone Feb 13, 2023
dmitris pushed a commit to dmitris/cosign that referenced this pull request Mar 24, 2023
…igstore#2637)

* attach signature --signature=/path/to/signature no longer uploads literal filepath if file does not exist
* attach sbom --sbom=/path/to/sbom no longer uploads literal filepath if file does not exist

To upload raw string, you shoud using STDIN and --signature=- / --sbom=-

echo $SIGNATURE | cosign attach signature --signature=- $IMAGE_DIGEST
echo $SBOM | cosign attach sbom --sbom=- $IMAGE_DIGEST

Signed-off-by: mozillazg <[email protected]>
znewman01 added a commit to znewman01/sigstore-docs that referenced this pull request Apr 28, 2023
This makes it much easier to follow along at home.

Also:

- deleted a few output lines (we were showing them inconsistently)
- deleted `cosign attach signature --signature Qr883oPO...` (passing the
  signature directly) because that doesn't work any more:
  sigstore/cosign#2637

Signed-off-by: Zachary Newman <[email protected]>
znewman01 added a commit to znewman01/sigstore-docs that referenced this pull request Apr 28, 2023
This makes it much easier to follow along at home.

Also:

- deleted a few output lines (we were showing them inconsistently)
- deleted `cosign attach signature --signature Qr883oPO...` (passing the
  signature directly) because that doesn't work any more:
  sigstore/cosign#2637

Signed-off-by: Zachary Newman <[email protected]>
ltagliaferri pushed a commit to sigstore/docs that referenced this pull request Apr 29, 2023
This makes it much easier to follow along at home.

Also:

- deleted a few output lines (we were showing them inconsistently)
- deleted `cosign attach signature --signature Qr883oPO...` (passing the
  signature directly) because that doesn't work any more:
  sigstore/cosign#2637

Signed-off-by: Zachary Newman <[email protected]>
ltagliaferri added a commit to sigstore/docs that referenced this pull request Apr 29, 2023
* Use ttl.sh for signing_with_containers.md examples.

This makes it much easier to follow along at home.

Also:

- deleted a few output lines (we were showing them inconsistently)
- deleted `cosign attach signature --signature Qr883oPO...` (passing the
  signature directly) because that doesn't work any more:
  sigstore/cosign#2637

Signed-off-by: Zachary Newman <[email protected]>

* Fix "Sign and upload a generated payload" example

Signed-off-by: Zachary Newman <[email protected]>

---------

Signed-off-by: Zachary Newman <[email protected]>
Signed-off-by: ltagliaferri <[email protected]>
Co-authored-by: ltagliaferri <[email protected]>
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.

Attaching SBOMs "--sbom" flag uploads literal filepath if file does not exist
3 participants