=== AppsTech PHP Security Scanner ===
Contributors: appstechnz
Tags: security, scanner, php, vulnerability, email
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Read-only security scanner for PHP and WordPress with plain-language findings and a daily email report.

== Description ==

AppsTech PHP Security Scanner checks information that WordPress and PHP already expose and reports what it can observe in plain language. It emails a daily report to the people you choose and lists findings with evidence, limitations and who can fix each item.

**What it checks**

* PHP version: end-of-life status and known vulnerabilities in the running version (using an advisory list that is bundled and refreshed by the live feed).
* Known vulnerabilities in your installed plugins, themes and WordPress version, matched from a live public vulnerability feed, with the fixed version to update to and email alerts for newly found issues.
* PHP settings that affect security.
* WordPress core, plugin and theme update status (from the update data WordPress already holds).
* WordPress configuration flags, unused themes and whether a backup solution appears to be present.
* Scheduling health: whether the daily scan ran on time.

**Read-only and private**

* The plugin never changes your site, files, PHP or server settings. It does not fix anything.
* It makes no external requests unless you choose to turn on the optional vulnerability feed (see External services below). The feed is off by default, sends no site address and no personal data, and can be switched off again at any time. Scan results are never sent anywhere.
* Everything is stored in your WordPress database. Reports use your site's own mail configuration.
* Recipient emails are covered by the WordPress personal data export and erasure tools.

**Important statements**

* Scans indicate observable risks, not proof that a website is uncompromised. This is not a guarantee against attack.
* This plugin does not patch the PHP engine, block attacks or remove malware. Ask your host to install vendor security fixes.
* A version check may not detect vendor backported patches or other server runtimes.
* Daily WP-Cron tasks can run late when a website receives little traffic.

**Limitations**

* Only the PHP runtime serving the request is seen (not command-line PHP, other PHP-FPM pools, other virtual hosts or other load-balanced nodes).
* "Unknown" means a check could not be assessed. It does not mean "passed".
* An email marked "accepted" was accepted by the WordPress mail transport. It is not proof of delivery to an inbox.
* Multisite network mode is not supported. On a multisite network each site is scanned on its own.

**Data on uninstall**

By default scan history and settings are kept when the plugin is deleted. Enable "delete data on uninstall" in Settings to remove all plugin tables, options and scheduled tasks.

== External services ==

This plugin can connect to one external service, the AppsTech vulnerability feed operated by the plugin author (APPSTECH). The feed is off by default. It is only used if an administrator ticks "Vulnerability feed (optional)" during setup or under Security Scanner > Settings, and it can be switched off again at any time. While it is off, the plugin makes no external requests.

**What it is used for:** to download public vulnerability data for WordPress, PHP, plugins and themes, so the scan can report known vulnerabilities in the software installed on your site. The data originates from Wordfence Intelligence, php.net and WordPress.org.

**What is sent:** an HTTP GET request to `https://api.appstech.co.nz/gsfp/v1/feed` for a small summary file (the manifest), and further HTTP GET requests to `https://api.appstech.co.nz/gsfp/v1/feed/b/{xx}` for the data "buckets" that contain your installed plugin and theme slugs (`{xx}` is a two-character code derived from a plugin or theme folder name; many names share one bucket, so the service cannot tell which plugin or theme you have). Only a standard User-Agent (`AppsTechPHPSecurityScanner/<version>`) and an `If-None-Match` cache header are sent. Your site address, WordPress, PHP or plugin versions, scan results, user data and email addresses are not sent. As with any web request, the receiving server can see your server's IP address.

**When (only while the feed is turned on):** about once a day (WP-Cron, at a random time), when an administrator clicks "Check now", and shortly after a plugin or theme is installed or updated (at most once every 15 minutes).

**Service provider:** APPSTECH (appstech.co.nz). Terms of use: https://appstech.co.nz/terms. Privacy policy: https://appstech.co.nz/privacy.

