Repository navigation
fix(upgrade): harden temp dir, download timeouts, checksum match, and update-check opt-out - #1310
Merged
Merged
Conversation
… update-check opt-out Findings from the post-merge cora scan of the commands surface (#1307 thread): - upgrade: replace the predictable shared temp dir (/tmp/uteke-update-{version}, symlink-attack + collision-prone) with a private tempfile::TempDir (random suffix, 0700) that also removes leftovers on every early-return path — the five manual fs::remove_dir_all cleanup lines are gone with it. - upgrade: bound the archive/checksums download client (10s connect, 300s overall) so a stalled connection cannot hang the upgrade. - upgrade: parse_checksum now requires an exact filename match instead of a substring, so a companion artifact (e.g. .sig) can never satisfy the lookup; unit test included. - update_check: the update_check = false opt-out in uteke.toml is now honored on the fresh-cache fast path too — previously it was only checked inside the background thread, so opt-out users still saw the banner whenever the 24h cache was fresh.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
7 tasks done
ajianaz
added a commit
that referenced
this pull request
Oct 5, 2026
* chore(release): v0.19.1 - version bump, changelog, docs sync - Workspace + internal dependency versions 0.19.0 -> 0.19.1 (Cargo.lock synced) - CHANGELOG: [0.19.1] entry - upgrade-path reliability (#1307 via #1308/#1309/#1310), plain /remember explicit-type fix (#1303), committed Hermes plugin package (#1301) - Bundled uteke-memory skill + .agents canonical copy bumped in lockstep - README/README.id current-version line synced * chore(release): regenerate core-contract.json for 0.19.1 docgen embeds the workspace version; the API Docs Fresh gate caught the stale generated artifact. --------- Co-authored-by: ajianaz <[email protected]>
This was referenced Oct 5, 2026
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.
What
Hardening of the
uteke upgrade/ update-check surface from the post-merge cora scan triggered by #1307 (4 findings fixed, all pre-existing, none introduced by #1308/#1309):/tmp/uteke-update-{version}: a local attacker can pre-create that path (or a symlink to it) and clobber files written during extraction. Now a privatetempfile::TempDir(random suffix, 0700). Bonus:TempDircleanup on drop replaces the five scattered manualfs::remove_dir_allcalls, fixing the temp-dir-leak-on-early-return finding too.uteke upgradeforever.parse_checksumrequires an exact filename match so a companion artifact (e.g..sig) can never satisfy the lookup; regression test added.update_check = falseignored on fresh cache (MAJOR, bugs) — the CLI fast path printed the update banner without consulting the config opt-out (only the background-thread path checked it). Opt-out is now respected on every path.Why
Follow-the-loop from #1307/#1308/#1309: post-merge cora scan of
crates/uteke-cli/src/commands+crates/uteke-core/src/update_check.rssurfaced these pre-existing issues in the same surface; fixed before they ship in the next patch release.Testing
cargo clippy -p uteke-core -p uteke-cli --all-features -- -D warnings— cleancargo test -p uteke-cli upgrade::— 6 passed (incl. new exact-match checksum test)cargo test -p uteke-core update_check— 11 passeduteke upgrade -y→[INFO] Already up to date (0.19.0)(resolution path unaffected)replace_binarytests, full-path E2E belongs to the next release QA.