Linux 软件免费装
Banner图

Codevera AI Access Control

开发者 codevera
更新时间 2026年5月13日 21:15
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

privacy security admin ai abilities

下载

1.1.4

详情介绍:

WordPress 7.0 introduced the Abilities API. Any active plugin can register an ability and the WordPress AI feature can then invoke it, consuming whatever credits or tokens your AI provider charges per call. By default every registered ability is exposed, and there is no built-in way to see what is exposed or to limit it. Codevera AI Access Control adds a single settings screen that lists every plugin which has registered AI abilities, grouped by source plugin, and lets you allow or block each plugin as a whole or each individual ability. How it works:
  1. The plugin watches every call to wp_register_ability() and records which plugin made the call.
  2. The Settings -> Codevera AI Access screen groups those abilities by source plugin so you can see at a glance what is exposed.
  3. Untick a plugin or a single ability and save. From the next request onwards, the AI feature can no longer see or invoke it.
Free: Works well for: Under the hood:

安装:

From WordPress admin:
  1. Go to Plugins -> Add new
  2. Search for "Codevera AI Access Control"
  3. Click Install now and then Activate
  4. Go to Settings -> Codevera AI Access
  5. Review the list of plugins that have registered AI abilities
  6. Untick anything you do not want the AI feature to use
  7. Click Save changes
Manual installation:
  1. Download the plugin zip file
  2. Upload to the /wp-content/plugins/ directory
  3. Extract the files
  4. Activate through the Plugins menu in WordPress
  5. Configure as described above
Optional hardening: Add the following line to your wp-config.php to use a dedicated secret for the settings signature, rather than reusing AUTH_SALT: define( 'CVAIAC_SECRET', 'some-long-random-string-that-only-you-know' ); This makes it harder for an attacker who only has database access to forge a valid settings blob. After activation:

升级注意事项:

1.1.4 Settings screen polish. Plugin cards now collapse by default with a chevron toggle, show an allowed-count badge, and display each plugin's proper display name instead of its folder slug. Safe to update. 1.1.3 Recommended update. Adds a Block all / Allow all toggle and a settings legend, fixes a duplicate save notice, removes unnecessary option autoloading, warns when the tamper-detect key has fallen back to a public default, and trims source-tracker overhead. Safe to update. 1.1.2 Submission housekeeping. Removes the duplicate Plugin URI header to satisfy WordPress.org submission rules. No functional change. 1.1.1 Small UX update. Saved-state banners now auto-dismiss after 2 seconds. The red tamper-detect banner is unchanged. Safe to update. 1.1.0 Recommended security and reliability update. Adds signed settings with tamper detection, filter-level enforcement against race attacks, and a self-check that re-attaches the gate if removed. Fixes a source attribution bug for core abilities. Safe to update. 1.0.0 Initial release.

常见问题:

Does this plugin make any external network requests?

No. It reads only local WordPress data and never contacts any third-party service. No telemetry, no analytics, no licence checks.

Does it store any personal data?

No. It stores only your allow and block selections and a short list of plugin and ability identifiers in the WordPress options table.

How does it actually block an ability?

Two layers. First, on the wp_register_ability_args filter at the highest priority, the plugin rewrites the execute_callback and permission_callback of any blocked ability to return a cvaiac_blocked WP_Error. This neutralises the ability before WordPress even constructs it. Second, on the wp_abilities_api_init action at the highest priority, the plugin walks the registry and calls wp_unregister_ability() on anything blocked, so it disappears from the listings entirely.

Can I block WordPress core abilities?

You can block individual core abilities, but the WordPress core group as a whole cannot be blocked. Blocking individual core abilities can prevent the AI feature from working correctly, so do it with care.

What is the tamper-detect mode?

The settings option is stored as a JSON payload with an HMAC-SHA256 signature, keyed to a CVAIAC_SECRET constant or AUTH_SALT. Each time the plugin reads the option, the signature is recomputed and checked. If it does not match, the plugin enters fail-closed mode and blocks every non-core ability until an administrator re-saves the settings through the UI. A red banner appears on the settings screen explaining what happened.

Why is fail-closed important?

A malicious or buggy plugin running on the same site can call update_option( 'cvaiac_settings', array() ) to wipe your block list. With tamper detect, that write produces an invalid signature, the plugin notices, and the AI feature loses access to every plugin's abilities until you investigate and re-save.

Can a hostile plugin still bypass this?

A determined plugin with code execution on the same site can in principle override the pre_option_cvaiac_settings filter, remove the enforcement hooks, or read CVAIAC_SECRET from wp-config.php to forge a valid signature. This plugin defends against opportunistic interference, not against a fully hostile plugin in the same PHP process. Treat it as a policy and tamper-detect tool, not a security boundary. The safest practice is still to only install plugins you trust.

Does it work on multisite?

Yes. Settings are stored per-site, so each sub-site can have its own allow and block list.

Does it work with the REST API run endpoint?

Yes. Blocked abilities are unregistered from the registry, so the WordPress core REST run endpoint cannot find or execute them.

What happens when I uninstall the plugin?

All of the plugin's options are deleted by uninstall.php. No data is left behind.

Can I translate this plugin?

Yes. The text domain is codevera-ai-access-control. PO files can be generated with WP-CLI or any standard translation tool.

How do I troubleshoot?

Enable WP_DEBUG and WP_DEBUG_LOG in wp-config.php. The plugin uses only standard WordPress APIs, so any issue will appear in the standard debug log.

更新日志:

1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.0