Repository navigation
fix(update): validate release assets before download - #11
Merged
Merged
Conversation
Reject release assets whose digest is missing or blank so self-update never installs an unverified archive. Add a regression test that ensures apply aborts before replacing the binary when the release metadata omits a usable digest. Closes #7 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Promote release-asset validation into the shared selection path used by update check and update apply. Require a valid sha256 digest before an asset is considered installable, verify downloads against the parsed digest, and restrict update redirects to trusted GitHub hosts. Also document the stricter secure-update contract and expand tests for missing digests and redirect policy. Closes #10 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
After uploading tagged release artifacts, query the GitHub release API and ensure each published asset exposes the expected sha256 digest. This keeps the release workflow aligned with the updater's runtime security contract and fails the release if digest metadata is missing or mismatched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Combine same-type parameters in verifyAssetDigest so golangci-lint passes under the local Go 1.26 toolchain. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gm update checkorgm update applytreats it as installableValidation
YAML.load_filegolangci-lintis not configured via asdf: "No version is set for command golangci-lint"; this was already failing before the refactor)Closes #7
Closes #10