Plugin Directory

Changeset 3737723


Ignore:
Timestamp:
10/10/2026 08:01:09 AM (2 weeks ago)
Author:
nhrrob
Message:

Update to version 2.2.0 from GitHub

Location:
nhrrob-secure
Files:
2 added
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • nhrrob-secure/tags/2.2.0/composer.json

    r3728630 r3737723  
    3131        "wp-coding-standards/wpcs": "^3.1",
    3232        "phpcsstandards/phpcsutils": "^1.0",
    33         "dealerdirect/phpcodesniffer-composer-installer": "^1.0"
     33        "dealerdirect/phpcodesniffer-composer-installer": "^1.0",
     34        "phpcompatibility/phpcompatibility-wp": "^3.0@alpha",
     35        "phpcompatibility/php-compatibility": "^10.0@alpha",
     36        "phpcompatibility/phpcompatibility-paragonie": "^2.0@alpha"
    3437    },
    3538    "scripts": {
    … …  
    4346        "allow-plugins": {
    4447            "dealerdirect/phpcodesniffer-composer-installer": true
     48        },
     49        "platform": {
     50            "php": "7.4.33"
    4551        }
    4652    }
  • nhrrob-secure/tags/2.2.0/includes/Cli/Commands.php

    r3728630 r3737723  
    2626         * Show the score, the failed checks and what is switched on.
    2727         *
     28         * ## OPTIONS
     29         *
     30         * [--format=<format>]
     31         * : json prints the same facts as one JSON object. Default is plain lines.
     32         *
    2833         * ## EXAMPLES
    2934         *
    3035         *     wp nhrrob-secure status
     36         *     wp nhrrob-secure status --format=json
    3137         *
     38         * @param array $args       Positional arguments.
     39         * @param array $assoc_args Flags.
    3240         * @return void
    3341         */
    34         public function status() {
     42        public function status( $args = [], $assoc_args = [] ) {
    3543                $checks = Checks::run();
     44                if ( isset( $assoc_args['format'] ) && 'json' === $assoc_args['format'] ) {
     45                        \WP_CLI::line(
     46                                (string) wp_json_encode(
     47                                        [
     48                                                'score'          => Checks::score( $checks ),
     49                                                'safe_mode'      => Settings::safe_mode(),
     50                                                'login_address'  => LoginUrl::active() ? LoginUrl::url() : 'wp-login.php',
     51                                                'request_filter' => Settings::get( 'request_filter' ),
     52                                                'locked_out'     => count( LoginGuard::locked() ),
     53                                                'failed_checks'  => array_values(
     54                                                        array_filter(
     55                                                                $checks,
     56                                                                function ( $check ) {
     57                                                                        return ! $check['passed'];
     58                                                                }
     59                                                        )
     60                                                ),
     61                                        ]
     62                                )
     63                        );
     64                        return;
     65                }
    3666                \WP_CLI::line( sprintf( 'Score: %d / 100', Checks::score( $checks ) ) );
    3767                \WP_CLI::line( 'Safe mode: ' . ( Settings::safe_mode() ? 'on' : 'off' ) );
  • nhrrob-secure/tags/2.2.0/includes/Core/Bootstrap.php

    r3729213 r3737723  
    7575                ( new Monitor() )->hooks();
    7676                ( new Passwords() )->hooks();
     77                // Read-only abilities for AI agents and MCP clients (WordPress 6.9+; inert before).
     78                ( new Abilities() )->hooks();
    7779
    7880                add_action( Vulnerabilities::CRON, [ Vulnerabilities::class, 'cron' ] );
  • nhrrob-secure/tags/2.2.0/nhrrob-secure.php

    r3729213 r3737723  
    66 * Author: Nazmul Hasan Robin
    77 * Author URI: https://profiles.wordpress.org/nhrrob/
    8  * Version: 2.1.0
     8 * Version: 2.2.0
    99 * Requires at least: 6.0
    1010 * Requires PHP: 7.4
    … …  
    3232         * @var string
    3333         */
    34         const version = '2.1.0'; // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase -- nhrrob plugin standard.
     34        const version = '2.2.0'; // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase -- nhrrob plugin standard.
    3535
    3636        /**
  • nhrrob-secure/tags/2.2.0/readme.txt

    r3729213 r3737723  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 2.1.0
     7Stable tag: 2.2.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8787* No database tables. Everything is stored in a handful of capped options.
    8888* No visitor is looked up with an outside service.
    89 * Settings can be exported and imported. WP-CLI commands are included.
     89* Settings can be exported and imported. WP-CLI commands are included (`wp nhrrob-secure status --format=json` for scripts).
     90* AI agent and MCP ready, read-only: on WordPress 6.9 and later, AI agents and MCP clients (through the WordPress MCP Adapter) can read the security score, the checks and the known vulnerabilities. Administrators only. No ability changes a setting.
    9091
    9192= What it is not =
    … …  
    150151
    151152Put the `[nhrrob_secure_2fa]` shortcode on any page. With WooCommerce it also appears under My account → Account details.
     153
     154= Can an AI agent or MCP client use this plugin? =
     155
     156Only to read, on WordPress 6.9 or later. The plugin registers two abilities with the WordPress Abilities API: `nhrrob-secure/get-security-status` (score, checks, counts) and `nhrrob-secure/list-vulnerabilities` (the last vulnerability check). Both need an administrator. An agent cannot change a setting, unlock an address or touch a file, and it is never given the login address, your address rules, usernames, visitor addresses or the activity log. To use the abilities over MCP, install the WordPress MCP Adapter plugin; this plugin does not bundle it.
     157
     158= Which PHP versions are supported? =
     159
     160PHP 7.4 and every later version. Each change is tested on PHP 7.4 through 8.5, and on the upcoming 8.6.
    152161
    153162= Does the plugin create database tables? =
    … …  
    200209
    201210== Changelog ==
     211
     212= 2.2.0 - 10/10/2026 =
     213- New: read-only AI agent and MCP support. On WordPress 6.9+ the plugin registers two abilities with the WordPress Abilities API: the security status (score, checks, counts) and the known vulnerabilities. Administrators only; nothing can be changed through them.
     214- New: `wp nhrrob-secure status --format=json`.
     215- Compatibility: verified on PHP 7.4 through 8.5 and on PHP 8.6 release candidates.
     216- Developer: every pull request now runs the PHPCompatibilityWP ruleset plus a syntax check, the unit tests and a runtime smoke test on each supported PHP version. The security probe also covers abilities.
    202217
    203218= 2.1.0 - 05/10/2026 =
    … …  
    319334== Upgrade Notice ==
    320335
     336= 2.2.0 =
     337Read-only AI agent and MCP support on WordPress 6.9+, a JSON status command for WP-CLI, and verified PHP 7.4 to 8.5 compatibility. No settings change.
     338
    321339= 2.1.0 =
    322340New protections and tools, all off until you switch them on. Open the Dashboard for the recommended setup.
  • nhrrob-secure/tags/2.2.0/vendor/composer/installed.php

    r3729213 r3737723  
    22    'root' => array(
    33        'name' => 'nhrrob/secure',
    4         'pretty_version' => 'v2.1.0',
    5         'version' => '2.1.0.0',
    6         'reference' => 'eecc1b4da298525456bc2ddfe5096cd52e7b2a98',
     4        'pretty_version' => 'v2.2.0',
     5        'version' => '2.2.0.0',
     6        'reference' => '3d06174df8b536b5c58bb796b0e7e82228069f5e',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
    … …  
    1212    'versions' => array(
    1313        'nhrrob/secure' => array(
    14             'pretty_version' => 'v2.1.0',
    15             'version' => '2.1.0.0',
    16             'reference' => 'eecc1b4da298525456bc2ddfe5096cd52e7b2a98',
     14            'pretty_version' => 'v2.2.0',
     15            'version' => '2.2.0.0',
     16            'reference' => '3d06174df8b536b5c58bb796b0e7e82228069f5e',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • nhrrob-secure/trunk/composer.json

    r3728630 r3737723  
    3131        "wp-coding-standards/wpcs": "^3.1",
    3232        "phpcsstandards/phpcsutils": "^1.0",
    33         "dealerdirect/phpcodesniffer-composer-installer": "^1.0"
     33        "dealerdirect/phpcodesniffer-composer-installer": "^1.0",
     34        "phpcompatibility/phpcompatibility-wp": "^3.0@alpha",
     35        "phpcompatibility/php-compatibility": "^10.0@alpha",
     36        "phpcompatibility/phpcompatibility-paragonie": "^2.0@alpha"
    3437    },
    3538    "scripts": {
    … …  
    4346        "allow-plugins": {
    4447            "dealerdirect/phpcodesniffer-composer-installer": true
     48        },
     49        "platform": {
     50            "php": "7.4.33"
    4551        }
    4652    }
  • nhrrob-secure/trunk/includes/Cli/Commands.php

    r3728630 r3737723  
    2626         * Show the score, the failed checks and what is switched on.
    2727         *
     28         * ## OPTIONS
     29         *
     30         * [--format=<format>]
     31         * : json prints the same facts as one JSON object. Default is plain lines.
     32         *
    2833         * ## EXAMPLES
    2934         *
    3035         *     wp nhrrob-secure status
     36         *     wp nhrrob-secure status --format=json
    3137         *
     38         * @param array $args       Positional arguments.
     39         * @param array $assoc_args Flags.
    3240         * @return void
    3341         */
    34         public function status() {
     42        public function status( $args = [], $assoc_args = [] ) {
    3543                $checks = Checks::run();
     44                if ( isset( $assoc_args['format'] ) && 'json' === $assoc_args['format'] ) {
     45                        \WP_CLI::line(
     46                                (string) wp_json_encode(
     47                                        [
     48                                                'score'          => Checks::score( $checks ),
     49                                                'safe_mode'      => Settings::safe_mode(),
     50                                                'login_address'  => LoginUrl::active() ? LoginUrl::url() : 'wp-login.php',
     51                                                'request_filter' => Settings::get( 'request_filter' ),
     52                                                'locked_out'     => count( LoginGuard::locked() ),
     53                                                'failed_checks'  => array_values(
     54                                                        array_filter(
     55                                                                $checks,
     56                                                                function ( $check ) {
     57                                                                        return ! $check['passed'];
     58                                                                }
     59                                                        )
     60                                                ),
     61                                        ]
     62                                )
     63                        );
     64                        return;
     65                }
    3666                \WP_CLI::line( sprintf( 'Score: %d / 100', Checks::score( $checks ) ) );
    3767                \WP_CLI::line( 'Safe mode: ' . ( Settings::safe_mode() ? 'on' : 'off' ) );
  • nhrrob-secure/trunk/includes/Core/Bootstrap.php

    r3729213 r3737723  
    7575                ( new Monitor() )->hooks();
    7676                ( new Passwords() )->hooks();
     77                // Read-only abilities for AI agents and MCP clients (WordPress 6.9+; inert before).
     78                ( new Abilities() )->hooks();
    7779
    7880                add_action( Vulnerabilities::CRON, [ Vulnerabilities::class, 'cron' ] );
  • nhrrob-secure/trunk/nhrrob-secure.php

    r3729213 r3737723  
    66 * Author: Nazmul Hasan Robin
    77 * Author URI: https://profiles.wordpress.org/nhrrob/
    8  * Version: 2.1.0
     8 * Version: 2.2.0
    99 * Requires at least: 6.0
    1010 * Requires PHP: 7.4
    … …  
    3232         * @var string
    3333         */
    34         const version = '2.1.0'; // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase -- nhrrob plugin standard.
     34        const version = '2.2.0'; // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase -- nhrrob plugin standard.
    3535
    3636        /**
  • nhrrob-secure/trunk/readme.txt

    r3729213 r3737723  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 2.1.0
     7Stable tag: 2.2.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8787* No database tables. Everything is stored in a handful of capped options.
    8888* No visitor is looked up with an outside service.
    89 * Settings can be exported and imported. WP-CLI commands are included.
     89* Settings can be exported and imported. WP-CLI commands are included (`wp nhrrob-secure status --format=json` for scripts).
     90* AI agent and MCP ready, read-only: on WordPress 6.9 and later, AI agents and MCP clients (through the WordPress MCP Adapter) can read the security score, the checks and the known vulnerabilities. Administrators only. No ability changes a setting.
    9091
    9192= What it is not =
    … …  
    150151
    151152Put the `[nhrrob_secure_2fa]` shortcode on any page. With WooCommerce it also appears under My account → Account details.
     153
     154= Can an AI agent or MCP client use this plugin? =
     155
     156Only to read, on WordPress 6.9 or later. The plugin registers two abilities with the WordPress Abilities API: `nhrrob-secure/get-security-status` (score, checks, counts) and `nhrrob-secure/list-vulnerabilities` (the last vulnerability check). Both need an administrator. An agent cannot change a setting, unlock an address or touch a file, and it is never given the login address, your address rules, usernames, visitor addresses or the activity log. To use the abilities over MCP, install the WordPress MCP Adapter plugin; this plugin does not bundle it.
     157
     158= Which PHP versions are supported? =
     159
     160PHP 7.4 and every later version. Each change is tested on PHP 7.4 through 8.5, and on the upcoming 8.6.
    152161
    153162= Does the plugin create database tables? =
    … …  
    200209
    201210== Changelog ==
     211
     212= 2.2.0 - 10/10/2026 =
     213- New: read-only AI agent and MCP support. On WordPress 6.9+ the plugin registers two abilities with the WordPress Abilities API: the security status (score, checks, counts) and the known vulnerabilities. Administrators only; nothing can be changed through them.
     214- New: `wp nhrrob-secure status --format=json`.
     215- Compatibility: verified on PHP 7.4 through 8.5 and on PHP 8.6 release candidates.
     216- Developer: every pull request now runs the PHPCompatibilityWP ruleset plus a syntax check, the unit tests and a runtime smoke test on each supported PHP version. The security probe also covers abilities.
    202217
    203218= 2.1.0 - 05/10/2026 =
    … …  
    319334== Upgrade Notice ==
    320335
     336= 2.2.0 =
     337Read-only AI agent and MCP support on WordPress 6.9+, a JSON status command for WP-CLI, and verified PHP 7.4 to 8.5 compatibility. No settings change.
     338
    321339= 2.1.0 =
    322340New protections and tools, all off until you switch them on. Open the Dashboard for the recommended setup.
  • nhrrob-secure/trunk/vendor/composer/installed.php

    r3729213 r3737723  
    22    'root' => array(
    33        'name' => 'nhrrob/secure',
    4         'pretty_version' => 'v2.1.0',
    5         'version' => '2.1.0.0',
    6         'reference' => 'eecc1b4da298525456bc2ddfe5096cd52e7b2a98',
     4        'pretty_version' => 'v2.2.0',
     5        'version' => '2.2.0.0',
     6        'reference' => '3d06174df8b536b5c58bb796b0e7e82228069f5e',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
    … …  
    1212    'versions' => array(
    1313        'nhrrob/secure' => array(
    14             'pretty_version' => 'v2.1.0',
    15             'version' => '2.1.0.0',
    16             'reference' => 'eecc1b4da298525456bc2ddfe5096cd52e7b2a98',
     14            'pretty_version' => 'v2.2.0',
     15            'version' => '2.2.0.0',
     16            'reference' => '3d06174df8b536b5c58bb796b0e7e82228069f5e',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.