Products › lamco-dbus-tools › Interfaces
polkit actions and rules: Which D-Bus calls need no prompt
polkit actions and rules decide which D-Bus calls to a root service need no password, and lamco-dbus-tools reads them beside each service's bus policy and unit.
polkit is the authorization service most privileged D-Bus services ask before doing what a caller requests: Mounting a disk, changing the hostname, installing a package. It runs on the system bus as org.freedesktop.PolicyKit1. The bus policy decides whether a call reaches a service at all. polkit decides, once it has, whether the caller may have what it asked for, and whether a password prompt comes first. lamco-dbus-tools reads polkit's actions and rules alongside each service's bus policy, service file and unit, so one table shows everything that stands between a user and a root service.
What it is
The polkit(8) manual describes the model. A privileged program, which polkit calls a mechanism, receives a request from a subject, usually over D-Bus, and asks polkit whether the subject is authorized for an action. The mechanism does that through polkit's D-Bus interface, org.freedesktop.PolicyKit1.Authority, with CheckAuthorization, or through a library that wraps it.
Actions are declared in XML files the mechanism installs into /usr/share/polkit-1/actions. Each action has an identifier and a <defaults> element with three implicit authorizations:
allow_any: For any client.allow_inactive: For clients in inactive sessions on local consoles.allow_active: For clients in active sessions on local consoles.
Each takes no, yes, auth_self, auth_admin, auth_self_keep or auth_admin_keep. A yes means no prompt at all. Rules, written in JavaScript and read by polkitd from /etc/polkit-1/rules.d and /usr/share/polkit-1/rules.d, can override the defaults for chosen users, groups or actions.
Two limits matter when auditing. Nothing in the files says which action a given D-Bus method checks: Only the service's code knows that. And /etc/polkit-1/rules.d is often readable only by root, so an ordinary user's view of the rules can be incomplete.
How lamco-dbus-tools reads it
dbussee audit collect reads polkit's action files and rules files with the bus's policy, the service files and their units, and builds a per-name table: As whom each name runs, its unit's score, what every user may call and own on each implementation, and its permission actions. It says which files it couldn't read. dbusdo doesn't call polkit. dbustell audit gives the findings, an action granted to any client without a prompt, or to active local users for a root service, and with --baseline an action whose defaults loosened.
dbussee audit collect --out audit.json # actions and rules, with the policy and units around them
dbustell audit audit.json # the per-name table and the AUD- findings
dbustell audit now.json --baseline last-month.json --sarif audit.sarif # what loosened since, as SARIF 2.1.0
The audit never reports a machine as clean on the strength of files alone, and it says which of its checks rest on files, on watching, or on probing.
Where it has been run
The README's run record lists the policy audit of a whole machine on Debian 13 and Fedora 45 on 2026-11-30, which read polkit's actions and rules with the rest. It doesn't list polkit's part on its own. The repository's notes count 287 permission actions on one Debian 13 desktop.
Findings
AUD-001: A root service every user may call, with little hardening.AUD-002: Permission actions any client is granted without a prompt.AUD-003: A root service's actions granted to active local users without a prompt.AUD-005: Permission files the audit couldn't read.
Related
- D-Bus policy files, which decide whether a call reaches the service.
- Audit a machine's bus policy and exposure.
- Auditing a machine, the tutorial.
- The polkit(8) manual.