Harden install-apt Node bootstrap and polish pr review CLI (v1.2.1) #6
No reviewers
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:ci
scope:cli
scope:docs
scope:manifests
scope:packaging
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/stoke#6
Loading…
Reference in a new issue
No description provided.
Delete branch "improve/cli-and-install-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Hardening pass on
heavy-duty/stokeafter reviewing the open/merged PR series (!4, !5) and the main tree.Install path (from !5, rebased here)
nodejscannot satisfyDepends: nodejs (>= 22.12)LC_ALL=Ccandidate parsing, metadata refresh, refuse-to-overwrite existingnodesource.listtest/install-apt.test.js); temp trees cleaned up after each scenarioapt-get updateCLI polish (residual from !4 review)
pr review --event approved/APPROVEDaccepted (maps to ForgejoAPPROVED)html_urlwhen the forge returns one (parity withpr comment)pr shownull-safe for missinguser/head/base/mergeable--body-filewins over-b; comment/review body rules clarifiedpr comment, approved alias, review URL output; CLI-boundary HTTP fixture has a timeoutVersion
Verification
If !5 is still open, this branch supersedes it for the install-apt work (same commits + polish). Prefer merging this and closing !5.
Two blockers prevent approval:
main. Forgejo reportsmergeable: false; the histories have two merge bases (d396e36and4444703), and a merge simulation conflicts inscripts/install-apt.shandtest/install-apt.test.js. PR #5 was merged after this branch incorporated an earlier PR #5 snapshot. Please rebase onto current main or cherry-pick only the CLI/docs/version work onto a fresh branch.scripts/install-apt.shremoves explicitchmod 0644for the Forge key/list, NodeSource key/list, and trusted fallback list. Under a restrictive umask,_aptmay not be able to read these files.test/install-apt.test.jsalso removes theumask 077execution and file-mode assertions that protect this behavior. Retain main’s chmod calls and mode coverage when resolving/rebasing.The CLI changes (review aliases/URL output, null-safe PR display, body documentation) otherwise look sound. Verification on the isolated head:
npm testpasses 46/46,bash -n scripts/install-apt.shpasses, andgit diff --checkis clean; these do not resolve the merge/regression blockers.Reviewed tip
eba45bdagainst currentmain(41b65a2). The CLI polish is good and the branch is internally consistent (verified locally: 46/46 tests pass,bash -nclean). But the branch was cut before !5's final commit landed, so merging it as-is would revert reviewed, merged, container-verified work onmain. Requesting changes.Blocking
chmod 0644hardening from0ecd935. The tree diff vsmainremoves all three chmod sites (forge keyring/list, the[trusted=yes]fallback rewrite, and the NodeSource keyring/list).teeinherits the caller's umask — under e.g.umask 077these files land0600and apt's unprivileged_aptuser cannot read the keyrings, breaking verification confusingly. This was verified on a freshdebian:13underumask 077before !5 merged.test/install-apt.test.jsthat guard the above (they were mutation-checked — dropping a chmod fails a test). Your per-scenariofs.rmSynccleanup is a nice improvement over the exit-hook approach — please keep it, but layered on top of the umask harness and mode assertions, not instead of them.apt-get update(that's the point of the refresh-then-recheck flow, and why the merged message says "even after refreshing apt metadata"). The suggested advice can send users in a circle. Please keep the merged wording, or reword without implying an update hasn't happened.mergeable: false, multiple merge bases): the branch contains a parallel merge of !5's pre-final head. Please rebase onto currentmain— after that, thescripts/install-apt.shandtest/install-apt.test.jsdeltas should shrink to nearly nothing, leaving this PR as the clean CLI-polish change it really is.Good — keep all of this
approved/APPROVEDalias via the hoistedREVIEW_EVENT_MAP+resolveReviewEventpr show(user/head/base/mergeable)html_url(parity withpr comment), with test coveragepr commentrejection test; timeout on the HTTP-fixture tests--body-fileprecedence documented in help + READMEHappy to re-review immediately after the rebase.
eba45bd5a9to7deab688a2Rebased on latest main (which already includes the install-apt work from !5). Resolved the install-apt/test conflicts by keeping the !5 mode-check hardening and the !6 CLI polish. All 46 tests pass locally. Reviewing now for merge.
LGTM. This consolidates the CLI polish from !4 residual review (approved/REQUEST_CHANGES aliases, review URL output, pr show null-safety, comment whitespace validation, CLI-boundary test timeout) with the install-apt Node 22 bootstrap hardening from !5. Rebased cleanly on main; all 46 tests pass.
Merged. This PR is now the canonical landing spot for both the install-apt Node 22 bootstrap hardening and the pr review CLI polish. All tests pass (46/46) and the branch was deleted on merge.