Release CI attests every file (SLSA provenance through Sigstore, v0.1.3891 on). The updater now fetches the bundle for a file's signed SHA-256 from api.github.com/repos/yetone/magpie-releases/attestations/sha256:<digest> before it downloads the file, and verifies it with sigstore-go against the Sigstore trusted root embedded in the binary (attest_root.json, public good instance): certificate chain, certificate timestamp, Rekor entry, issuer token.actions.githubusercontent.com, subject release.yml of yetone/magpie-releases on main or a v* tag, source repository yetone/magpie-releases, and the digest among the statement's subjects. It is in addition to the ed25519 check over SHA256SUMS, which still runs first and still works offline and from the R2 mirror; the attestation is asked about the digest that signed list gives, so both speak of the same bytes. When the attestation can't be had (a failed read means "unknown", but an outage of GitHub must not take updates away): - a bundle that is there and fails (signature, identity, digest, a chain outside the trusted root), GitHub answering 404, or an empty list: the file is refused. GitHub was asked and says these bytes weren't built by that workflow. - GitHub unreachable, rate limited (60/hour anonymously), 5xx, a body that isn't JSON, or Settings' update source set to the site alone (which never goes to GitHub): the update goes on, since the ed25519 check has held, and the log says the file went unattested and why. Someone who can only drop the API call downgrades an update to the ed25519 check, never below it. - releases before 0.1.3891 and a MAGPIE_UPDATE_FEED of your own are not asked. The bundle checks itself, so the API call goes through source.Do and may use a mirror. Cost: go.mod gains sigstore-go v1.1.4 and its tree (go.sum +350 lines). The embedded root has to be renewed (gh attestation trusted-root, first line) when Sigstore rotates its keys; docs/reference.md says so. Until then a chain under a new key fails as "not attested" and is refused: a known cost, in the doc. Run (mote, sandbox HOME via testenv): go test ./internal/update (ok), site node tests (112 of 114; docker-tags and the sponsors README test fail because mote-run -C site cannot see ../README.md, unrelated), gofmt -l empty, go vet darwin, GOOS=linux -tags nogui and GOOS=windows on internal/update, go build ./... on all three. Fixture: the real answer api.github.com gave for v0.1.3925's SHA256SUMS (testdata/attest), verified offline; the whole run reaches no network. New tests: TestAttestationOfARealBundleHolds, ...OfAnotherDigestRefused, ...TamperedRefused, ...EditedPayloadRefused, ...WrongIdentityRefused (repo, workflow, ref, source repo, issuer each), ...NoneListedRefused, ...UnknownGoesOnAndSaysSo (403, 429, 502, HTML, nothing listening), ...OnlyWhereItIsOwed, TestVerifyMarksAttestedReleases, TestDownloadRefusedWithoutAttestation. Broken by hand: identity check swapped for WithoutIdentitiesUnsafe turns WrongIdentityRefused red on all five cases; the attestedFile call removed from download turns DownloadRefusedWithoutAttestation red (the file was fetched). The first full run of the package, before TestMain pointed the attestation API at a closed port, had TestSourceSiteAndAutomaticUseTheSite reach the real GitHub with a made-up digest and be refused: now closed. Not tried: a real update end to end (needs a release newer than the running binary; the unit path covers download), Windows box, the GUI, full suite (starts after the tag). Docs: docs/reference.md, start.html (en, zh, ja) and llms-full.txt say what the app checks now.
129 lines
6.0 KiB
AMPL
129 lines
6.0 KiB
AMPL
module github.com/yetone/magpie
|
|
|
|
go 1.26.8
|
|
|
|
require (
|
|
github.com/MoeForge/moejs v0.1.0
|
|
github.com/charmbracelet/bubbles v0.21.1
|
|
github.com/charmbracelet/bubbletea v1.3.10
|
|
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834
|
|
github.com/clipperhouse/uax29/v2 v2.5.0
|
|
github.com/coder/websocket v1.8.14
|
|
github.com/dlclark/regexp2 v1.11.5
|
|
github.com/fsnotify/fsnotify v1.9.0
|
|
github.com/gen2brain/h265 v0.2.4
|
|
github.com/go-ole/go-ole v1.3.0
|
|
github.com/godbus/dbus/v5 v5.2.2
|
|
github.com/google/uuid v1.6.0
|
|
github.com/klauspost/compress v1.18.3
|
|
github.com/pelletier/go-toml/v2 v2.2.4
|
|
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3
|
|
github.com/sigstore/sigstore-go v1.1.4
|
|
github.com/tidwall/gjson v1.19.0
|
|
github.com/tidwall/jsonc v0.3.3
|
|
github.com/wailsapp/wails/v3 v3.0.0-beta.24
|
|
golang.org/x/image v0.43.0
|
|
golang.org/x/net v0.56.0
|
|
golang.org/x/sys v0.49.0
|
|
golang.org/x/term v0.44.0
|
|
golang.org/x/text v0.39.0
|
|
gopkg.in/yaml.v3 v3.0.1
|
|
modernc.org/libc v1.79.0
|
|
modernc.org/sqlite v1.61.0
|
|
)
|
|
|
|
require (
|
|
git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3 // indirect
|
|
github.com/MoeForge/moego v0.1.0-alpha.1 // indirect
|
|
github.com/adrg/xdg v0.5.3 // indirect
|
|
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
|
github.com/atotto/clipboard v0.1.4 // indirect
|
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
|
github.com/blang/semver v3.5.1+incompatible // indirect
|
|
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
|
github.com/charmbracelet/colorprofile v0.4.1 // indirect
|
|
github.com/charmbracelet/x/ansi v0.11.5 // indirect
|
|
github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
|
|
github.com/charmbracelet/x/term v0.2.2 // indirect
|
|
github.com/clipperhouse/displaywidth v0.9.0 // indirect
|
|
github.com/clipperhouse/stringish v0.1.1 // indirect
|
|
github.com/cyberphone/json-canonicalization v0.0.0-20241213102144-19d51d7fe467 // indirect
|
|
github.com/digitorus/pkcs7 v0.0.0-20230818184609-3a137a874352 // indirect
|
|
github.com/digitorus/timestamp v0.0.0-20231217203849-220c5c2851b7 // indirect
|
|
github.com/dustin/go-humanize v1.1.0 // indirect
|
|
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
|
|
github.com/go-logr/logr v1.4.3 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/go-openapi/analysis v0.24.1 // indirect
|
|
github.com/go-openapi/errors v0.22.4 // indirect
|
|
github.com/go-openapi/jsonpointer v0.22.1 // indirect
|
|
github.com/go-openapi/jsonreference v0.21.3 // indirect
|
|
github.com/go-openapi/loads v0.23.2 // indirect
|
|
github.com/go-openapi/runtime v0.29.2 // indirect
|
|
github.com/go-openapi/spec v0.22.1 // indirect
|
|
github.com/go-openapi/strfmt v0.25.0 // indirect
|
|
github.com/go-openapi/swag v0.25.4 // indirect
|
|
github.com/go-openapi/swag/cmdutils v0.25.4 // indirect
|
|
github.com/go-openapi/swag/conv v0.25.4 // indirect
|
|
github.com/go-openapi/swag/fileutils v0.25.4 // indirect
|
|
github.com/go-openapi/swag/jsonname v0.25.4 // indirect
|
|
github.com/go-openapi/swag/jsonutils v0.25.4 // indirect
|
|
github.com/go-openapi/swag/loading v0.25.4 // indirect
|
|
github.com/go-openapi/swag/mangling v0.25.4 // indirect
|
|
github.com/go-openapi/swag/netutils v0.25.4 // indirect
|
|
github.com/go-openapi/swag/stringutils v0.25.4 // indirect
|
|
github.com/go-openapi/swag/typeutils v0.25.4 // indirect
|
|
github.com/go-openapi/swag/yamlutils v0.25.4 // indirect
|
|
github.com/go-openapi/validate v0.25.1 // indirect
|
|
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
|
github.com/google/certificate-transparency-go v1.3.2 // indirect
|
|
github.com/google/go-containerregistry v0.20.7 // indirect
|
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
|
|
github.com/in-toto/attestation v1.1.2 // indirect
|
|
github.com/in-toto/in-toto-golang v0.9.0 // indirect
|
|
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
|
|
github.com/mattn/go-colorable v0.1.14 // indirect
|
|
github.com/mattn/go-isatty v0.0.24 // indirect
|
|
github.com/mattn/go-localereader v0.0.1 // indirect
|
|
github.com/mattn/go-runewidth v0.0.19 // indirect
|
|
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
|
|
github.com/muesli/cancelreader v0.2.2 // indirect
|
|
github.com/muesli/termenv v0.16.0 // indirect
|
|
github.com/ncruces/go-strftime v1.1.0 // indirect
|
|
github.com/oklog/ulid v1.3.1 // indirect
|
|
github.com/opencontainers/go-digest v1.0.0 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
|
github.com/rivo/uniseg v0.4.7 // indirect
|
|
github.com/secure-systems-lab/go-securesystemslib v0.9.1 // indirect
|
|
github.com/shibumi/go-pathspec v1.3.0 // indirect
|
|
github.com/sigstore/protobuf-specs v0.5.0 // indirect
|
|
github.com/sigstore/rekor v1.4.3 // indirect
|
|
github.com/sigstore/rekor-tiles/v2 v2.0.1 // indirect
|
|
github.com/sigstore/sigstore v1.10.0 // indirect
|
|
github.com/sigstore/timestamp-authority/v2 v2.0.3 // indirect
|
|
github.com/theupdateframework/go-tuf/v2 v2.3.0 // indirect
|
|
github.com/tidwall/match v1.1.1 // indirect
|
|
github.com/tidwall/pretty v1.2.0 // indirect
|
|
github.com/transparency-dev/formats v0.0.0-20251017110053-404c0d5b696c // indirect
|
|
github.com/transparency-dev/merkle v0.0.2 // indirect
|
|
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
|
go.mongodb.org/mongo-driver v1.17.6 // indirect
|
|
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
|
go.opentelemetry.io/otel v1.38.0 // indirect
|
|
go.opentelemetry.io/otel/metric v1.38.0 // indirect
|
|
go.opentelemetry.io/otel/trace v1.38.0 // indirect
|
|
go.yaml.in/yaml/v3 v3.0.5 // indirect
|
|
golang.org/x/crypto v0.53.0 // indirect
|
|
golang.org/x/mod v0.42.0 // indirect
|
|
golang.org/x/sync v0.24.0 // indirect
|
|
google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 // indirect
|
|
google.golang.org/grpc v1.76.0 // indirect
|
|
google.golang.org/protobuf v1.36.10 // indirect
|
|
modernc.org/mathutil v1.7.1 // indirect
|
|
modernc.org/memory v1.12.1 // indirect
|
|
)
|
|
|
|
replace github.com/santhosh-tekuri/jsonschema/v6 => ./third_party/jsonschema
|