Harden the release path and add community docs - #208
Open
detkin wants to merge 1 commit into
Open
Conversation
install.sh piped into a shell was extracting and installing an archive it never verified. It now downloads the release's checksums.txt, hashes the archive with whichever of sha256sum/shasum the platform has, and refuses to install on a mismatch or when the checksums cannot be fetched. The release workflow also mints a signed build provenance attestation for the published archives, so `gh attestation verify` can tie an artifact to this repo and commit rather than to a hash file published next to it. Other fixes: - The Homebrew formula declared license: MIT while the repository is Apache-2.0. Every published formula has carried the wrong license. - dependabot.yml covered github-actions but not gomod, so Go dependencies never got update PRs. Added, grouped weekly. - claude-pr-review.yml had no fork or missing-secret guard, so every fork PR ran it with empty secrets. Added the guard job; forks and unconfigured repos now skip cleanly, and a missing skills key degrades to a review without skills. - Added SECURITY.md (pointing at private vulnerability reporting), CONTRIBUTING.md, CODE_OF_CONDUCT.md, issue templates, and a PR template. Verified the installer against the real v2.2.8 artifacts: a clean install succeeds and verifies, and a tampered archive is rejected with nothing installed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01McaR57BWnn1YqFGo3NdxES
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
Follow-up from an open-source readiness audit of this repo. Everything here is either a concrete defect or a gap relative to what a public repo with this much traffic should have.
1.
install.shnever verified its downloadThis is the one I'd merge first. The documented install path is a script piped straight into a shell, and it downloaded the release archive, extracted it, and installed the binary to
~/.local/binwithout checking anything. A corrupted mirror, a truncated transfer, or a tampered artifact installed silently.It now fetches the release's
checksums.txt, hashes the archive with whichever ofsha256sum/shasumthe platform provides, and refuses to install on a mismatch — or when the checksums can't be fetched at all, rather than falling back to trusting the download.2. Build provenance attestation
release.ymlnow mints a signed provenance statement for the published archives viaactions/attest-build-provenance, so users can tie an artifact to this repository and commit:Checksums prove the archive matches a hash file published alongside it; attestation proves it came from this build. The job gains
id-token: writeandattestations: writefor this.3. The Homebrew formula declared the wrong license
.goreleaser.ymlhadlicense: MIT. The repository is Apache-2.0. Every formula published through v2.2.8 has toldbrew info sxthe wrong license. One-line fix; takes effect on the next release.4. Dependabot didn't cover Go modules
dependabot.ymlconfiguredgithub-actionsonly, so Go dependencies never received update PRs — they'd only ever surface as security alerts after a CVE landed. Addedgomod, weekly, grouped for minor/patch.5.
claude-pr-review.ymlhad no fork guardEvery fork PR triggered the review with empty secrets. Added the guard job pattern: fork PRs and repos without
ANTHROPIC_API_KEYskip cleanly, and a missingSKILLS_SITE_API_KEYdegrades to a review without installed skills instead of failing.6. Community docs
Added
SECURITY.md,CONTRIBUTING.md,CODE_OF_CONDUCT.md, issue templates, and a PR template — none existed.SECURITY.mdpoints at GitHub private vulnerability reporting (now enabled), so there's a private channel for reports.Testing
make prepush— green, all 44 packages pass.bash -n install.sh— syntax clean.v2.2.8release: downloaded the actual archive andchecksums.txt, confirmed the grep/awk extraction matches goreleaser's format, and ran the full script end to end — installs and reports✓ Checksum verified, thensx --versionworks.Notes
Applied alongside this, via the API rather than in the diff:
writereadmainTestrequiredDropping the default workflow token to
readis safe:release.yml,app-release.yml,pages.yml, andclaude-pr-review.ymleach declare their ownpermissions:block, andtest.ymlneeds nothing beyond read. Worth watching the next release run to confirm.SECURITY.mdreferences attestation as available "from v2.2.9 onward" — accurate if this merges before the next tag, worth a tweak if it doesn't.