Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Blocker: no. Ship this in the same release as the monitoring agent.
Part of the monitoring agent (contract v0.2.1). Order: #26 → #27 → #28 → #29 → #30, with this issue after #29.
Defect
- The updater and
install.shinstall binaries without an integrity check. - The updater operates as root.
- At this time, only TLS to GitHub protects the download during the transfer.
- With the monitoring agent,
fly updatealso replaces the binary that the agent runs. The agent examines each download (enhancement: Runagent.updateandagent.restartone time only #29), butfly updateandinstall.shdo not.
Cost
- If a person changes a release asset, or if the asset becomes damaged, the servers install it without a warning.
- The damaged or changed binary then operates as root.
Benefit of the fix
- The updater and the installer reject a binary that does not agree with the published checksum.
- Signatures (cosign or minisign) can also show that the binary comes from FlyWP.
Fix
Wait until enhancement(ci): add checks for pull requests and replace the archived release actions #7 publishesDone: ci: run make check on every change and publish releases with gh #25 publisheschecksums.txt.checksums.txt. The monitoring agent contract (v0.2.1) fixes the name and the format: one line for each tarball,<sha256> <file name>.- In
fly update, downloadchecksums.txtfrom the same release. Compare the sha256 of the tarball before the binary is extracted. If they do not agree, stop the update. Use the check code of enhancement: Runagent.updateandagent.restartone time only #29. - In
install.sh, examine the tarball withsha256sum -cagainstchecksums.txt. If they do not agree, stop the installation. - Decide if the releases must also have signatures. This decision can wait.
Why now
fly updateoperates as root and replaces the binary that the agent runs.- This issue waited for enhancement(ci): add checks for pull requests and replace the archived release actions #7. enhancement(ci): add checks for pull requests and replace the archived release actions #7 is done.
Completion checks
-
fly updatestops, and keeps the old binary, when the tarball does not agree withchecksums.txt. -
fly updatestops with a clear error when the release has nochecksums.txt. -
install.shstops when the tarball does not agree withchecksums.txt.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
feat(update): examine release downloads with checksums.txt (#36)
[-]Examine release downloads with checksums[/-][+]enhancement: Examine release downloads with checksums[/+]