內容簡介
PlugSeal 讓管理員能夠對每個啟用的外掛進行細緻的權限控制,靈感來自於 Android 應用程式權限和 Flatseal。管理員可以在設定頁面上查看所有啟用的外掛,並針對每個外掛即時允許或拒絕個別權限。
【主要功能】
• 允許或拒絕外掛的個別權限
• 支援對用戶數據的讀取與寫入控制
• 控制外部 HTTP 請求的權限
• 管理 WordPress 選項的讀取與寫入
• 設定事件排程的權限
• 註冊 REST API 端點的權限
外掛標籤
開發者團隊
原文外掛簡介
PlugSeal gives administrators granular control over what each active plugin is allowed to do, inspired by Android app permissions and Flatseal for Flatpak. Each active plugin is listed in the settings page. For each plugin, administrators can allow or deny individual permissions with immediate effect. All permissions are allowed by default, so no existing functionality is broken until an administrator explicitly restricts it.
Permissions covered:
db:read / db:write — database queries via $wpdb
db:read:users / db:write:users — read and write access to user data (also covers wp_delete_user and wp_update_user)
http:outbound — outbound HTTP requests via the WordPress HTTP API
options:read / options:write — WordPress options via get_option / update_option (see limitations)
email:send — sending email via wp_mail()
cron:write — scheduling, rescheduling and unscheduling cron events
transients:write — writing transients via set_transient()
users:create — creating users via wp_create_user() (deletes are covered by db:write:users)
rest:register — registering REST API endpoints via register_rest_route()
shortcode:register — registering shortcodes via add_shortcode()
rewrite:register — registering rewrite rules via add_rewrite_rule()
admin:menu — adding entries to the admin menu and submenus
dashboard:widget — adding dashboard widgets via wp_add_dashboard_widget()
hooks:frontend — hooking into frontend hooks (wp_head, wp_footer, the_content, wp_enqueue_scripts…)
hooks:admin — hooking into admin hooks (admin_head, admin_notices, admin_enqueue_scripts…)
hooks:auth — hooking into authentication hooks (wp_login, wp_logout, user_register, authenticate…)
hooks:content — hooking into content hooks (save_post, delete_post, pre_get_posts, wp_handle_upload…)
hooks:lifecycle — hooking into plugin and theme lifecycle hooks (activated_plugin, deactivated_plugin, switch_theme…)
Honest limitations:
PlugSeal is a least-privilege tool: it limits what well-behaved, buggy or accidentally compromised plugins can do. It is not a sandbox, and deliberately malicious code can bypass or disable it.
This plugin intercepts official WordPress APIs by identifying the calling plugin via the PHP call stack. It cannot intercept calls made by WordPress core on behalf of a plugin — for example, when WordPress processes a settings form via options.php, the call stack contains core files rather than the plugin files.
Specific limitations:
options:read / options:write — work when a plugin calls these APIs directly from its own code (hooks, AJAX, cron). Do not block standard WordPress settings forms processed by options.php.
Filesystem access (file_get_contents, fopen, etc.) is not intercepted.
Direct mysqli connections, eval(), and raw PHP file functions bypass all interceptors.
wp_update_user() and wp_delete_user() are covered by db:write:users since they write directly to the users table.
admin_init is intentionally excluded from hooks:admin as it is too critical to block safely.
transients:write — only enforced when transients are stored in the database. With a persistent object cache (Redis, Memcached) WordPress keeps them in the cache and PlugSeal cannot intercept them.
Only plugins activated on the site are managed. Themes, must-use plugins and network-activated plugins are not.
Hooks, shortcodes, REST routes and menus are removed when WordPress loads them; anything a plugin registers afterwards is not affected.
