Repository navigation
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hanthor The full list of commands accepted by this bot can be found here. Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@hanthor this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (5 waiting): fixes are handed out before new work as soon as you have capacity. |
Danathar
left a comment
There was a problem hiding this comment.
Stand-in review (the hive's reviewers are out of quota). Approving; don't merge until utah-packages#1147 publishes sudo-rs and uutils-coreutils. The red contract is only check-repos on packages not in the stack's old pin 523507b8; rebase onto #1248/#1309. Checked against the sudo-rs 0.2.15 source and Fedora's sudo package. /usr/bin/sudo and sudoedit become links to the setuid sudo-rs (the build fails unless test -u passes and the link resolves), and C sudo stays for /etc/pam.d/sudo, sudo-i, /etc/sudoers and sudoers.d. Fedora's default sudoers, #includedir, Common's 001-bootc and the linuxbrew secure_path drop-in all parse, and a bad sudoers line drops only that rule. Every flag Utah, Common and the testsuite use is supported (-E, --preserve-env=, -A, -i, -n, -S, -p '', -u). uutils sits beside GNU coreutils with no Obsoletes, so GNU-only flags can't regress. Non-blocking:
- Add
/etc/pam.d/sudo-ito the contract, since the factory sudo-rs is built withpam-loginand uses it forsudo -i. - #1229's decision says "adopt" uutils, and this installs it beside GNU (documented in
sudo-rs-uutils.md); worth confirming that's the intent. - Rawhide's sudo-rs ships
su-rssetuid and unused; consider dropping the bit. - The testsuite's
sudo_rs.featureis@dakota_only. If retagged for the Dakota family, itsstat -c '%a' /usr/bin/sudoexpects 4755, but this layout gives 777 (the link) or 4111 (the target).
Not boot-tested, and fingerprint plus sudo-rs wasn't exercised.
There was a problem hiding this comment.
Summary: This change makes Utah's sudo command (the tool that lets an admin run things as root) use a newer memory-safe rewrite, and adds a memory-safe rewrite of the basic file commands next to the existing ones, so Utah matches its sister image Dakota. The build wiring and its test look right. One thing the original request asked for hasn't been done yet: checking that sudo works on a real booted system. There's also a small security cleanup to consider.
What I need from you: Before merging, boot a built image and confirm that sudo and sudoedit work, then decide on the su-rs note below.
intent-alignment
- The booted-system check from the issue is still open (medium, in-scope). The issue (#1229) says: "verify PAM config and
sudoalternatives on bootc." The PR checked alternatives by reading the factory recipe. But its Verification section says "No image was built", so nobody has run the PAM side yet. Everything that gets asserted is file presence (contracts/bluefin-desktop.toml:173-181) or link targets (scripts/configure-services.sh:454-457). Nothing runssudothrough/etc/pam.d/sudo. I checked the parser side myself: sudo-rs 0.2.15 explicitly ignores the Fedora-styleDefaults(always_set_home,match_group_by_gid,always_query_group_plugin,visiblepw), persrc/defaults/mod.rs:31-41upstream. So the stock sudoers file shouldn't be the problem. The remaining risk is runtime, on a booted image. Once the factory packages publish, please run something like this on a booted image and record it under Verification:sudo true && sudo -i true && sudo -l && SUDO_EDITOR=true sudoedit /etc/hostname ls -l /usr/bin/sudo /usr/bin/sudoedit; ls -Z /usr/bin/sudo-rs
security
su-rsadds a setuid-root binary that nothing uses (low, in-scope). The factory spec installs%attr(4755, root, root) %{_bindir}/su-rs(utah-packagespackages/sudo-rs/sudo-rs.spec:61). This PR links onlysudoandsudoedit, andsustays util-linux's (scripts/configure-services.sh:450). That leaves a second setuid su that any user can run. Dakota doesn't ship it:elements/bluefin/sudo-rs.bstinstalls onlysudoandsudoedit. One option is to drop the setuid bit at build time (rpm -V sudo-rswill then report the mode change, which the new reference doc already accepts forsudo):Not a blocker. Leaving it as is would also be reasonable, as long as that's a deliberate choice.test -u /usr/bin/sudo-rs ln -sfn sudo-rs /usr/bin/sudo ln -sfn sudo-rs /usr/bin/sudoedit [ "$(readlink /usr/bin/sudo)" = sudo-rs ] +# Dakota ships no su-rs; su stays util-linux's, so don't leave a spare setuid su. +chmod u-s /usr/bin/su-rs
Limits of this review: I read the diff, the script's set -eoux pipefail (scripts/configure-services.sh:7), the test harness's path rewrite (tests/test_flathub_descriptor.py:57-61), both factory specs and Dakota's sudo-rs.bst. I didn't build or boot an image, and I didn't run the tests.
No findings from: correctness, style, docs-currency.
Confidence: 3/5 (needs attention) — 1 medium finding; 1 perspective requested changes
— hive: agent=reviewer-2 backend=claude model=claude-opus-5-5 effort=medium claude=2.1.325
There was a problem hiding this comment.
HUMAN DECISION NEEDED - @hanthor: the latest push makes the memory-safe sudo replacement the system sudo again, although your security review on 2026-11-18 held it back. Ship it now, or restore the version that held it back?
Summary: This pull request was meant to add a Rust rewrite of the basic command-line tools next to the standard ones, and to hold back the Rust rewrite of sudo (the command that grants admin rights). The latest push does the opposite. It replaces the standard tools outright, and it makes the Rust sudo the real sudo for every user. The author's own security review listed three reasons not to do that yet, and this push does not resolve two of them.
What I need from you: Choose one. Restore the reviewed version (Rust tools beside the standard ones, sudo unchanged). Or keep this version, then update the title and description and close the remaining blockers first.
I read head 77e33e3. It is one commit, feat(cli): uutils as coreutils and sudo-rs as sudo, as on Dakota, rebased onto main. Most of the 146-file compare from d519d4f is base churn from that rebase.
security / intent-alignment
scripts/configure-services.sh:366hard-links the setuidsudo-rsover/usr/bin/sudo.packages/utah.toml:469and:1071installsudo-rs, andcontracts/bluefin-desktop.toml:189asserts it. The PR title says "defer sudo-rs". The top note says "this PR installs uutils-coreutils only". The 2026-11-18 security comment kept sudo-rs out (ee1afe8) for three reasons:- Not boot-tested. This is still open. The PR's Verification section says "No image was built".
- Confined SELinux users. This is partly addressed. The build now checks for
sudo_exec_t(configure-services.sh:372-374), butROLE=/TYPE=are still unsupported (doc lines 55-57). - Sudoers migration check. This is still open. The doc only tells users to run
visudo-rs -cby hand.
packages/utah.toml[swap]now replacescoreutils-singlewithuutils-coreutils-replace. Every later build step and every script on the booted system then runs uutils. The PR body says the opposite: "Overwriting them would also leave the RPM database wrong… Utah therefore exposes uutils… beside". The commit also saysCloses #1229, but the body says "Refs #1229 (stays open for sudo-rs)".- Previous finding (description says sudo-rs is installed as sudo): still present, reversed. The body's "What changed" section and the code now say sudo-rs is
sudo. The title and the top note say it is deferred. The body also says sudo-rs isbin_t, but the new doc (sudo-rs-uutils.md:49) and the build gate saysudo_exec_t.
Fix if the push was accidental: reset the branch to the reviewed ee1afe8 content, rebased. Fix if it was intentional: retitle the PR, rewrite the body, change the commit's Closes #1229 to match, attach the booted-image evidence, and add the sudoers check.
No findings from: correctness, style.
Confidence: 1/5 (needs attention) — 2 high findings
-- hive: agent=reviewer backend=claude model=claude-opus-5-5 effort=medium claude=2.1.327
|
|
||
| The contract asserts `uutils-coreutils`, `uutils-ls`, `uu_ls`, `env`, | ||
| `sudo-rs`, C sudo's PAM stacks and `/etc/sudoers`. The local image build | ||
| behind #1305 recorded the checks below. |
There was a problem hiding this comment.
docs-currency: The Evidence section ends with "The local image build behind #1305 recorded the checks below." Nothing follows it. The PR's Verification section also says "No image was built". Either paste the recorded checks from a real image build, or remove the claim:
| behind #1305 recorded the checks below. | |
| behind #1305 has not been run yet; the checks are recorded here once it has. |
There was a problem hiding this comment.
HUMAN DECISION NEEDED - @hanthor: are the three sudo-rs blockers from your 18 Nov security review resolved, so the Rust sudo can replace the system sudo now?
Summary: This change makes the system's basic command-line tools (the Rust rewrite called uutils) and its admin-rights tool, sudo (replaced by the Rust rewrite sudo-rs), match Dakota, the sister desktop image. The latest push only adds the test evidence that the explanatory notes promised. The tool swap itself looks sound. Two days ago, though, the author paused the sudo part for three security reasons, and this version turns it back on without fixing two of them.
What I need from you: Confirm that the sudo swap ships now with those gaps, or put the pause back.
Reviewed head 880220343c. Delta since 77e33e39: docs/skills/desktop-contract/references/sudo-rs-uutils.md only (+29).
Earlier findings, checked again at this head
- docs-currency, "Evidence section promises checks that are not there": fixed. Lines 67–94 now list the factory, image-build and finished-image checks.
- intent-alignment, "head contradicts PR title": no longer applies. The title now says sudo-rs as sudo. The head does the same (
scripts/configure-services.sh:366). This matches the owner decision on #1229: "Adopt sudo-rs assudoand uutils-coreutils once the factory builds them; keep C sudo's PAM and sudoers files as Dakota does." - security, "Rust sudo replaces /usr/bin/sudo despite the author's deferral": still present. Details are in the inline thread on
scripts/configure-services.sh:366. Thesudo_exec_tlabel part of blocker 2 is now resolved:configure-services.sh:372-374fails the build unless both paths carry that label. Blockers 1 and 3 remain open, and so does theROLE=/TYPE=half of blocker 2.
The low-severity docs note is in the inline thread on line 20 of the reference doc.
I could not test a booted image. Nothing at this head shows sudo -i or sudoedit running through PAM on a booted system.
No findings from: correctness, intent-alignment, style.
Confidence: 3/5 (needs attention) — 1 high finding
-- hive: agent=reviewer backend=claude model=claude-opus-5-5 effort=medium claude=2.1.327
| # Dakota. Fedora's policy labels both paths sudo_exec_t, so the SELinux | ||
| # domain transition matches C sudo's; fail the build if that ever changes. | ||
| test -u /usr/bin/sudo-rs | ||
| ln -f /usr/bin/sudo-rs /usr/bin/sudo |
There was a problem hiding this comment.
security (still present, in-scope): This line makes sudo-rs the system /usr/bin/sudo. In the 18 Nov security review on this PR, the author called this "not yet" and named three blockers. At this head:
- Booted-image test of
sudo,sudo -i,sudoeditthrough/etc/pam.d/sudoandsudo-i: not shown. The reference doc's evidence (sudo-rs-uutils.md:85-94) listssudo -u nobody id -unandvisudo-rs -con the finished image. It does not listsudo -i,sudoedit, or a booted system. The PR body's last section does not claim a boot test. - Confined SELinux users: partly resolved. Lines 372-374 now enforce
sudo_exec_t. Butsudo-rs-uutils.md:55-57confirms that astaff_uuser whose sudoers rule usesROLE=/TYPE=gets a parse error instead ofsysadm_r. Such a user can lose admin access after rebasing. - sudoers.d migration check: not added.
sudo-rs-uutils.md:58-59tells users to runvisudo-rs -cby hand. The review asked for a check that reports unsupported lines before the switch.
The owner decision on #1229 supports the swap, so this is not a scope problem. It is a call on the security risk, and the author must make it. There are two options:
- Ship now. Reply here that blockers 1-3 are accepted, and add booted-image evidence for
sudo -iandsudoeditto the doc. - Defer again, as in ee1afe8. Keep uutils and drop the sudo swap:
-test -u /usr/bin/sudo-rs
-ln -f /usr/bin/sudo-rs /usr/bin/sudo
-# Not `-ef`: overlayfs, which container builds run on, reports a different
-# inode for each name of a hard link to a lower-layer file.
-test -u /usr/bin/sudo
-cmp -s /usr/bin/sudo /usr/bin/sudo-rs
-[ "$(readlink /usr/bin/sudoedit)" = sudo ]
-for path in /usr/bin/sudo /usr/bin/sudo-rs; do
- [ "$(matchpathcon -n "${path}")" = system_u:object_r:sudo_exec_t:s0 ]
-done(Also revert the matching contract, test and doc text.)
| transaction `dnf5 do --action=install … --action=remove coreutils-single`, | ||
| so everything that requires `coreutils` stays satisfied and the RPM database | ||
| owns every path. `rpm -qf /usr/bin/ls` names the replacement. | ||
| - **Kept off uutils.** `kill` and `uptime` stay procps-ng's and util-linux's, |
There was a problem hiding this comment.
docs-currency (low): This line pairs the commands with the wrong packages. It reads as kill = procps-ng and uptime = util-linux. The new evidence at lines 92-93 says the reverse: "kill and more stay util-linux's, uptime procps-ng's".
| - **Kept off uutils.** `kill` and `uptime` stay procps-ng's and util-linux's, | |
| - **Kept off uutils.** `kill` and `more` stay util-linux's, `uptime` stays | |
| procps-ng's, and `hostname` stays the hostname package's. |
Dakota overwrites GNU coreutils with uutils (except kill, uptime and env) and C sudo's /usr/bin/sudo and sudoedit with sudo-rs, keeping C sudo staged for its PAM stacks and sudoers. - uutils: the factory's uutils-coreutils-replace links GNU coreutils' names to uutils, adds Dakota's uutils-<prog> names, provides coreutils = 9.12 and conflicts with coreutils-single; gnu-env keeps /usr/bin/env GNU's for pkexec. A new [swap] table in packages/utah.toml makes the package transaction `dnf5 do --action=install ... --action=remove coreutils-single`, and install-packages.py fails the build if the base package survives. --check rejects a swap outside the install set. - sudo-rs: configure-services.sh hard-links /usr/bin/sudo to the setuid sudo-rs; C sudo's sudoedit link follows it. C sudo stays for /etc/pam.d/sudo, sudo-i and sudoers. Fedora's policy already labels /usr/bin/sudo-rs sudo_exec_t, so the domain transition matches C sudo's; the build checks both paths with matchpathcon, and checks the link with test -u and cmp because overlayfs gives each hard-link name its own inode. su-rs loses its unused setuid bit. - Contract, triage, docs (sudo-rs-uutils.md, package-contract.md) and tests. Closes #1229 Assisted-by: Claude Opus via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: Claude Opus via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Decision needed: @castrojo should sign off on replacing the setuid-root /usr/bin/sudo with a hard link to sudo-rs (C sudo kept for PAM and sudoers) before this lands.
No code defect found at cb42f31. I am routing this for a human signature because it swaps the setuid-root sudo binary, which is an auth surface.
Intent is already decided. Per #1229, the owner decision (2026-11-16) was to adopt sudo-rs as sudo and uutils-coreutils, keeping C sudo's PAM and sudoers files as Dakota does. This PR does that. The open question is only the security sign-off on the swap itself.
What I checked against the tree:
scripts/configure-services.sh(new block after thePASSWD_PAMsection) runs underset -eoux pipefail. Every assertion fails the build:test -uon both paths,cmp -sfor the link (-efis avoided because of overlayfs), thesudoedit -> sudolink, andmatchpathconequal tosudo_exec_tfor both paths. So a later policy or package change that breaks the label or link stops the build. It cannot ship a non-setuid or mislabelled sudo.scripts/install-packages.py:installed()(line 199) usesrpm -qa <names>and returns only names that are installed. On a base withoutcoreutils-single,removalsis empty andtransaction()falls back to a plaininstall. The post-installleftcheck fails the build if the swapped package survives.--checkrejects a[swap]whose replacement is missing from the install set, or whose removed package is in it.[swap]sits before[unavailable]inpackages/utah.toml.swaps()reads it with.get("swap", {}), so manifests without the table are unaffected.
Things a reviewer should know before signing:
rpm -V sudowill always report/usr/bin/sudomodified on the image. The PR body notes this. Any integrity tooling that runsrpm -Vawill flag it.visudoandsustay C sudo's and util-linux's.su-rsloses its setuid bit.
Merge state: GitHub reports this as CONFLICTING with main. It needs a rebase. Per the PR body, it also needs the factory pin that publishes uutils-coreutils-replace and gnu-env before the contract job can go green.
Confidence: 3/5 (needs attention) — 1 medium finding; 1 perspective requires a human decision
-- hive: agent=reviewer backend=claude model=claude-opus-5-5 effort=medium claude=2.1.327
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from HUMAN DECISION NEEDED — Summary: This change makes the system use Rust rewrites of its basic command-line tools and of What I need from you: Sign off on (or decline) the Re-review of head Earlier findings at this head
-- **Kept off uutils.** `kill` and `uptime` stay procps-ng's and util-linux's,
+- **Kept off uutils.** `kill` and `uptime` stay util-linux's and procps-ng's,Merge state (advisory). GitHub reports the PR as No findings from: correctness, intent-alignment, style. Findings not on a changed line
|
Dakota overwrites GNU coreutils with uutils (
elements/bluefin/uutils-coreutils.bst) and C sudo's/usr/bin/sudowith sudo-rs (elements/bluefin/sudo-rs.bst). Utah now does both.What changes
uutils-coreutils-replace(feat(uutils-coreutils): add uutils-coreutils-replace and gnu-env, as Dakota ships uutils utah-packages#1234) links GNU coreutils' names to uutils and adds Dakota'suutils-<prog>names. It providescoreutils = 9.12and conflicts withcoreutils-single. A new[swap]table inpackages/utah.tomlturns the package transaction intodnf5 do --action=install … --action=remove coreutils-single.install-packages.pyfails the build ifcoreutils-singlesurvives, and--checkrejects a swap outside the install set.envstays GNU. pkexec realpath()s its target, and the multicall binary dispatches on the path it was run as, so a symlinkedenvbreakspkexec -u <user> /usr/bin/env, which uupd runs. This is Dakota's reason too.gnu-envbuildsenvalone from GNU coreutils 9.12.kill,uptime,hostnameandmorekeep their current packages.configure-services.shhard-links/usr/bin/sudoto the setuidsudo-rs, and C sudo'ssudoedit -> sudolink follows it. C sudo stays installed for/etc/pam.d/sudo,sudo-iand sudoers. The build fails unless both paths labelsudo_exec_t. It checks the link withtest -upluscmp, not-ef, because overlayfs reports a different inode for each name of a hard link.su-rsloses its unused setuid bit.package-contract.md, the new referencedesktop-contract/references/sudo-rs-uutils.md, and tests.Evidence
Factory RPMs (hermetic lane run 44676259983):
uutils-coreutils-replace-0.7.0-9.hum1.bfinhas 213 files: the 104 GNU names,[included, and 109uutils-<prog>names, all linked to uutils.env,kill,uptime,hostnameormore. It providescoreutils = 9.12and requiresgnu-env.gnu-env-9.12-1.hum1.bfinowns/usr/bin/envand conflicts withcoreutils(x86-64)andcoreutils-single.rpm -U --testhits util-linux'sConflicts: coreutils < 8.20.Local image build of this branch (
just build-local, c288398 factory repository plus those RPMs):gnu-envand removedcoreutils-single. All 398 contract packages verified.configure-services.shpassed its uutils,gnu-env, sudo-rs link andsudo_exec_tchecks.bootc container lintpassed 13 checks.just check-desktop-contractpassed.On the finished image:
sudo --versionreports sudo-rs 0.2.15,ls --versionreports uutils 0.7.0, andenv --versionreports GNU 9.12.rpm -q --whatprovides coreutilslists only the replacement.rpm -Vof uutils, the replacement andgnu-envis clean./usr/bin/sudois setuid and byte-identical tosudo-rs.sudo -u nobody id -un,visudo-rs -c,ujust --listanduupd --helpwork.The contract job needs the factory pin that publishes these RPMs. It goes green once the Renovate pin bump lands and this branch is rebased onto it.
just checkpasses.Closes #1229