**Data sources:** vulnerability data is provided by Wordfence Intelligence (https://www.wordfence.com/threat-intel/), under the Wordfence Intelligence terms: https://www.wordfence.com/wordfence-intelligence-terms-and-conditions/. PHP data comes from php.net and WordPress version data from WordPress.org. Attribution is shown in the plugin dashboard.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` or install it from the Plugins screen, then activate it.
2. Open Security Scanner in the admin menu and complete setup (recipients, time, timezone). Nothing is scheduled before this.
3. Run a first scan and send a test email from Reports & Alerts.
4. For reliable timing, set up a server cron job that runs `wp cron event run --due-now` every few minutes.

== Frequently Asked Questions ==

= Does it fix problems it finds? =
No. It is read-only. Each finding explains the risk and who can fix it (you, your host or a developer).

= Does it send data anywhere? =
Scan results never leave your site. The plugin makes no outgoing requests unless you turn on the optional vulnerability feed, which is off by default. It is an anonymous download of public vulnerability data that includes no site address and no personal data (details under External services). Reports go only through your site's mail configuration to the recipients you set.

= How do vulnerability alerts work? =
When the vulnerability feed is turned on, after each scan newly found vulnerabilities in plugins, themes, WordPress or PHP are emailed once, either right away (Daily) or as one weekly digest. Choose Daily, Weekly or Off, and the recipients, under Settings. Critical and high findings also show a dismissible admin notice on the Dashboard, Plugins and Updates screens and on this plugin's own pages.

= Where does the vulnerability data come from? =
From Wordfence Intelligence, php.net and WordPress.org, collected and relayed by the plugin author's API. The Security Scanner dashboard shows the attribution and the date the data was last updated.

= Why do I see "Unknown"? =
Unknown means the plugin could not assess that item, for example because update data is not yet available or the server hides the information. Unknown is not the same as passed.

= Why did my daily report arrive late or not at all? =
WordPress scheduled tasks (WP-Cron) only run when the site receives visits. On a low-traffic site, tasks can run late. For dependable timing, disable the page-load trigger with `define( 'DISABLE_WP_CRON', true );` and call `wp cron event run --due-now` from a server cron job every few minutes. Reports & Alerts shows scheduling health and missed runs.

= Does it protect my site? =
No. It reports observable risks only. It does not block attacks or remove malware.

= Does it work on multisite? =
Network mode is not supported. Each site scans only itself, and a notice explains this limitation.

= How do I get support or report a security issue? =
Use the plugin's support forum on WordPress.org. To report a security issue privately, email info@appstech.co.nz.

== Screenshots ==

1. Dashboard with the latest scan, severity summary and scheduling health.
2. Findings list with a finding expanded to show evidence, limitations and remediation.
3. Scan history and comparison with the previous scan.
4. Reports & Alerts with recipients, test email and report status.
5. Settings for schedule, timezone, retention and data on uninstall.
6. Dashboard on a mobile screen.

== Changelog ==

= 1.1.0 =
* New: live vulnerability feed. Plugins, themes and WordPress are checked for known vulnerabilities, with the fixed version to update to, or advice to deactivate or replace when no patch exists. Inactive items are reported one severity step lower.
* New: PHP advisory data is refreshed from the feed when it is newer than the bundled data.
* New: email alerts for newly found vulnerabilities (Daily, Weekly digest or Off) with its own recipient list, and a dismissible admin notice for critical and high findings.
* New: "Vulnerability data" panel with last update, status, a Check now button and data source attribution.
* New: the feed is optional and off by default. Turn it on during setup or in Settings (see External services).

= 1.0.0 =
* First public release.
* Read-only scan of PHP version risk, WordPress core, plugin and theme update status, and configuration checks.
* Scan history with comparison to the previous scan.
* Daily email report, critical alerts and test email.
* Privacy export and erasure support, CSV and JSON history export.

== Upgrade Notice ==

= 1.1.0 =
Adds an optional vulnerability feed. It is off by default and makes no requests until you turn it on in Settings. See External services.

= 1.0.0 =
First public release.
