=== Watchdog Agent ===
Tags: security, integrity, diagnostics, malware, site health
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.10.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Detect urgent compromise, injected public content, and recover with protected, backup-first actions.

== Description ==

Watchdog Agent gives WordPress administrators a plain-language health snapshot plus a resumable filesystem integrity and threat-indicator scan.

Version 0.10.1 can:

* Inventory files and directories inside the WordPress installation in small batches.
* Compare WordPress core and supported public-plugin files with official WordPress.org checksums.
* Flag unexpected executable files, PHP in uploads, disguised extensions, hidden executables, selected compromise paths, and high-signal code patterns.
* Report WordPress database triggers and locally list administrator usernames for owner review.
* Detect high-confidence bulk-injected published-post batches using exact-time bursts, dominant monetized-spam topics, and website-identity mismatch.
* Count unique files needing attention separately from repeated warning findings.
* Automatically classify checksum-verified repairs, high-confidence quarantine candidates, and uncertain items.
* Present active compromise as a dominant **DANGER** alert, with business impact and a clear **Fix This Website Now** action.
* Provide one protected cleanup instead of asking customers to select technical files or individual posts.
* Preserve evidence, restore verified official files, quarantine high-confidence threats outside the public web root, move high-confidence injected posts to reversible draft quarantine, leave uncertain items untouched, and start a fresh verification scan.
* Keep scans free while requiring a verified active subscription for cleanup, restoration, retention changes, and permanent deletion.
* Start a read-only compromise scan every six hours through a real server-driven clock rather than waiting for website traffic.
* Continue large scheduled scans in five-minute bounded batches without holding a browser page open.
* Email the configured client address when actionable danger is found, repeat an unchanged alert no more than once per day, and send a recovery notice after verification clears the danger.
* Give each quarantine a 30-day review deadline, two controlled extensions, verified restoration, and exact-confirmation deletion.
* Receive normal WordPress dashboard update notices from the BWT-operated release service and verify every release ZIP against its published SHA-256 before installation.
* Create a short-lived Managed Recovery diagnostic authorization without asking clients for FTP, SSH, hosting, or root passwords.
* Let administrators choose a familiar hosting provider, receive an auditable request ID, and revoke the authorization from WordPress.

Scanning remains read-only and free. Content or files change only after an administrator confirms the automatic protected-cleanup plan, an active subscription is verified for the website, and evidence preservation succeeds. Permanent deletion is available only for a managed quarantine session with an active subscription, a valid WordPress nonce, administrator permission, and the exact session-specific confirmation phrase. Database triggers, accounts, individual or ambiguous posts, ambiguous files, themes without official checksums, and other uncertain findings are never changed automatically.

== External services ==

When an administrator explicitly starts an integrity scan, Watchdog Agent requests checksum manifests from WordPress.org:

* `https://api.wordpress.org/core/checksums/1.0/` receives the installed WordPress version and locale.
* `https://downloads.wordpress.org/plugin-checksums/` receives public plugin slugs and installed versions.

These requests retrieve official integrity references. Site files, file contents, administrator usernames, passwords, and scan findings are not uploaded. WordPress.org privacy information is available at https://wordpress.org/about/privacy/.

When an administrator approves the automatic safe-fix plan, Watchdog Agent may download the exact WordPress core or public-plugin ZIP from `wordpress.org` or `downloads.wordpress.org`. A downloaded source file must match its official checksum before restoration.

WordPress periodically requests public release metadata from `https://watchdogagentbybwt.com/wp-json/watchdog/v1/update`. The request contains only the installed Watchdog Agent version, WordPress version, and PHP version. Update packages are downloaded only from `watchdogagentbybwt.com` and must match the release SHA-256 before WordPress can install them. No activation key, site URL, scan finding, file content, password, or visitor record is sent during an update check.

== Installation ==

1. Install and activate Watchdog Agent.
2. Open **Tools > Watchdog Agent**.
3. Confirm the client alert email and leave **six-hour automatic monitoring** enabled.
4. Select **Scan Website Now** for an immediate scan; scheduled scans continue in bounded background batches without an open browser.
5. Review the plain-language automatic plan.
6. If cleanup is needed, subscribe and activate the covered website with the key delivered after payment.
7. Select **Fix This Website Now** once. Watchdog Agent verifies the active entitlement, chooses eligible files and high-confidence injected-post batches, preserves protected evidence, performs only strict automatic actions, leaves uncertain items untouched, and launches a verification scan.

