Skip to content

docs(heimdall): mask packagekit so package installs need the password - #1772

Merged
Gerrrt merged 2 commits into
mainfrom
docs/heimdall-mask-packagekit
Nov 26, 2026
Merged

Gerrrt merged 2 commits into
mainfrom
docs/heimdall-mask-packagekit

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 26, 2026

Copy link
Copy Markdown
Owner

What changed

build-heimdall.md §2 gains "No package installs without the password": sudo systemctl mask --now packagekit.service, with a check and its undo in §9. A changelog entry records it. It is already applied on heimdall.

Why

A re-check of heimdall after the 2026-11-26 04:30 boot found Raspberry Pi OS's /usr/share/polkit-1/rules.d/10-gui-pkinst.rules, in place since the build. It lets any sudo member install, remove and upgrade packages through PackageKit without authenticating. Its only condition is the caller's command line, which the caller sets, and it has no local-session requirement. So the SSH key alone could remove nftables, and that undid part of 2026-11-25's "sudo asks for the password" hardening. The desktop metapackages depend on packagekit, so the change masks it instead of purging it. Nothing on the kiosk uses it.

The same check found that unattended-upgrades installed browser-choice, a new dependency of rpd-applications 1.39. It is harmless, and the changelog records it.

Blast radius

heimdall only. If this is wrong, the desktop's GUI package tools on the Pi stop working; the kiosk does not use them, and unattended-upgrades calls apt directly.

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Verification

On heimdall, after sudo systemctl mask --now packagekit.service:

  • systemctl is-enabled packagekit.service printed masked, and is-active printed inactive.
  • The gdbus … org.freedesktop.DBus.Peer.Ping from the runbook failed with UnitMasked: Unit packagekit.service is masked, and the journal shows dbus-daemon refusing the activation.
  • systemctl --failed is empty.

Locally: python3 scripts/check_docs.py printed "docs OK". In ./scripts/lint.sh, yamllint, shellcheck, ruff, actionlint and the conflict-marker checks pass. markdownlint-cli2, zizmor, packer, tofu and editorconfig-checker were skipped because there is no docker daemon. ansible-lint fails on a local tool error ("--pip-args contains '-c'"); it fails the same way on unchanged main, and this PR touches no Ansible. make validate was not run (docs only).

  • make validate passes
  • Deployed to the lab and confirmed working
  • Docs updated (docs/, service README, or docs/roadmap.md)

🤖 Generated with Claude Code

Gerrrt and others added 2 commits November 26, 2026 13:41
Raspberry Pi OS's 10-gui-pkinst.rules lets any sudo member install or
remove packages through PackageKit without authenticating, over SSH too.
build-heimdall.md §2 now masks packagekit.service, with its undo in §9.
Applied on heimdall 2026-11-26.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt enabled auto-merge (squash) November 26, 2026 22:03
@Gerrrt
Gerrrt merged commit 55cdd0e into main Nov 26, 2026
9 checks passed
@Gerrrt
Gerrrt deleted the docs/heimdall-mask-packagekit branch November 26, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant