
外掛標籤
開發者團隊
原文外掛簡介
phpwarden connects a WordPress site to a phpwarden project.
The plugin reports which components are installed. Your phpwarden dashboard matches them against known vulnerabilities and ranks the results by real-world exploitation: first whether a vulnerability is in the CISA Known Exploited Vulnerabilities (KEV) catalog, then by its EPSS score. You see what to patch first instead of a flat list of CVEs.
What it does
Sends an inventory report twice a day, shortly after a plugin or theme is installed, updated, activated, deactivated or deleted, and when you press “Send report now”.
Shows the result of the last report on the settings page: time, status, and the number of exposed components and KEV-listed vulnerabilities.
Optionally (off by default, separate consent) checks the site daily for changed or unexpected PHP files, new administrator accounts and suspicious scheduled tasks, and includes the result in the report.
Report only: it never makes changes to your site on behalf of the service, and ignores any instruction in the service’s response.
What it is not
This plugin is not a firewall and not a malware scanner. It does not block requests, look for malware signatures or clean infections. The optional tamper check tells you that files changed; it does not remove anything. It runs alongside security plugins such as Wordfence or Patchstack and does not replace them.
Data sent
Each report contains exactly this, and nothing else:
The plugin’s own agent version (for example phpwarden-wp/1.4.0).
The site address (home_url()).
The PHP version and PHP server API (for example fpm-fcgi).
The WordPress core version.
For every installed plugin: slug (directory name, or for a single-file plugin its file name without .php), main file path relative to the plugins directory, name, version, whether it is active, and the newer version WordPress knows of, if any.
For every installed theme: slug (directory name), name, version, whether it is active, and the newer version WordPress knows of, if any.
remote_updates: false, a fixed value telling the service that this plugin never accepts actions from it.
Only if you also check the separate, optional “Usage names” box: usage, four lists of names (no content) used to mark findings that are likely not reachable on your site. They are: registered shortcodes and blocks that appear in published posts, pages or widgets (up to 2,000 recent published posts are read on your site to find them), registered REST API namespaces, and registered AJAX action names, plus the number of posts read. At most 300 names per list.
Only if you also check the separate, optional “Tamper check” box: accounts, cron and integrity, the result of the daily tamper check: the login names, user IDs and registration dates of administrator accounts (no e-mail addresses); the names of scheduled tasks, and which of them carry PHP code or a long encoded string in their arguments (the arguments themselves are not sent); and for each changed or unexpected PHP file its path, which check found it (official checksum, recorded baseline or the uploads rule), and the names of any well-known backdoor patterns seen in it, plus a per-component summary (version, number of files, date of the baseline). At most 100 files. File contents are never sent.
The project token is sent in the Authorization header to identify your project. No e-mail addresses, passwords, post content, visitor data, file contents or secrets are sent, and no user accounts unless you turn on the optional tamper check (administrator login names only). The plugin loads no external assets and contains no tracking.
Tamper check (optional, off by default)
A separate checkbox on Settings > phpwarden, unchecked by default, and only active while the main consent box is also checked.
Once a day, in short background steps run by WP-Cron, the site itself:
compares WordPress core and each plugin from WordPress.org with the official checksums for the installed version (from api.wordpress.org and downloads.wordpress.org);
lists PHP files that do not belong: extra PHP in wp-admin or wp-includes or inside a WordPress.org plugin, and any PHP file in the uploads folder (an empty “Silence is golden” index.php is ignored);
for themes, premium and custom plugins, must-use plugins and drop-ins, which have no official checksums, records a checksum of each PHP file the first time and reports files that change or appear later. A new version records them again;
checks changed and unexpected PHP files for nine well-known backdoor patterns, such as eval of decoded data or request input passed to a command function;
lists administrator accounts and scheduled tasks, so the dashboard can tell you when a new administrator appears or a task carries code.
It only reads. It never changes, moves or deletes a file. It is not a malware scanner: a file that was already malicious when its baseline was recorded is not reported, and apart from administrator accounts and scheduled tasks the database is not read. After you have checked a reported change yourself, “I checked the changes: accept the current files” (or wp phpwarden integrity --accept) records the current files as the new baseline. Turning the check off removes everything it stored.
Configuration in wp-config.php
define( 'PHPWARDEN_TOKEN', 'your-project-token' );
define( 'PHPWARDEN_API', 'https://app.phpwarden.io' );
Constants take precedence over the settings page and make the corresponding field read-only.
WP-CLI
wp phpwarden activate
wp phpwarden sync # sends a report now (only if consent is given)
wp phpwarden status
wp phpwarden disable # withdraws consent; nothing more is sent
wp phpwarden integrity [--enable] [--send] # runs the tamper check now and prints the result
wp phpwarden integrity --accept # after checking the changes: record the current files
wp phpwarden integrity --disable # turns the tamper check off and removes its data
Multisite
The plugin can be network-activated. It reports once for the whole network, from the network’s main site, listing all installed plugins and themes. A plugin counts as active when it is network-active or active on the main site; plugins active only on other sites of the network are reported as inactive. Settings are on the main site (Settings > phpwarden) and require a network administrator.
External services
This plugin connects to the phpwarden service at https://app.phpwarden.io (or the API base URL you configure). It is required for the plugin to do anything useful: the service matches your inventory against vulnerability data and shows the result in your dashboard.
Consent first: nothing is sent until an administrator checks “I agree to send this site’s software inventory to the phpwarden service” on Settings > phpwarden, or runs wp phpwarden activate
What is sent and when: the inventory listed under “Data sent” above, together with your project token, twice a day, about a minute after plugin or theme changes, when you press “Send report now”, and when you run wp phpwarden activate or wp phpwarden sync.
Nothing is sent without both consent and a project token.
WordPress’s own update check: to report which plugins and themes have updates waiting, the plugin reads WordPress’s cached update list. If that list is missing or more than 12 hours old, it first asks WordPress core to refresh it, which is the same request to api.wordpress.org that WordPress makes on its own schedule. This happens only when a report is being sent, so never without consent, and it is skipped when the site has turned off WordPress’s update checks.
Tamper check (optional): only when its box is checked, the site downloads the official checksums of its WordPress version from api.wordpress.org (through WordPress core’s own function) and of each installed plugin from https://downloads.wordpress.org/plugin-checksums/
Service provider: phpwarden. Terms of service, privacy policy.