== Frequently Asked Questions ==

= Do customers have to choose files? =

No. Watchdog Agent automatically selects only checksum-verified official files for restoration, corroborated threats for file quarantine, and high-confidence bulk-injected post batches for reversible draft quarantine. Uncertain items remain untouched for expert review.

= Does it automatically remove suspicious files? =

The scan never changes files or posts. After an administrator confirms **Fix This Website Now**, eligible high-confidence threats are moved to protected quarantine after evidence preservation. They are not permanently deleted.

= Can it guarantee every classification is correct? =

No security scanner can honestly guarantee that. Watchdog Agent uses strict evidence rules for automatic action and deliberately leaves ambiguous findings untouched rather than risking a legitimate file.

= Does Watchdog Agent upload my website files or findings? =

No. Files and findings remain on the WordPress site. The scanner retrieves official checksum manifests using public version and component identifiers. Entitlement verification sends only the activation key, normalized website domain, and plugin version over HTTPS to watchdogagentbybwt.com.

= Does automatic monitoring wait for a visitor? =

No for active covered websites. The Watchdog service uses a real hosting cron clock to wake registered installations every five minutes. Each plugin starts its read-only scan on the six-hour schedule and processes large sites in bounded batches. Visitor traffic is not the trigger.

= What is included in a client alert email? =

Only the website address, counts of actionable danger, and a link to the local administrator dashboard. File paths, file contents, passwords, activation keys, visitor records, and full report details are not emailed. The recipient is configured locally and unchanged alerts are limited to one reminder per day.

= Does it collect passwords? =

No. Never enter a WordPress, hosting, database, FTP, SSH, or other password into Watchdog Agent.

= Is every finding malware? =

No. Customizations, premium components, generated files, and unusual hosting configurations can produce legitimate findings. That is why uncertain items are not automatically changed.

= Does a clean result guarantee that my website is secure? =

No. The scanner checks defined integrity references and threat indicators. It cannot guarantee every compromise, vulnerability, or malicious behavior will be detected.

= Why are theme files not marked as officially verified? =

This release verifies WordPress core and public plugins when official checksum manifests are available. Theme files still receive location, filename, configuration, and code-indicator checks, but are not claimed as official-checksum repairs.

= Who can run or view a scan? =

Only logged-in administrators with the `manage_options` capability. Scan and safe-fix actions require WordPress nonces.

= What data is stored? =

The latest health snapshot, scan progress, completed report, monitor settings/state, safe-fix queue progress, and remediation summary are stored locally in WordPress. Reports can contain relative file paths, hashes, descriptions, statistics, and administrator usernames. Protected backup/quarantine sessions contain original files plus a local audit manifest outside the public WordPress root. Passwords are not stored.

= What happens when I uninstall it? =

The plugin removes its WordPress options, including safe-fix queue state. It deliberately preserves protected backup/quarantine evidence.

== Screenshots ==

1. Plain-language administrator-only health and file-safety dashboard.
2. Automatic safe-fix plan showing verified repairs, high-confidence quarantines, and uncertain items left untouched.
3. One-click protected cleanup plus expandable technical classifications.

== Privacy ==

Watchdog Agent does not use tracking, advertising, or visitor cookies. Reports remain local. WordPress version/locale and public plugin slug/version identifiers are sent to WordPress.org to retrieve checksum manifests. Approved safe repairs download official component packages for local extraction and checksum verification. Before a paid remediation action and during scheduled covered-site check-ins, the activation key, normalized website domain, and plugin version are sent over HTTPS to watchdogagentbybwt.com solely to verify entitlement, enforce website limits, and allow the independent service clock to wake the installation. Site files, passwords, visitor records, and scan findings are not transmitted for entitlement validation. Alert emails are sent by the local WordPress installation to the locally configured recipient and contain counts only. If an administrator enables the Database Drop-in Firewall, Watchdog creates a verified local wp-config.php rollback copy and installs a local pre-WordPress guard and SHA-256 allowlist; none of those files or hashes are transmitted.

== Changelog ==

= 0.10.1 =

* Added read-only PHP/php2shell security checks for CVE-2026-109618, CVE-2026-109619 and the separate CVE-2026-115560 upload-progress mitigation.
* Unknown directives, vendor backports and prerelease versions require verification rather than an automatic safe result.
* Added included managed remediation guidance with backup, separate approval, startup-level configuration and worker-restart verification; no server configuration is changed by the plugin.

