{"id":49398634,"url":"https://github.com/amr-engineer/mini-polkit","last_synced_at":"2026-04-28T17:02:26.885Z","repository":{"id":299317781,"uuid":"1002623749","full_name":"amr-engineer/mini-polkit","owner":"amr-engineer","description":"mini agent for polkit authentication","archived":false,"fork":false,"pushed_at":"2025-06-27T04:48:47.000Z","size":44,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-07T15:55:58.373Z","etag":null,"topics":["authorization","dmenu","linux","polkit","polkit-agent","rofi"],"latest_commit_sha":null,"homepage":"https://amr.engineer/mini-polkit","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amr-engineer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-15T21:23:04.000Z","updated_at":"2026-01-09T23:20:00.000Z","dependencies_parsed_at":"2025-06-16T12:43:42.803Z","dependency_job_id":null,"html_url":"https://github.com/amr-engineer/mini-polkit","commit_stats":null,"previous_names":["cyber-amr/polkit-agent","cyber-amr/mini-polkit","amr-engineer/mini-polkit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/amr-engineer/mini-polkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amr-engineer%2Fmini-polkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amr-engineer%2Fmini-polkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amr-engineer%2Fmini-polkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amr-engineer%2Fmini-polkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amr-engineer","download_url":"https://codeload.github.com/amr-engineer/mini-polkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amr-engineer%2Fmini-polkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authorization","dmenu","linux","polkit","polkit-agent","rofi"],"created_at":"2026-04-28T17:02:19.587Z","updated_at":"2026-04-28T17:02:26.875Z","avatar_url":"https://github.com/amr-engineer.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mini-polkit\n\n**mini-polkit** is a secure and minimal PolicyKit authentication agent designed for lightweight and embedded Linux environments. It provides a secure, modular and customizable way to interact with PolicyKit authorization requests via external prompt tools.\n\n\u003e 🔒 Built for simplicity. Designed for power users.\n\n---\n\n## Features\n\n- Minimal codebase written in pure `C` (307 LOC)\n- No runtime bloat, only `glib` and `polkit`\n- Easy integration with `dmenu`, `rofi`, `zenity` or any custom script\n- Performant and highly secure password handling (no lingering in memory)\n- X11 and Wayland ready, depending on your prompt manager :)\n- Suitable for both tiling window managers and floating setups (and maybe TTYs?)\n\n## Performance (on my ancient system)\n\n| Benchmark                  |             |\n|----------------------------|:-----------:|\n| **Language**               | C           |\n| **Lines of Code**          | 307         |\n| **Memory Usage (RSS)**     | ≤5.6 MB     |\n| **Startup Time**           | ≤15 ms      |\n| **Authentication Latency** | ≤40 ms      |\n| **Process Count**          | 1           |\n| **D-Bus Roundtrips**       | 1           |\n\n---\n\n## Usage\n\nWhen `PolKit` requests authentication, `mini-polkit` runs your command, reads the stdout as the password, then securely passes it to PolKit via D-Bus — thats it :3\n\nTo show the `PolKit` message inside your prompt, use `{{MESSAGE}}`:\n\n```sh\nmini-polkit \"zenity --password --title='{{MESSAGE}}'\"\n```\n\nRun **mini-polkit** in the background (e.g. using \u0026), to make it act as a full-time agent\n\n```sh\nmini-polkit \"zenity --password\" \u0026\n```\n\nYou can autostart it via `.xinitrc`, `.bash_profile`, `systemd` or whatever you like. As long as your tool writes the password to stdout, you're good.\n\n---\n\n## Installation\n\n### Clone, build and install manually:\n\n(deps. gcc, make, pkg-config, polkit-agent-1, glib-\u003ev2.0)\n\n```sh\ngit clone https://github.com/cyber-amr/mini-polkit.git\ncd mini-polkit\nsudo make install\n```\n\n---\n\n## Security Notes\n\n* Password is securely passed to PolicyKit via DBus and wrecked right afterwards from memory.\n* Input is read from stdin to avoid command-line exposure.\n* It is **your responsibility** to ensure the prompt tool handles input securely (e.g., `dmenu` with `-P`, `rofi` with `-password`).\n\n---\n\n## License\n\nMIT License — [`LICENSE`](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famr-engineer%2Fmini-polkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famr-engineer%2Fmini-polkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famr-engineer%2Fmini-polkit/lists"}