=== Sentinelo ===
Contributors: sentinelo
Tags: maintenance, backup, security, monitoring, updates
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 1.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects your WordPress site to the Sentinelo maintenance platform: encrypted cloud backups, security scans, updates and uptime monitoring.

== Description ==

Sentinelo is a lightweight agent that connects a WordPress site to the [Sentinelo](https://sentinelo.fr) maintenance platform, used by agencies and freelancers to look after a fleet of client sites from one place — under their own brand.

**This plugin requires a Sentinelo account.** On its own it does nothing: it waits for an API key, then answers authenticated requests from the platform.

Once connected, the platform can:

* **Back up** the site (database and files), encrypted on the site before upload, to cloud object storage. Large sites are archived, encrypted and uploaded in resumable steps, so backups complete even on shared hosting with short PHP time limits. Daily backups are differential against the last full one; a restore only ever needs two archives.
* **Restore** a backup, with a safety backup taken first.
* **Scan security**: 19 checks (file permissions, exposed files, debug mode, admin accounts, outdated components, suspicious file signatures, WordPress core integrity against the official checksums…), scored out of 100.
* **Apply updates** to plugins, themes, translations and core through the standard WordPress upgrader, with a per-component snapshot taken before each update and an automatic rollback if the update fails.
* **Harden** the site on request (hide the WordPress version, disable the file editor, XML-RPC or user enumeration, block PHP execution in uploads) — every hardening measure is reversible and is removed when the plugin is deactivated.
* **Report** health, versions and pending updates through a heartbeat, used for uptime alerts and the monthly client report.

Nothing is added to the front end of your site. The plugin adds a single settings page under **Settings › Sentinelo**.

= Security model =

* Every request from the platform is authenticated with a per-site API key (compared in constant time) and can be restricted to the platform's IP address.
* Outgoing webhooks are signed (HMAC-SHA256) with a per-site secret.
* The API key and the storage credentials are stored encrypted in the database.
* Backups are encrypted on your server before they leave it (authenticated encryption).

== External services ==

This plugin is a connector to a third-party service, the Sentinelo platform, and relies on the external services listed below. It only contacts them **after you have entered a Sentinelo API key** in Settings › Sentinelo, which is how you consent to the connection. Without a key, it makes no outgoing request.

Requests the plugin makes to your own site (security checks such as security headers, exposed files or directory listing, and the SEO audit, which reads your own pages) stay on your site and are not listed here.

= Sentinelo platform (backend.sentinelo.fr) =

The Sentinelo platform is the service this plugin connects to; it is operated by Sentinelo, the author of this plugin. The plugin sends requests to https://backend.sentinelo.fr only.

* **What is sent and when:**
  * When you save the API key: the key and your site URL, to verify the connection (`/api/sites/verify`).
  * Every few minutes (heartbeat): the site URL, the WordPress, PHP and plugin versions.
  * Every hour, and whenever a backup, scan, update or restore completes: the list of installed plugins and themes with their versions and update status, security scan results, backup and restore status, the database size, and the date of the last login of each administrator account. No passwords, no post or page content, no visitor data.
  * On request from the platform: the plugin's own logs, and a connectivity check that measures how long a request to `https://backend.sentinelo.fr/api/health` takes (no data is sent).
  * When the plugin is deleted: one signed notice telling the platform the site was disconnected.
* Terms of service: https://sentinelo.fr/cgv
* Privacy policy: https://sentinelo.fr/politique-confidentialite
* Sub-processors: https://sentinelo.fr/sous-traitants

= Cloud object storage: Backblaze B2, Cloudflare R2, Amazon S3 or another S3-compatible service =

Backup archives are uploaded to the S3-compatible object storage configured for your site in the Sentinelo platform. By default this is Backblaze B2 (`s3.<region>.backblazeb2.com`). Depending on that configuration it can instead be Cloudflare R2 (`<account>.r2.cloudflarestorage.com`), Amazon S3 (`s3.amazonaws.com`), or another S3-compatible endpoint you or your agency chose.

* **What is sent:** backup archives of your database and files, **encrypted on your server before upload** (the storage provider cannot read them), and the requests needed to list, download and delete those archives.
* **When:** when a backup runs (on the schedule set in the platform, or on demand), when old backups are pruned by the retention policy, and when a backup is downloaded for a restore. On request from the platform, a connectivity check also measures how long a request to `https://s3.eu-central-003.backblazeb2.com/` takes (no data is sent).
* Backblaze — terms: https://www.backblaze.com/company/policy/terms-of-service — privacy: https://www.backblaze.com/company/policy/privacy
* Cloudflare R2 — terms: https://www.cloudflare.com/terms/ — privacy: https://www.cloudflare.com/privacypolicy/
* Amazon S3 — terms: https://aws.amazon.com/service-terms/ — privacy: https://aws.amazon.com/privacy/

= WordPress.org =

* The core integrity check downloads the official checksums for your WordPress version from `https://api.wordpress.org/core/checksums/1.0/`, and restoring a modified core file downloads that file from `https://core.svn.wordpress.org/`. Only your WordPress version and locale are sent.
* When listing plugins, the plugin reads public information (last update date) about installed plugins from the WordPress.org plugin directory, through the standard WordPress `plugins_api()` function.
* On request from the platform, the connectivity check also times one request to `https://api.wordpress.org/core/version-check/1.7/`, to tell "this site is slow to reach everything" apart from "this site is slow to reach Sentinelo". No data is sent.
* WordPress.org privacy policy: https://wordpress.org/about/privacy/

= WPScan (optional, off by default) =

If, and only if, a WPScan API token is configured, the plugin queries `https://wpscan.com/api/v3/plugins/` for known vulnerabilities of installed plugins when the platform lists the plugins (results are cached). Only plugin slugs and the token are sent.

* WPScan terms: https://wpscan.com/terms
* WPScan privacy policy (Automattic): https://automattic.com/privacy/

== Installation ==

1. Install the plugin from **Plugins › Add New** (search for "Sentinelo") and activate it.
2. In your Sentinelo dashboard, add the site: you get an API key.
3. Go to **Settings › Sentinelo**, paste the key and save. The plugin verifies it with the platform and the site appears as connected within a minute.

If your site sits behind a firewall or security plugin, allow the platform's IP address shown in the Sentinelo dashboard.

== Frequently Asked Questions ==

= Do I need a Sentinelo account? =

Yes. The plugin is the on-site agent of the Sentinelo platform and has no standalone features. Plans are described at https://sentinelo.fr/tarifs.

= Will it slow down my site? =

No. Nothing runs on front-end page loads. Heavy work (backups, scans) runs in short background steps triggered by the platform, and the REST endpoints answer in well under a second.

= Where are backups stored? Can Sentinelo read them? =

On S3-compatible object storage (Backblaze B2 by default). Archives are encrypted on your server before upload.

= Where does the plugin write files on my server? =

Only in `wp-content/uploads/sentinelo/` (or wherever your uploads directory is): its logs, and backup archives while they are being built and uploaded, which are deleted once the upload is done. The folder is protected by an `.htaccess` file on Apache and LiteSpeed. On Nginx, add a rule denying access to it, for example `location ^~ /wp-content/uploads/sentinelo/ { deny all; }`. The folder is removed when you delete the plugin.

= Does it work on shared hosting? =

Yes — it was designed for it. Archiving, encryption and upload are resumable and split into steps that fit within typical PHP time limits, and the platform resumes them even on sites with no traffic (WP-Cron only runs when someone visits).

= What happens if I deactivate the plugin? =

The connection stops, scheduled tasks are cleared and any hardening applied from the platform is removed. Deleting the plugin removes its options and tables. Backups already uploaded remain in storage and are managed from the platform.

= Does it work with my firewall or security plugin? =

Usually. If a firewall blocks the platform, the Sentinelo dashboard says so explicitly and tells you which IP address to allow.

== Changelog ==

= 1.5.0 =
* First release on WordPress.org. Updates are now delivered by WordPress.org.
* Resumable archive, encryption and upload steps for large sites on shared hosting.
* Differential backups; the full backup a differential depends on is never pruned while it is needed.
* Component snapshots before updates are kept (3 per component, 30 days) and can be restored from the platform.
* Reversible hardening actions, core integrity check, core file restore and IP blocking at login.

Earlier versions were distributed privately to Sentinelo customers.

== Upgrade Notice ==

= 1.5.0 =
First WordPress.org release. Future updates arrive through the standard WordPress update screen.
