=== SysLock – Lightweight Hardening & Update Quarantine ===
Contributors: jbg001
Tags: security, hardening, updates, checksum, permissions
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Surgical WordPress security: identity lock, 72-hour auto-update quarantine, and on-demand core checksum & POSIX permissions audit.

== Description ==

**SysLock** is a zero-bloat, set-and-forget security plugin built for site owners and maintainers who want essential hardening without heavy firewalls, frontend scripts, or external cloud accounts.

Activate it and it works immediately with sane defaults—no setup wizards, no dashboard clutter, and zero impact on frontend page load times.

= Core Protections =

* **Identity & Hijack Lock:** Blocks unauthorized user creation, privilege escalation to the Administrator role, Application Password generation, and silent changes to critical site options (`siteurl`, `home`, `default_role`, `users_can_register`) across the UI, REST API, and XML-RPC.
* **72-Hour Auto-Update Quarantine:** Intercepts automatic plugin and theme updates and holds them for a 72-hour stabilization buffer before allowing installation, protecting your site against broken or compromised supply-chain releases.
* **On-Demand Integrity, Permissions & Exposure Audit:** Verifies WordPress core files against official WordPress.org MD5 checksums, scans `wp-content/uploads` for hidden PHP executables, checks POSIX permission bitmasks on critical directories and `wp-config.php`, and flags publicly exposed backups, SQL dumps, `.git` folders, or debug logs.
* **Rate-Limited Email Alerts:** Sends plain-text notifications to the site administrator email whenever an unauthorized action is blocked (capped at 1 email per hour per event type) or if the plugin is temporarily deactivated.
* **WP-CLI Support:** Run audits directly from the terminal via `wp syslock audit`.

= Privacy & External Services =

SysLock stores only minimal operational state in the `wp_options` table (with `autoload` disabled) and sends no telemetry or tracking data.

When you manually trigger an audit, the plugin queries the official WordPress.org Checksums API (`https://api.wordpress.org/core/checksums/1.0/`) solely to retrieve the reference MD5 hashes for your current WordPress version and locale.

== Installation ==

1. Upload the `syslock` folder to `/wp-content/plugins/`, or install the ZIP package directly from **Plugins → Add New → Upload Plugin**.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Visit **Tools → SysLock** to review protection status, view quarantined updates, and run an on-demand security audit.

== Frequently Asked Questions ==

= How do I create a new user or administrator when SysLock is active? =

Temporarily deactivate SysLock from **Plugins** (you will receive an email reminder to re-enable it when done), or define `define( 'SYSLOCK_UNLOCK', true );` in your `wp-config.php` file during maintenance.

= Does temporarily deactivating SysLock reset the 72-hour update quarantine? =

No. Quarantine timestamps and recent blocked event logs are preserved across temporary deactivations so you do not lose stabilization progress during routine maintenance.

= Does SysLock modify file permissions automatically? =

No. The POSIX permissions check is strictly read-only and diagnostic—it never runs `chmod()` or alters your server filesystem.

= Does this plugin load any CSS or JavaScript on the public site? =

None at all. SysLock runs exclusively on targeted backend hooks and adds zero assets or database queries to frontend visitors.

== Screenshots ==

1. Clean native status screen under Tools → SysLock showing active protections, audit findings, quarantined updates, and recent blocked events.
2. Example of an on-demand audit catching world-writable POSIX permissions and an exposed SQL dump in the webroot.

== Changelog ==

= 1.0.0 =
* Initial public release.
* Added Identity & Hijack Lock (users, admin roles, Application Passwords, and core URLs/registration options).
* Added 72-hour automatic update quarantine for plugins and themes.
* Added on-demand Core Checksum, uploads PHP scanner, POSIX permissions, and exposed archive/log auditor.
* Added WP-CLI command `wp syslock audit`.

== Upgrade Notice ==

= 1.0.0 =
Initial public release of SysLock.