= 0.10.0 =

* Added an administrator-approved, backup-first Database Drop-in Firewall that runs before WordPress loads `wp-content/db.php`.
* Added SHA-256 allowlisting for legitimate database drop-ins and automatic evidence quarantine for unapproved drop-ins and directly referenced ZIP payloads.
* Added ZIP/PHAR member inspection, `zip://` execution detection, unexpected root executable review, and correlated archive-loader containment.
* Added administrator, active-plugin, cron-hook, application-password, and protected security-option baselines.
* Added five-minute firewall integrity checks and deduplicated alerts when monitoring cannot complete.
* Added pinned quarantine-manifest and evidence hashes, exact quarantine-root validation, and linked-ancestor rejection before restoration.

= 0.9.0 =

* Added Managed Recovery authorization, revocation, and auditable secure-access requests without collecting customer passwords.
* Added the production private-update bridge and recovery-safe release workflow.

= 0.8.1 =

* Reworded official-file checksum alerts as files awaiting an automatic recheck.
* Added a clear notice that no customer action is required unless Watchdog sends a follow-up requiring attention.

= 0.8.0 =

* Added private, BWT-hosted WordPress dashboard updates without requiring WordPress.org distribution.
* Added strict HTTPS-host validation and SHA-256 package verification before installation.
* Added standard update details, compatibility metadata, immutable versioned downloads, and cache-safe release checks.

= 0.7.1 =

* Accepts the current WordPress.org multi-hash checksum manifest format instead of reporting verified package files as altered.
* Suppresses byte-exact known plugin-generated upload sentinels, benign PHP-CS-Fixer configuration files, static non-PHP placeholders, and high-risk patterns that appear only inside comments.

= 0.7.0 =

* Added server-clock-driven six-hour monitoring that does not rely on visitor traffic.
* Added a five-minute bounded scan worker for large WordPress installations.
* Added configurable counts-only client alerts, daily deduplication, and recovery notices.
* Kept all scheduled scans read-only and preserved the active-subscription gate for every cleanup action.

= 0.6.0 =

* Added a fail-closed subscription entitlement gate to every mutating remediation action.
* Added paid-plan activation, domain-limit validation, and subscribe-to-clean-up onboarding.
* Added protected quarantine review, restore, extension, and exact-confirmation deletion controls.
* Documented the minimum entitlement data sent to watchdogagentbybwt.com.

= 0.5.1 =

* Replaced the red emergency banner with a green cleanup-complete state after verification confirms no remaining automatic actions.
* Separated uncertain expert-review findings into a yellow advisory instead of treating them as active compromise.
* Hid the zero-action cleanup plan and changed the impact heading to a verified-current-state summary after successful remediation.

= 0.5.0 =

* Rebuilt the report around an unmistakable active-compromise danger alert, business impact, and one protected cleanup action.
* Added conservative detection of bulk-injected published posts using multiple independent signals.
* Added bounded, evidence-first, reversible draft quarantine for high-confidence injected-post batches.
* Moved passive file-scan totals into secondary technical details and added visible compromised-content examples.
* Preserved automatic checksum repair, corroborated file quarantine, uncertainty boundaries, post-cleanup rescanning, and permanent-deletion prohibition.

= 0.4.0 =

* Replaced customer file-selection controls with a conservative server-generated automatic plan.
* Added one-click **Fix Safely and Verify** workflow with resumable, one-file remediation batches.
* Automatically restores checksum-verified official files and quarantines only high-confidence threats.
* Leaves uncertain files, database records, account findings, and unsupported components untouched for expert review.
* Automatically starts a fresh verification scan after safe fixes complete.
* Preserves protected backups, reversible quarantine, administrator capability checks, nonces, and local audit records.

= 0.3.0 =

* Added plain-language unique-file totals and explanations for novice administrators.
* Added administrator-selected, backup-first restoration and reversible quarantine.
* Added confirmations, per-action audit manifests, action limits, and protected path validation.

= 0.2.0 =

* Added resumable integrity and threat-indicator scanning, checksums, database/account inventory, progress reporting, and local evidence.

= 0.1.0 =

* Initial administrator-only local health snapshot.

== Upgrade Notice ==

= 0.5.0 =

Active compromise now receives an urgent danger-first report. High-confidence bulk-injected posts can be moved out of public view through the same evidence-first, reversible protected cleanup.
