Repository navigation
Scan and sign build zips: vapour scan, vapour verify, signed publish - #19
Merged
Merged
Conversation
publish now scans the zip locally before anything is uploaded (zip bombs, unsafe paths, symlinks, native executables even when renamed, in-browser miners, EICAR) and cancels on any error: no upload, no version used. It then signs the zip's SHA-256 with a local ed25519 key and sends the attestation with the build. vapour scan runs the scan on its own; vapour verify checks a zip against its attestation and, with --remote, against the server's record. The server contract is in docs/zip-verification-api.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.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.
Features
vapour publishscans the zip first. Any error cancels the upload: nothing sent, no version used. No flag to skip it..., absolute, drive letters, backslashes, control chars, duplicates, over-long or too deep.wasmallowed; native extensions~/.config/vapour/signing.key, mode 0600, created on first publish). Written to.vapour/build.zip.attestation.jsonand sent as theattestationpart.vapour scan [zip|folder]: scan on its own,--json, exit 1 on errors.vapour verify [zip]: checks signature, key id, hash and size;--remotecompares with the server's record and requiresverified. Zip optional with--remote.Safe to merge
attestationpart, so publishing keeps working until the API ships.mainauto-releases a CLI patch to all users (vapour update). Add[minor]to a commit subject if this should be v0.2.cmd/publish.go; needs a rebase on whichever lands second.Needs (other repos)
vapour-infra). Contract:docs/zip-verification-api.md.Tests
gofmt,go vet,go test ./... -racepass. New: scanner table tests per finding code, bomb and lying-header cases, signing round trip and tamper cases, key file mode, publish with zero HTTP on bad builds, upload carries a verifiable attestation,verify --remotestatuses, and a deterministic fixture (internal/zipsign/testdata/) for the Rust backend to verify.Not tested against a real API (not deployed).
Built with opencode (GLM and GPT 5.3) from written specs, then reviewed. Fixed in review: limits now match the server, no full decompression of already-rejected entries,
entry_unreadablefinding.🤖 Generated with Claude Code