Repository navigation
CI and release hardening: unenforced lockfile, release.sh key exposure, and settings that leave the signing key reachable #145
Copy link
Copy link
Open
Description
Checked against main (894ea12) and the repository settings.
In the repository (fixable by a PR)
Cargo.lockis tracked but not enforced.ci.yml,windows-nsis-smoke.ymland the release build all run cargo without--locked, so a lockfile that has drifted gets re-resolved silently. What CI tests is then not what the lockfile says.- Almost no job has
timeout-minutes. Onlyterminal-workspace.ymlsets one, so a hung step holds a runner for GitHub's 6-hour default. - No concurrency on
release.yml. A tag push and a manual dispatch for the same version race on--clobberuploads to one release, and can pair a.sigwith the wrong file. CI on PRs also keeps running superseded commits. - The
cargo-auditcomment inci.ymlis not true. It says the binary "is built fresh, every run". Without--force,cargo installkeeps a binary already on the runner image, and the Consolidate the four open dependency bumps and clear the npm production audit #128 job log shows "cargo-audit v0.22.2is already installed". - Dependabot has no cooldown. A brand-new release is proposed the moment it is published, and that is the window in which a hijacked package version is live.
scripts/release.shundoes the key isolation thatrelease.ymlhas (Sign updater artifacts in a job where the key only sees the verified signer #108):- line 164 exports
TAURI_SIGNING_PRIVATE_KEYbeforenpx tauri build, so every npm, Vite and build-script step runs with the key in its environment; - lines 208-211 pass the key as
--private-key "$KEY", which any local user can read fromps; - line 252 runs
git add -A, which commits whatever untracked file is lying around, a stray key or.envincluded; - lines 226-241 build Python source by interpolating
$NOTES,$SIGand$VERSIONinto'''…''', so a'''in--notesbreaks out of the string; - lines 180 and 239 use predictable
/tmppaths.
- line 164 exports
scripts/version.shputs an unvalidated version intosed. A/, a&or a GNUeflag in the argument corrupts the files or runs a command. It also never updatesCargo.lock, which breaks--lockedright after a bump.- The main ruleset requires code-owner review, but there is no CODEOWNERS file, so that setting does nothing.
Repository settings (need an admin; not changeable from a PR)
- The updater key is reachable from any push.
TAURI_SIGNING_PRIVATE_KEYis a repository secret with no environment, and no ruleset protectsv*tags.- So anyone with write access, or a leaked token with
workflowscope, can push a tag on an unreviewed commit and get a signed update served throughlatest.json. They can also push a branch whose workflow simply echoes the key. - Suggested: a
releaseenvironment with required reviewers and a deployment policy limited tov*tags, holding bothTAURI_SIGNING_*secrets, withenvironment: releaseon thesignjob. Add a tag ruleset limiting creation, update and deletion ofv*to maintainers.
- Red CI does not block merges.
- The main ruleset has no
required_status_checks. Main has been red since 894ea12 and merges continued. - Suggested: require
rust-check,macos-rust-build,frontend-buildandsecurity-audit.
- The main ruleset has no
- Build jobs can rewrite each other's release assets before
signsigns them.- Every build matrix job has
contents: writeandGITHUB_TOKENin the step where npm, build.rs and Vite code run, andreleaseDraft: falsepublishes unsigned assets before signing finishes. The key cannot be stolen this way, but it can be made to sign a tampered file. - Suggested follow-up: builds publish through
upload-artifactwith digests as job outputs, one job creates a draft release,signverifies digests, and the release is un-drafted only afterSHA256SUMSis uploaded.
- Every build matrix job has
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity