Skip to content

interfaces: allow Chromium StatusNotifierItem object paths in unity7 - #17415

Open
clwsgruk wants to merge 1 commit into
canonical:masterfrom
clwsgruk:fix/unity7-chromium-status-notifier
Open

interfaces: allow Chromium StatusNotifierItem object paths in unity7#17415
clwsgruk wants to merge 1 commit into
canonical:masterfrom
clwsgruk:fix/unity7-chromium-status-notifier

Conversation

@clwsgruk

Copy link
Copy Markdown

Summary

Electron 43 ships Chromium 150, whose Linux tray implementation changed the exported D-Bus object paths from the long-standing paths to numbered Chromium paths:

  • /org/chromium/StatusNotifierItem/<numeric-id>
  • /org/chromium/DbusMenu/<numeric-id>

This affects confined Electron applications generally. Signal Desktop 8.20 (snap revision 923) is the concrete reproducer reported in snapcrafters/signal-desktop#459.

The observed denial is:

apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/chromium/StatusNotifierItem/1" interface="org.freedesktop.DBus.Properties" member="GetAll" label="snap.signal-desktop.signal-desktop" peer_label="unconfined"

A corresponding Properties.Get call is also denied. GNOME's AppIndicator extension consequently cannot initialise its proxy for the item, so the tray icon is not displayed.

The numbered object paths were introduced by Chromium commit fe959876. A later Chromium change restored /StatusNotifierItem, retained the numbered Chromium DbusMenu path, and introduced per-item names of the form org.freedesktop.StatusNotifierItem-PID-ID; this change therefore also permits binding that exact numeric name shape.

Why unity7

The unity7 interface already mediates AppIndicator/StatusNotifierItem and dbusmenu integration, and Signal already plugs it. The host snapd generates the effective AppArmor profile, so changing the application snap or browser-support would not address the missing desktop-shell integration permission.

Security and scope

  • Add only the numbered /org/chromium/StatusNotifierItem/[0-9]* and /org/chromium/DbusMenu/[0-9]* object-path families to the existing app-indicator rules.
  • Add only the numeric org.freedesktop.StatusNotifierItem-[0-9]*-[0-9]* bind name used by current Chromium.
  • Keep the existing D-Bus interfaces, member allowlists, and plasmashell/unconfined peer labels unchanged.
  • Intentionally exclude the unrelated cgroup memory.max/memory.high and systemd-logind Inhibit denials from the report.

Tests

Passed locally:

  • cd interfaces/builtin && go test -check.f Unity7InterfaceSuiteOK: 6 passed
  • go test ./interfaces/builtin — passed (ok github.com/snapcore/snapd/interfaces/builtin)
  • go vet ./interfaces/builtin — passed
  • gofmt -s -d interfaces/builtin/unity7.go interfaces/builtin/unity7_test.go — no diff
  • /home/jon/.local/share/mise/installs/go/1.24.0/bin/golangci-lint run ./interfaces/builtin0 issues.
  • apparmor_parser -QTK /tmp/snapd-unity7-chromium-aa against a temporary profile containing the changed rules — passed

Also attempted IGNORE_MISSING=1 ./run-checks --static. It progressed through the repository static checks but the whole-repository golangci typecheck could not complete on this host because the blkid pkg-config development metadata (blkid.pc) is not installed. The changed package passes the targeted golangci-lint command above.

Runtime validation

Not run. This host has no graphical desktop session and does not have the Signal Desktop snap installed. GNOME validation with Signal Desktop 8.20 and tray-icon=true, plus KDE/Plasma coverage, remains pending.

AI assistance

This targeted change was prepared with Hermes Agent assistance, with source inspection, test-first regression coverage, and all commands/results above executed locally.

@github-actions github-actions Bot added the Run only one system Only runs spread tests on one system label Jul 29, 2026
@jnsgruk

jnsgruk commented Jul 29, 2026

Copy link
Copy Markdown
Member

This change was directed by me, happy to take and questions or make adjustments!

@clwsgruk
clwsgruk marked this pull request as ready for review July 29, 2026 09:24
@github-actions github-actions Bot removed the Run only one system Only runs spread tests on one system label Jul 29, 2026
@clwsgruk

Copy link
Copy Markdown
Author

@jnsgruk Thanks for confirming. The change is narrowly scoped to Chromium’s StatusNotifierItem/DbusMenu object paths and includes matching AppArmor snippet coverage, so I don’t have any questions or adjustments to suggest.

Validation: schema v1 and canonical identity/repository/PR/source/head match; inspected the current two-file diff and existing conversation
Code change: none

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.83%. Comparing base (d3e3858) to head (e7a6f2b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #17415      +/-   ##
==========================================
+ Coverage   78.81%   78.83%   +0.01%     
==========================================
  Files        1405     1403       -2     
  Lines      197076   196980      -96     
  Branches     2498     2498              
==========================================
- Hits       155334   155282      -52     
+ Misses      32379    32339      -40     
+ Partials     9363     9359       -4     
Flag Coverage Δ
unittests 78.83% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Wed Jul 29 10:55:56 UTC 2026
The following results are from: https://github.com/canonical/snapd/actions/runs/30439327918

Failures:

Preparing:

  • openstack:ubuntu-26.04-64:tests/main/lxd-postrm-purge

Executing:

  • openstack:ubuntu-core-18-64:tests/main/security-device-cgroups-serial-port
  • openstack:ubuntu-core-18-64:tests/main/interfaces-ssh-keys
  • openstack:ubuntu-core-18-64:tests/main/interfaces-joystick
  • openstack:ubuntu-core-18-64:tests/main/interfaces-microstack-support
  • openstack:ubuntu-core-20-64:tests/core/snapd-maintenance-msg
  • openstack:ubuntu-core-24-64:tests/core/services
  • openstack:ubuntu-core-24-64:tests/main/snap-user-service-start-on-install
  • openstack:ubuntu-26.04-64:tests/main/snap-user-service

Restoring:

  • openstack:ubuntu-core-18-64:tests/main/interfaces-microstack-support
  • openstack:ubuntu-core-20-64:tests/core/snapd-maintenance-msg
  • openstack:ubuntu-core-20-64:tests/core/
  • openstack:ubuntu-core-20-64:
  • openstack:ubuntu-20.04-64:tests/main/snap-user-service

Skipped tests from snapd-testing-skip

If you wish to have any of the below tests run in your PR, in your PR description, add 'unskip:' followed by a copy-and-pasted list of the below tests you wish to run (unskip plus test list must be valid yaml)

  • openstack:ubuntu-24.04-64:tests/main/i18n
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-flag-restart
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-integration-tests
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-prompt-restoration
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-smoke
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-snapd-startup
  • openstack:ubuntu-26.04-64:tests/main/apparmor-prompting-support
  • openstack:ubuntu-26.04-64:tests/main/i18n
  • openstack:ubuntu-26.04-64:tests/main/interfaces-requests-activates-handlers

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.

2 participants