=== Hinsight Security ===
Contributors: hinsight
Tags: security, malware scanner, firewall, login security, two-factor
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.11.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Malware scan from inside your site, HTTPS and security headers, login protection, firewall and reversible quarantine. No account, no credits.

== Description ==

Hinsight Security checks your WordPress site from the inside and hardens it, without any account or paid credits. The interface is available in English and French.

= Scan =
* WordPress core, plugins and themes from WordPress.org compared with their official files (modified or added files).
* Malicious code search in the other files: premium plugins and themes, site root, uploads.
* Known vulnerabilities of core, plugins and themes.
* PHP files in uploads, double extensions, images containing code.
* Persistence points: must-use plugins, auto_prepend_file, conditional redirects in .htaccess.
* Database: recent administrators, injected scripts, options left by known malware, unknown scheduled tasks.
* Configuration: security keys, debug mode, open registration, inactive plugins.
* Administrator accounts review: last login, two-factor status, accounts to check; reset password or remove rights in one click.
* Comparison with the previous scan, files marked as safe, PDF report and JSON export.

= Actions =
* Quarantine of a suspicious file: moved, made non-executable, restorable in one click.
* Restore the official version of a modified core file (checksum verified).

= Protections (each one can be enabled separately) =
* Forced HTTPS with certificate check, mixed content fix, security headers, HSTS.
* Login attempts limit, e-mail verification code for administrators, neutral error messages.
* Custom login URL.
* Authenticator app codes (TOTP) with backup codes.
* Passwords: strength required for editorial roles, refusal of leaked passwords (Have I Been Pwned, k-anonymity), application passwords can be disabled.
* After a hack: log everyone out, reset passwords, new security keys, revoke application passwords.
* Firewall: SQL injection, file inclusion, directory traversal, scripts in URLs and forms, attack bots, bursts of 404 pages; trusted IP addresses; block log.
* Anti-spam without captcha or external service: comments, registrations, Contact Form 7, WPForms, Elementor, Fluent Forms, WooCommerce.
* Hardening: XML-RPC, file editor, WordPress version, user list in the REST API, PHP in uploads.

= Hinsight family =
Hinsight Security shares a common "Hinsight" menu with the other Hinsight plugins (Backup, Performance, SEO, Compliance), each installed separately.

== External services ==

This plugin connects to the following services. Nothing is sent to Hinsight unless the administrator links the site with a key.

* **WordPress.org** (api.wordpress.org, downloads.wordpress.org, core.svn.wordpress.org): official checksums and files of core, plugins and themes, to detect modified files. Sent: component slugs and versions. [Terms](https://wordpress.org/about/privacy/)
* **WPVulnerability** (www.wpvulnerability.net), only if the administrator ticks "Also check known vulnerabilities" on the analysis page (off by default): known vulnerabilities. Sent: name and version of the core, plugins and themes, and the site's IP address as with any web request. [Website](https://www.wpvulnerability.net/)
* **Have I Been Pwned** (api.pwnedpasswords.com), only if the "leaked passwords" option is enabled: the first 5 characters of the SHA-1 hash of a new password (k-anonymity, the password itself is never sent). [Privacy](https://haveibeenpwned.com/Privacy)
* **Hinsight** (app.hinsight.org), only if the administrator chooses it:
    * "Get a free key": the e-mail address entered, the site address and the site name are sent to create the key, which is delivered by e-mail.
    * Once a key is saved: the scan report (findings, file paths, administrator accounts with their e-mail, versions) and the status of the Hinsight plugins are sent after each scan, for monitoring and alerts. The site never receives commands from app.hinsight.org: Hinsight cannot change anything on the site.
    * Removing the key stops all exchanges.
    [Terms](https://www.hinsight.org/conditions-depannage-surveillance) · [Privacy policy](https://www.hinsight.org/politique-confidentialite)

== Installation ==

1. Plugins > Add New > Upload Plugin, choose hinsight-security.zip, then activate. Or search "Hinsight Security" in Plugins > Add New.
2. Hinsight menu > Security > Run the analysis, then Hinsight > Protections.
3. Uninstalling removes the plugin settings. Quarantined files are kept in the database (never on disk) and removed on uninstall: restore the ones you need first.

If you are locked out by the e-mail verification, add `define( 'HINSIGHT_SANS_DOUBLE_AUTH', true );` to wp-config.php. If you forgot the custom login URL, add `define( 'HINSIGHT_CONNEXION_STANDARD', true );`.

== Frequently Asked Questions ==

= Do I need an account? =
No. Every feature works without an account. A free key is optional: it adds e-mail alerts when a critical issue is found. Paid monitoring plans add off-site daily backups, safe updates with rollback and a monthly report.

= Is the interface available in English? =
Yes. The interface is in English; translations come from translate.wordpress.org and follow the site language.

= Does the scan slow down my site? =
The scan runs in short steps in the background and can be scheduled weekly.

== Screenshots ==

1. Hinsight dashboard: security, backups, speed, SEO and compliance scores at a glance.
2. Scan results with findings by severity.
3. Protections, each one with its own switch.

== Changelog ==

= 2.11.4 =
* Custom login address: wp-login.php and wp-admin are now also blocked when WordPress is installed in a subdirectory (siteurl different from home).
* Malware scan: allowed script hosts are matched on the exact domain or its subdomains, no longer on a substring.
* Admin accounts: the site domain check on email addresses is now exact.

= 2.11.3 =
* Wrong two-step codes now count toward the login attempt limit.
* Custom login address: rewriting also checks the installation path.

= 2.11.2 =
* Plugin labels registered on init (no early translation notice).
* Firewall: only sessions validated by WordPress skip the checks.
* Custom login address: only this site's wp-login.php links are rewritten.

= 2.11.1 =
* Code quality: no HTML inside translatable strings. No visible change.

= 2.11.0 =
* Quarantine: quarantined files are kept in the database, never on disk.
* Emergency: new security keys no longer keep a copy of the old wp-config.php.
* Scan: works when wp-content, plugins, themes or uploads are moved outside the installation.
* Known vulnerabilities: the WPVulnerability check is now optional and off by default.
* No more remote commands: Hinsight cannot run any action on the site.

= 2.10.8 =
* Interface: shorter French tab labels so the header fits on one line.

= 2.10.7 =
* Scan: the WordPress core line now separates modified files from files marked as safe.
* Interface: the Hinsight header tabs fit on one line.

= 2.10.6 =
* WordPress.org Plugin Check compliance: HTML output filtered with wp_kses, file operations through WordPress functions, translator comments. No visible change.

= 2.10.5 =
* Updates started from app.hinsight.org: the second of several plugins updated in a row is no longer refused.

= 2.10.4 =
* Scan: no more false alarms on valid images whose bytes contain "<?=" by chance, or on WordPress root files identical to the official release.

= 2.10.2 =
* Contact address shown in the plugin: hello@hinsight.org.
* Dates and score labels follow the site language.

= 2.10.1 =
* Score gauge label translated.

= 2.10.0 =
* Translatable plugin: English interface, French translation included (admin pages, e-mails, scripts).

= 2.9.0 =
* Free key requested from the plugin, delivered by e-mail.
* Hinsight link card explains what is free, what a plan adds and what is sent.

= 2.8.0 =
* "Services Hinsight" page; help suggested when an issue is found.

= 2.7.0 =
* Safe updates started from app.hinsight.org: copy, home page check, automatic rollback.

= 2.6.0 =
* Administrator accounts review: last login, two-factor status, accounts to check, password reset and rights removal.

== Third-party libraries ==

QR codes are generated in the browser by qrcode-generator (Kazuhiko Arase, MIT license).
