-
-
Notifications
You must be signed in to change notification settings - Fork 96
Publishing fails with "Invalid attestations" when triggered by tag push but works when run manually #355
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
Comments
The A workaround could probably be disabling attestations, since that's where I suspect the error is happening. @woodruffw could you help me inspect what's going on here? It looks like a bug/signed data corruption at glance. |
Oh.. Wait! The tag is Still, I don't fully understand what's happening. Perhaps, either Twine or Warehouse misinterpret it in URLs. A bare plus in URLs is often converted to a whitespace. But if there's a series of normalizations somewhere, I can imagine that being lost. |
Yeah - the version string is |
It's likely that something in the attestations/digital signing flow isn't working correctly. But I can't say for sure if it's the signing part of the validation. We'll have to wait to hear from William. |
Thanks for the ping @webknjaz! Looking now. Edit: Triage notes:
|
Okay, I see what's happening here. As part of
We need to check this extension since (unfortunately, IMO) it's the only place GitHub encodes the workflow filename reliably in the OIDC claims, and that's the trust root for Trusted Publishing itself. To check the extension we make sure that it matches the above format by comparing it against various That comparison assumes that TL;DR: This is failing because of a failing comparison that looks like: "https://github.com/object-Object/HexDebug/.github/workflows/release.yml@refs/tags/v0.3.0+1.20.1" == "https://github.com/object-Object/HexDebug/.github/workflows/release.yml@refs/tags/v0.3.0+1.20.1" In terms of fixing this, I need to think a bit (and consult some other Sigstore folks) -- the "simple" thing to do would be to perform the encoding before comparison, but that (1) adds malleability in a critical location and (2) isn't an injective mapping, since there are multiple equivalent HTML entity encodings for a codepoint. STL;DR: @object-Object if you either disable attestations or publish with a tag that doesn't contain |
CC @di @haydentherapper for viz 🙂 |
I'm surprised that the |
We can add some tests under https://github.com/sigstore/fulcio/blob/main/pkg/identity/ciprovider/principal_test.go to figure out where this is happening, if Fulcio is doing HTML encoding or if it's over the wire. Off the top of my head, I can't think of anything within Fulcio that would be HTML encoding strings. We do use the Go template library but I don't think that's the culprit as there's a separate HTML template library. |
Yeah, I was surprised to see it on the Fulcio extension side: FWICT Fulcio uses |
We've found the root cause, it is because we're using |
Hey all, we have rolled out an updated version of Fulcio. Please try to re-sign. |
Sounds like this has been solved. Closing. |
Apologies for the late update, but I can confirm that the issue appears to be solved - I just ran a release of my project IoticBlocks (which uses the same versioning scheme and release process as HexDebug), and the PyPI release job completed successfully when triggered by the tag https://github.com/object-Object/IoticBlocks/actions/runs/14933557836/job/41955613911 |
I have a somewhat convoluted release process for the Python package associated with my project HexDebug, where the Java portion of the project is built and published by a Jenkins job, and then a tag and GitHub release are created by Jenkins using a PAT scoped to the GitHub repo. The tag push then triggers a GitHub Actions workflow (here) which builds and publishes the Python package to PyPI.
I last used this release process on May 28, 2024, and it worked fine then. However, today I attempted to publish a new version and encountered this error message:
Logs (failed run): https://github.com/object-Object/HexDebug/actions/runs/14603021555/job/40965782334
I tried re-running the failed job a few times, which produced the same error. Changing nothing else, I then manually triggered the same workflow on the same commit through the GitHub UI using workflow_dispatch, after which the package was successfully published.
Logs (successful run): https://github.com/object-Object/HexDebug/actions/runs/14603157823/job/40965990286
Here's the publishing configuration on PyPI, if it helps:
The text was updated successfully, but these errors were encountered: