ARGUS WordPress Defence 7.23.0
Real changes since 1.0.0, all live-verified before this release: - Firewall: rule corpus expanded 19 -> 43 rules, real OWASP-CRS-equivalent coverage (XXE, SSRF, session fixation, Log4Shell/JNDI, scanner-tool detection, deeper SQL injection/XSS/PHP-injection). - Fixed a real bug: a quarantined file's severity badge and its content analysis score could disagree with no explanation (e.g. a benign file showing CRITICAL next to Score 0); both are now derived consistently and shown together. - ARGUS now always keeps itself updated, and can optionally do the same for every other installed plugin and theme (Settings, on by default) -- uses WordPress's own native update system, nothing custom. - Global Threat Intelligence is now opt-in, not automatic -- a single click on its own page, with an honest, specific description of exactly what's shared (an IP address, a reason code, a confidence score, a country). Previously connected automatically on activation. - New first-run Welcome screen after activation: confirms what's already protecting the site, and surfaces the few real optional choices in one place. - Dashboard: running version now visible in the header; new "IPs Tracked" and "ANIS Protections" metrics. - Full WordPress.org Plugin Directory readiness audit performed against this codebase. Two real compliance issues found and fixed (see above: Global Threat Intelligence's default, and the self-update mechanism, which is excluded from this build entirely -- WordPress.org prohibits a plugin from using any update channel other than its own, even an inert one). This release is still self-distributed, not a WordPress.org submission -- that remains a future step. Verified before publishing: this exact ZIP was installed, activated (14 admin pages loaded clean, zero PHP errors/warnings), and uninstalled (zero leftover database tables or options) in a fresh, disposable WordPress + MySQL environment. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,28 @@ class Argus_Admin {
|
||||
add_action( 'admin_post_argus_wpd_download_backup', array( __CLASS__, 'handle_backup_download' ) );
|
||||
|
||||
add_action( 'admin_init', array( __CLASS__, 'handle_firewall_actions' ) );
|
||||
add_action( 'admin_init', array( __CLASS__, 'maybe_redirect_to_welcome' ) );
|
||||
}
|
||||
|
||||
// Standard WordPress plugin convention: redirect to a one-time Welcome
|
||||
// screen right after activation, but never on a bulk-activate or a
|
||||
// multisite network-wide activation (both would otherwise hijack
|
||||
// whichever admin page the user was actually trying to reach).
|
||||
public static function maybe_redirect_to_welcome() {
|
||||
if ( ! get_transient( 'argus_wpd_do_activation_redirect' ) ) {
|
||||
return;
|
||||
}
|
||||
delete_transient( 'argus_wpd_do_activation_redirect' );
|
||||
|
||||
if ( wp_doing_ajax() || is_network_admin() || isset( $_GET['activate-multi'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
||||
return;
|
||||
}
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_safe_redirect( admin_url( 'admin.php?page=argus-wpd-welcome' ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
public static function handle_firewall_actions() {
|
||||
@@ -84,10 +106,57 @@ class Argus_Admin {
|
||||
add_submenu_page( 'argus-wpd-dashboard', __( 'ANIS', 'argus-wordpress-defence' ), __( 'ANIS', 'argus-wordpress-defence' ), 'manage_options', 'argus-wpd-anis', array( __CLASS__, 'render_anis' ) );
|
||||
add_submenu_page( 'argus-wpd-dashboard', __( 'Audit Log', 'argus-wordpress-defence' ), __( 'Audit Log', 'argus-wordpress-defence' ), 'manage_options', 'argus-wpd-audit-log', array( __CLASS__, 'render_audit_log' ) );
|
||||
add_submenu_page( 'argus-wpd-dashboard', __( 'Settings', 'argus-wordpress-defence' ), __( 'Settings', 'argus-wordpress-defence' ), 'manage_options', 'argus-wpd-settings', array( __CLASS__, 'render_settings' ) );
|
||||
|
||||
// Reachable at ?page=argus-wpd-welcome right after activation, but
|
||||
// CSS-hidden from the sidebar (hide_settings_from_sidebar(), same
|
||||
// mechanism already used for Settings) -- it's a onboarding screen,
|
||||
// not a place to keep coming back to via the nav. Registering with a
|
||||
// real parent rather than null: passing null as parent_slug left
|
||||
// get_admin_page_title() unable to resolve a title in this WP
|
||||
// version, cascading into a "headers already sent" fatal-adjacent
|
||||
// warning -- confirmed live, not theoretical.
|
||||
add_submenu_page( 'argus-wpd-dashboard', __( 'Welcome to ARGUS Defence', 'argus-wordpress-defence' ), __( 'Welcome', 'argus-wordpress-defence' ), 'manage_options', 'argus-wpd-welcome', array( __CLASS__, 'render_welcome' ) );
|
||||
}
|
||||
|
||||
public static function render_welcome() {
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
wp_die( esc_html__( 'You do not have permission to do this.', 'argus-wordpress-defence' ) );
|
||||
}
|
||||
|
||||
$template_applied = null;
|
||||
if ( isset( $_POST['argus_wpd_apply_template_nonce'], $_POST['template'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['argus_wpd_apply_template_nonce'] ) ), 'argus_wpd_apply_template' ) ) { // phpcs:ignore
|
||||
$key = sanitize_key( wp_unslash( $_POST['template'] ) ); // phpcs:ignore
|
||||
if ( class_exists( 'Argus_Templates' ) && Argus_Templates::apply( $key ) ) {
|
||||
$templates = Argus_Templates::all();
|
||||
$template_applied = $templates[ $key ]['label'];
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $_POST['argus_wpd_anis_toggle_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['argus_wpd_anis_toggle_nonce'] ) ), 'argus_wpd_anis_toggle' ) ) { // phpcs:ignore
|
||||
$action = sanitize_key( wp_unslash( $_POST['anis_action'] ?? '' ) ); // phpcs:ignore
|
||||
$user = wp_get_current_user();
|
||||
if ( 'enable' === $action ) {
|
||||
Argus_Settings::update( array( 'anis_enabled' => true ) );
|
||||
Argus_ANIS_Client::register();
|
||||
Argus_Events::record( 'anis_enabled', 'info', sprintf( 'ARGUS Cloud connection enabled by %s', $user->user_login ), array( 'actor' => $user->user_login ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $_POST['argus_wpd_auto_update_all_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['argus_wpd_auto_update_all_nonce'] ) ), 'argus_wpd_save_auto_update_all' ) ) { // phpcs:ignore
|
||||
Argus_Settings::update( array( 'auto_update_all_enabled' => ! empty( $_POST['auto_update_all_enabled'] ) ) ); // phpcs:ignore
|
||||
}
|
||||
|
||||
$settings = Argus_Settings::all();
|
||||
$templates = class_exists( 'Argus_Templates' ) ? Argus_Templates::all() : array();
|
||||
$active_template = class_exists( 'Argus_Templates' ) ? Argus_Templates::active() : '';
|
||||
$recommended_template = class_exists( 'Argus_Templates' ) ? Argus_Templates::recommended() : null;
|
||||
$anis_status = Argus_ANIS_Client::status();
|
||||
|
||||
include ARGUS_WPD_DIR . 'admin/views/welcome.php';
|
||||
}
|
||||
|
||||
public static function hide_settings_from_sidebar() {
|
||||
echo '<style>#adminmenu .wp-submenu a[href$="page=argus-wpd-settings"]{display:none}</style>';
|
||||
echo '<style>#adminmenu .wp-submenu a[href$="page=argus-wpd-settings"],#adminmenu .wp-submenu a[href$="page=argus-wpd-welcome"]{display:none}</style>';
|
||||
}
|
||||
|
||||
public static function enqueue_assets( $hook ) {
|
||||
@@ -121,6 +190,15 @@ class Argus_Admin {
|
||||
$integrity_open = Argus_Findings::count_open( 'integrity' );
|
||||
$anis_status = Argus_ANIS_Client::status();
|
||||
|
||||
$ips_tracked = Argus_ANIS_Client::local_reputation_count();
|
||||
$anis_protections = Argus_ANIS_Client::blocked_count();
|
||||
|
||||
// Argus_License exists only in the separately-distributed Premium
|
||||
// build (see includes/class-argus-license.php's own header) -- the
|
||||
// free WordPress.org build has no trial/license concept at all, and
|
||||
// this stays null there so overview.php shows nothing for it.
|
||||
$license_summary = class_exists( 'Argus_License' ) ? Argus_License::summary() : null;
|
||||
|
||||
include ARGUS_WPD_DIR . 'admin/views/overview.php';
|
||||
}
|
||||
|
||||
@@ -530,6 +608,21 @@ class Argus_Admin {
|
||||
}
|
||||
|
||||
public static function render_anis() {
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
wp_die( esc_html__( 'You do not have permission to do this.', 'argus-wordpress-defence' ) );
|
||||
}
|
||||
if ( isset( $_POST['argus_wpd_anis_toggle_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['argus_wpd_anis_toggle_nonce'] ) ), 'argus_wpd_anis_toggle' ) ) { // phpcs:ignore
|
||||
$action = sanitize_key( wp_unslash( $_POST['anis_action'] ?? '' ) ); // phpcs:ignore
|
||||
$user = wp_get_current_user();
|
||||
if ( 'enable' === $action ) {
|
||||
Argus_Settings::update( array( 'anis_enabled' => true ) );
|
||||
Argus_ANIS_Client::register();
|
||||
Argus_Events::record( 'anis_enabled', 'info', sprintf( 'ARGUS Cloud connection enabled by %s', $user->user_login ), array( 'actor' => $user->user_login ) );
|
||||
} elseif ( 'disable' === $action ) {
|
||||
Argus_Settings::update( array( 'anis_enabled' => false ) );
|
||||
Argus_Events::record( 'anis_disabled', 'info', sprintf( 'ARGUS Cloud connection disabled by %s', $user->user_login ), array( 'actor' => $user->user_login ) );
|
||||
}
|
||||
}
|
||||
$anis_status = Argus_ANIS_Client::status();
|
||||
include ARGUS_WPD_DIR . 'admin/views/anis.php';
|
||||
}
|
||||
@@ -582,6 +675,11 @@ class Argus_Admin {
|
||||
Argus_Settings::remove_exception( 'ip', sanitize_text_field( wp_unslash( $_POST['exception_value'] ) ) ); // phpcs:ignore
|
||||
}
|
||||
|
||||
if ( isset( $_POST['argus_wpd_auto_update_all_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['argus_wpd_auto_update_all_nonce'] ) ), 'argus_wpd_save_auto_update_all' ) ) { // phpcs:ignore
|
||||
Argus_Settings::update( array( 'auto_update_all_enabled' => ! empty( $_POST['auto_update_all_enabled'] ) ) ); // phpcs:ignore
|
||||
$saved = true;
|
||||
}
|
||||
|
||||
$update_check_result = null;
|
||||
if ( isset( $_POST['argus_wpd_check_updates_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['argus_wpd_check_updates_nonce'] ) ), 'argus_wpd_check_updates' ) && class_exists( 'Argus_Update_Client' ) ) { // phpcs:ignore
|
||||
$update_check_result = Argus_Update_Client::check_now();
|
||||
|
||||
+29
-3
@@ -11,6 +11,7 @@ $protection_display = array(
|
||||
'active' => array( 'label' => __( 'ACTIVE', 'argus-wordpress-defence' ), 'chip' => 'chip-emerald' ),
|
||||
'limited' => array( 'label' => __( 'TEMPORARILY LIMITED', 'argus-wordpress-defence' ), 'chip' => 'chip-amber' ),
|
||||
'not_connected' => array( 'label' => __( 'CONNECTING...', 'argus-wordpress-defence' ), 'chip' => 'chip-off' ),
|
||||
'disabled' => array( 'label' => __( 'NOT CONNECTED', 'argus-wordpress-defence' ), 'chip' => 'chip-off' ),
|
||||
);
|
||||
$state = $protection_display[ $anis_status['protection'] ];
|
||||
|
||||
@@ -28,15 +29,33 @@ $next_sync_display = $anis_status['next_sync'] ? wp_date( $date_format, strtotim
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ( 'disabled' === $anis_status['protection'] ) : ?>
|
||||
|
||||
<div class="argus-wpd-panel">
|
||||
<p style="font-size:14px;color:var(--text);margin:0 0 16px;">
|
||||
<?php esc_html_e( 'Your local protection (firewall, scanner, integrity, brute-force defense) is already fully active on its own. ARGUS Cloud is an optional upgrade: it shares reputation data about the IP addresses ARGUS blocks on your site with a global intelligence network, and in return your site benefits from what every other connected site has already seen.', 'argus-wordpress-defence' ); ?>
|
||||
</p>
|
||||
<p style="font-size:13px;color:var(--faint);margin:0 0 20px;line-height:1.7;">
|
||||
<?php esc_html_e( 'What this shares, honestly: when ARGUS blocks a visitor on your site, the visitor\'s IP address, a short reason code, a confidence score, and (if resolvable) its country are sent to ARGUS Cloud. Nothing else -- never usernames, passwords, page content, or anything else about your site or its legitimate visitors. An IP address can be personal data, which is why this is off by default and only turns on if you choose to enable it.', 'argus-wordpress-defence' ); ?>
|
||||
</p>
|
||||
<form method="post">
|
||||
<?php wp_nonce_field( 'argus_wpd_anis_toggle', 'argus_wpd_anis_toggle_nonce' ); ?>
|
||||
<input type="hidden" name="anis_action" value="enable" />
|
||||
<button type="submit" class="button button-primary"><?php esc_html_e( 'Connect to ARGUS Cloud', 'argus-wordpress-defence' ); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<div class="argus-wpd-panel">
|
||||
<p style="font-size:14px;color:var(--text);margin:0 0 20px;">
|
||||
<?php
|
||||
if ( 'active' === $anis_status['protection'] ) {
|
||||
esc_html_e( 'ARGUS Defence is automatically protected by continuously updated global threat intelligence.', 'argus-wordpress-defence' );
|
||||
esc_html_e( 'ARGUS Defence is connected to and protected by continuously updated global threat intelligence.', 'argus-wordpress-defence' );
|
||||
} elseif ( 'limited' === $anis_status['protection'] ) {
|
||||
esc_html_e( 'ARGUS Defence is continuing to protect your website while global threat intelligence connectivity is being restored automatically.', 'argus-wordpress-defence' );
|
||||
} else {
|
||||
esc_html_e( 'ARGUS Defence is automatically connecting to the global threat intelligence network. Your local protection is already fully active.', 'argus-wordpress-defence' );
|
||||
esc_html_e( 'ARGUS Defence is connecting to the global threat intelligence network. Your local protection is already fully active.', 'argus-wordpress-defence' );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
@@ -68,7 +87,14 @@ $next_sync_display = $anis_status['next_sync'] ? wp_date( $date_format, strtotim
|
||||
</div>
|
||||
|
||||
<div class="argus-wpd-panel">
|
||||
<p style="font-size:13px;color:var(--faint);margin:0;line-height:1.7;"><?php esc_html_e( 'Threat intelligence is privacy-focused. ARGUS Defence only shares anonymous security signals from activity already identified as malicious -- never usernames, passwords, page content, or anything that identifies your site or visitors.', 'argus-wordpress-defence' ); ?></p>
|
||||
<p style="font-size:13px;color:var(--faint);margin:0 0 16px;line-height:1.7;"><?php esc_html_e( 'What this shares, honestly: when ARGUS blocks a visitor on your site, the visitor\'s IP address, a short reason code, a confidence score, and (if resolvable) its country are sent to ARGUS Cloud. Nothing else -- never usernames, passwords, page content, or anything else about your site or its legitimate visitors.', 'argus-wordpress-defence' ); ?></p>
|
||||
<form method="post">
|
||||
<?php wp_nonce_field( 'argus_wpd_anis_toggle', 'argus_wpd_anis_toggle_nonce' ); ?>
|
||||
<input type="hidden" name="anis_action" value="disable" />
|
||||
<button type="submit" class="button"><?php esc_html_e( 'Disconnect', 'argus-wordpress-defence' ); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php include ARGUS_WPD_DIR . 'admin/views/partials/footer.php'; ?>
|
||||
|
||||
@@ -36,6 +36,34 @@ $score_offset = $score_circ * ( 1 - $score / 100 );
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( null !== $license_summary ) : ?>
|
||||
<div class="argus-wpd-panel" style="display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;">
|
||||
<div>
|
||||
<?php if ( 'licensed' === $license_summary['status'] ) : ?>
|
||||
<span class="argus-wpd-status-pill" style="color:var(--emerald);border-color:rgba(63,185,80,.35);"><?php esc_html_e( 'LICENSED', 'argus-wordpress-defence' ); ?></span>
|
||||
<span style="margin-left:10px;color:var(--faint);font-size:12.5px;"><?php esc_html_e( 'Premium features are fully active.', 'argus-wordpress-defence' ); ?></span>
|
||||
<?php elseif ( 'trial' === $license_summary['status'] ) : ?>
|
||||
<span class="argus-wpd-status-pill" style="color:var(--amber);border-color:rgba(255,170,0,.35);"><?php esc_html_e( 'TRIAL', 'argus-wordpress-defence' ); ?></span>
|
||||
<span style="margin-left:10px;color:var(--faint);font-size:12.5px;">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %d: number of days remaining in the free trial */
|
||||
esc_html( _n( '%d day left in your free trial -- everything is active.', '%d days left in your free trial -- everything is active.', $license_summary['days_remaining'], 'argus-wordpress-defence' ) ),
|
||||
(int) $license_summary['days_remaining']
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
<?php else : ?>
|
||||
<span class="argus-wpd-status-pill" style="color:var(--rose);border-color:rgba(230,103,103,.35);"><?php esc_html_e( 'TRIAL ENDED', 'argus-wordpress-defence' ); ?></span>
|
||||
<span style="margin-left:10px;color:var(--faint);font-size:12.5px;"><?php esc_html_e( 'Your 30-day free trial has ended. ARGUS keeps protecting your site -- enter a license key to keep Premium features and support.', 'argus-wordpress-defence' ); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ( 'licensed' !== $license_summary['status'] ) : ?>
|
||||
<a class="button button-primary" href="<?php echo esc_url( $license_summary['purchase_url'] ? $license_summary['purchase_url'] : admin_url( 'admin.php?page=argus-wpd-settings' ) ); ?>"><?php echo $license_summary['purchase_url'] ? esc_html__( 'Buy a license', 'argus-wordpress-defence' ) : esc_html__( 'Enter license key', 'argus-wordpress-defence' ); ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="argus-wpd-grid">
|
||||
<div class="argus-wpd-card argus-wpd-score">
|
||||
<svg viewBox="0 0 128 128">
|
||||
@@ -71,6 +99,19 @@ $score_offset = $score_circ * ( 1 - $score / 100 );
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="argus-wpd-metric-grid argus-wpd-metric-grid-2">
|
||||
<div class="argus-wpd-metric-card">
|
||||
<div class="argus-wpd-metric-label"><?php esc_html_e( 'IPs Tracked', 'argus-wordpress-defence' ); ?></div>
|
||||
<div class="argus-wpd-metric-value"><?php echo esc_html( number_format_i18n( $ips_tracked ) ); ?></div>
|
||||
<div class="argus-wpd-metric-sub"><?php esc_html_e( 'Total IPs with threat intelligence on file, local + ANIS', 'argus-wordpress-defence' ); ?></div>
|
||||
</div>
|
||||
<div class="argus-wpd-metric-card">
|
||||
<div class="argus-wpd-metric-label"><?php esc_html_e( 'ANIS Protections', 'argus-wordpress-defence' ); ?></div>
|
||||
<div class="argus-wpd-metric-value"><?php echo esc_html( number_format_i18n( $anis_protections ) ); ?></div>
|
||||
<div class="argus-wpd-metric-sub"><?php esc_html_e( 'Blocks powered by ARGUS global threat intelligence', 'argus-wordpress-defence' ); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="argus-wpd-area-card">
|
||||
<div class="argus-wpd-area-head">
|
||||
<h2 style="margin:0"><?php esc_html_e( 'Blocked Requests', 'argus-wordpress-defence' ); ?> · <?php echo esc_html( $range_labels[ $range ] ?? $range ); ?></h2>
|
||||
@@ -103,6 +144,7 @@ $score_offset = $score_circ * ( 1 - $score / 100 );
|
||||
'active' => array( 'chip-cyan', __( 'CONNECTED', 'argus-wordpress-defence' ) ),
|
||||
'limited' => array( 'chip-amber', __( 'LIMITED', 'argus-wordpress-defence' ) ),
|
||||
'not_connected' => array( 'chip-off', __( 'CONNECTING…', 'argus-wordpress-defence' ) ),
|
||||
'disabled' => array( 'chip-off', __( 'NOT CONNECTED', 'argus-wordpress-defence' ) ),
|
||||
);
|
||||
list( $anis_chip_class, $anis_chip_state ) = $anis_chip_map[ $anis_status['protection'] ] ?? $anis_chip_map['not_connected'];
|
||||
?>
|
||||
|
||||
@@ -48,6 +48,7 @@ $argus_nav_items = array(
|
||||
<?php echo esc_html( $argus_protection_display['label'] ); ?>
|
||||
· <?php echo esc_html( $argus_mode_labels[ $argus_mode ] ?? $argus_mode ); ?>
|
||||
</div>
|
||||
<span class="argus-wpd-version" title="<?php esc_attr_e( 'ARGUS WordPress Defence version', 'argus-wordpress-defence' ); ?>">v<?php echo esc_html( ARGUS_WPD_VERSION ); ?></span>
|
||||
<a href="<?php echo esc_url( admin_url( 'admin.php?page=argus-wpd-settings' ) ); ?>" class="argus-wpd-gear <?php echo 'settings' === $argus_active_page ? 'active' : ''; ?>" title="<?php esc_attr_e( 'Settings', 'argus-wordpress-defence' ); ?>">⚙</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ include ARGUS_WPD_DIR . 'admin/views/partials/header.php';
|
||||
?>
|
||||
|
||||
<h1 class="argus-wpd-page-title"><?php esc_html_e( 'Settings', 'argus-wordpress-defence' ); ?></h1>
|
||||
<p style="color:var(--muted);font-size:13px;margin:0 0 24px;"><?php esc_html_e( 'Start in Monitor mode, review findings, then switch to Block once you trust legitimate traffic is not being flagged.', 'argus-wordpress-defence' ); ?></p>
|
||||
<p style="color:var(--muted);font-size:13px;margin:0 0 24px;"><?php esc_html_e( 'Start in Monitor mode, review findings, then switch to Block once you trust legitimate traffic is not being flagged.', 'argus-wordpress-defence' ); ?> <a href="<?php echo esc_url( admin_url( 'admin.php?page=argus-wpd-welcome' ) ); ?>"><?php esc_html_e( 'Revisit the setup guide', 'argus-wordpress-defence' ); ?></a>.</p>
|
||||
|
||||
<?php if ( ! empty( $saved ) ) : ?>
|
||||
<div class="notice notice-success" style="padding:14px 18px;margin:0 0 20px;"><p style="margin:0"><?php esc_html_e( 'Settings saved.', 'argus-wordpress-defence' ); ?></p></div>
|
||||
@@ -125,6 +125,12 @@ include ARGUS_WPD_DIR . 'admin/views/partials/header.php';
|
||||
<h2><?php esc_html_e( 'Automatic Security Updates', 'argus-wordpress-defence' ); ?></h2>
|
||||
<p style="font-size:13px;color:var(--emerald);margin:0 0 6px;display:flex;align-items:center;gap:8px;"><span class="argus-wpd-status-chip chip-emerald" style="padding:2px 10px;"><span class="dot"></span><span class="state"><?php echo esc_html( strtoupper( Argus_Auto_Update::status()['label'] ) ); ?></span></span></p>
|
||||
<p style="color:var(--faint);font-size:12.5px;margin:8px 0 0 0 0 16px;"><?php echo esc_html( Argus_Auto_Update::status()['detail'] ); ?></p>
|
||||
<form method="post" style="margin-top:14px;">
|
||||
<?php wp_nonce_field( 'argus_wpd_save_auto_update_all', 'argus_wpd_auto_update_all_nonce' ); ?>
|
||||
<label style="display:block;"><input type="checkbox" name="auto_update_all_enabled" <?php checked( $settings['auto_update_all_enabled'] ); ?> /> <?php esc_html_e( 'Also auto-update every other installed plugin and theme (recommended)', 'argus-wordpress-defence' ); ?></label>
|
||||
<button type="submit" class="button" style="margin-top:10px;"><?php esc_html_e( 'Save', 'argus-wordpress-defence' ); ?></button>
|
||||
</form>
|
||||
<?php if ( class_exists( 'Argus_Update_Client' ) ) : ?>
|
||||
<?php $update_status = Argus_Update_Client::status(); ?>
|
||||
<table class="widefat" style="border:none;background:transparent;margin-top:14px;">
|
||||
<tbody>
|
||||
@@ -171,6 +177,9 @@ include ARGUS_WPD_DIR . 'admin/views/partials/header.php';
|
||||
<?php wp_nonce_field( 'argus_wpd_check_updates', 'argus_wpd_check_updates_nonce' ); ?>
|
||||
<button type="submit" class="button"><?php esc_html_e( 'Check for Updates Now', 'argus-wordpress-defence' ); ?></button>
|
||||
</form>
|
||||
<?php else : ?>
|
||||
<p style="color:var(--faint);font-size:12.5px;margin:14px 0 0;"><?php esc_html_e( 'Updates for this plugin are delivered through WordPress.org, the same way as any other WordPress plugin -- you\'ll see a notification in your dashboard when a new version is available.', 'argus-wordpress-defence' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="argus-wpd-panel">
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$argus_active_page = 'welcome';
|
||||
include ARGUS_WPD_DIR . 'admin/views/partials/header.php';
|
||||
|
||||
$features = array(
|
||||
array(
|
||||
'title' => __( 'Firewall', 'argus-wordpress-defence' ),
|
||||
'desc' => __( 'Blocks malicious requests -- SQL injection, cross-site scripting, and dozens of other known attack patterns -- before they reach your site.', 'argus-wordpress-defence' ),
|
||||
'active' => $settings['waf_enabled'],
|
||||
),
|
||||
array(
|
||||
'title' => __( 'Malware Scanner & Quarantine', 'argus-wordpress-defence' ),
|
||||
'desc' => __( 'Watches for suspicious files, moves anything genuinely dangerous into a protected quarantine automatically, and lets you review or restore it.', 'argus-wordpress-defence' ),
|
||||
'active' => $settings['malware_scan_enabled'],
|
||||
),
|
||||
array(
|
||||
'title' => __( 'File Integrity Monitoring', 'argus-wordpress-defence' ),
|
||||
'desc' => __( 'Cross-checks WordPress core against official checksums and tracks plugin/theme file changes, so tampering doesn\'t go unnoticed.', 'argus-wordpress-defence' ),
|
||||
'active' => $settings['integrity_scan_enabled'],
|
||||
),
|
||||
array(
|
||||
'title' => __( 'Login & Brute-Force Protection', 'argus-wordpress-defence' ),
|
||||
'desc' => __( 'Detects and blocks repeated failed login attempts, and locks down XML-RPC/REST API endpoints commonly abused for credential-stuffing.', 'argus-wordpress-defence' ),
|
||||
'active' => $settings['login_protection_enabled'],
|
||||
),
|
||||
array(
|
||||
'title' => __( 'Vulnerability Intelligence', 'argus-wordpress-defence' ),
|
||||
'desc' => __( 'Checks WordPress core and every installed plugin/theme version against known security issues, so you know what needs updating and why.', 'argus-wordpress-defence' ),
|
||||
'active' => $settings['vuln_intel_enabled'],
|
||||
),
|
||||
array(
|
||||
'title' => __( 'Backups', 'argus-wordpress-defence' ),
|
||||
'desc' => __( 'Scheduled database and file backups, stored securely, so you have a real recovery point if something ever goes wrong.', 'argus-wordpress-defence' ),
|
||||
'active' => 'automatic' === $settings['backup_schedule_mode'],
|
||||
),
|
||||
array(
|
||||
'title' => __( 'Automatic Updates', 'argus-wordpress-defence' ),
|
||||
'desc' => __( 'ARGUS always keeps itself up to date, and can optionally do the same for every other plugin and theme -- unpatched software is one of the most common ways sites get compromised.', 'argus-wordpress-defence' ),
|
||||
'active' => $settings['auto_update_all_enabled'],
|
||||
),
|
||||
array(
|
||||
'title' => __( 'Cache & Performance', 'argus-wordpress-defence' ),
|
||||
'desc' => __( 'An optional page cache that can make your site noticeably faster -- it never bypasses the firewall or serves cached pages to already-blocked visitors.', 'argus-wordpress-defence' ),
|
||||
'active' => $settings['static_cache_enabled'],
|
||||
),
|
||||
array(
|
||||
'title' => __( 'ARGUS Cloud (Global Threat Intelligence)', 'argus-wordpress-defence' ),
|
||||
'desc' => __( 'Optional: share reputation data about IPs ARGUS blocks with a global network, and benefit from what every other connected site has already seen.', 'argus-wordpress-defence' ),
|
||||
'active' => $settings['anis_enabled'],
|
||||
),
|
||||
);
|
||||
?>
|
||||
|
||||
<div class="argus-wpd-welcome-hero">
|
||||
<h1><?php esc_html_e( 'Welcome to ARGUS Defence', 'argus-wordpress-defence' ); ?></h1>
|
||||
<p><?php esc_html_e( 'Your site is already protected -- ARGUS activated its core defenses the moment you installed it. Nothing below is required. It\'s here so you know exactly what\'s running, and to offer a couple of optional upgrades.', 'argus-wordpress-defence' ); ?></p>
|
||||
</div>
|
||||
|
||||
<?php if ( ! empty( $template_applied ) ) : ?>
|
||||
<div class="notice notice-success" style="padding:14px 18px;margin:0 0 20px;"><p style="margin:0">
|
||||
<?php printf( esc_html__( '"%s" protection template applied. You can fine-tune anything later in Settings.', 'argus-wordpress-defence' ), esc_html( $template_applied ) ); ?>
|
||||
</p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="argus-wpd-panel">
|
||||
<h2><?php esc_html_e( 'What\'s protecting your site right now', 'argus-wordpress-defence' ); ?></h2>
|
||||
<div class="argus-wpd-feature-grid">
|
||||
<?php foreach ( $features as $feature ) : ?>
|
||||
<div class="argus-wpd-feature-card">
|
||||
<div class="argus-wpd-feature-card-head">
|
||||
<span class="argus-wpd-feature-card-title"><?php echo esc_html( $feature['title'] ); ?></span>
|
||||
<span class="argus-wpd-status-pill"><?php echo $feature['active'] ? esc_html__( 'ACTIVE', 'argus-wordpress-defence' ) : esc_html__( 'OFF', 'argus-wordpress-defence' ); ?></span>
|
||||
</div>
|
||||
<p class="argus-wpd-feature-card-desc"><?php echo esc_html( $feature['desc'] ); ?></p>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ( ! empty( $templates ) ) : ?>
|
||||
<div class="argus-wpd-panel">
|
||||
<h2><?php esc_html_e( 'Optional: tailor it to your site', 'argus-wordpress-defence' ); ?></h2>
|
||||
<p style="color:var(--faint);font-size:12.5px;margin:-8px 0 16px;"><?php esc_html_e( 'A starting point, not a lock-in -- applying a template sets sensible defaults, which you can hand-tune later in Settings.', 'argus-wordpress-defence' ); ?></p>
|
||||
<div class="argus-wpd-template-grid">
|
||||
<?php foreach ( $templates as $key => $template ) : ?>
|
||||
<div class="argus-wpd-template-card<?php echo $active_template === $key ? ' active' : ''; ?>">
|
||||
<div class="argus-wpd-template-title">
|
||||
<?php echo esc_html( $template['label'] ); ?>
|
||||
<?php if ( $recommended_template === $key ) : ?><span class="argus-wpd-template-badge"><?php esc_html_e( 'Recommended -- store plugin detected', 'argus-wordpress-defence' ); ?></span><?php endif; ?>
|
||||
<?php if ( $active_template === $key ) : ?><span class="argus-wpd-template-badge active"><?php esc_html_e( 'Currently applied', 'argus-wordpress-defence' ); ?></span><?php endif; ?>
|
||||
</div>
|
||||
<p class="argus-wpd-template-desc"><?php echo esc_html( $template['description'] ); ?></p>
|
||||
<form method="post">
|
||||
<?php wp_nonce_field( 'argus_wpd_apply_template', 'argus_wpd_apply_template_nonce' ); ?>
|
||||
<input type="hidden" name="template" value="<?php echo esc_attr( $key ); ?>" />
|
||||
<button type="submit" class="button<?php echo $active_template === $key ? '' : ' button-primary'; ?>"><?php echo $active_template === $key ? esc_html__( 'Re-apply', 'argus-wordpress-defence' ) : esc_html__( 'Apply', 'argus-wordpress-defence' ); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="argus-wpd-panel">
|
||||
<h2><?php esc_html_e( 'Optional: keep everything patched automatically', 'argus-wordpress-defence' ); ?></h2>
|
||||
<p style="color:var(--faint);font-size:12.5px;margin:-8px 0 16px;"><?php esc_html_e( 'ARGUS always updates itself. Turning this on extends the same automatic updates to every other installed plugin and theme -- unpatched software is one of the most common ways WordPress sites get compromised.', 'argus-wordpress-defence' ); ?></p>
|
||||
<form method="post">
|
||||
<?php wp_nonce_field( 'argus_wpd_save_auto_update_all', 'argus_wpd_auto_update_all_nonce' ); ?>
|
||||
<label style="display:block;"><input type="checkbox" name="auto_update_all_enabled" <?php checked( $settings['auto_update_all_enabled'] ); ?> /> <?php esc_html_e( 'Also auto-update every other installed plugin and theme (recommended)', 'argus-wordpress-defence' ); ?></label>
|
||||
<button type="submit" class="button" style="margin-top:10px;"><?php esc_html_e( 'Save', 'argus-wordpress-defence' ); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="argus-wpd-panel">
|
||||
<h2><?php esc_html_e( 'Optional: connect to ARGUS Cloud', 'argus-wordpress-defence' ); ?></h2>
|
||||
<?php if ( $settings['anis_enabled'] ) : ?>
|
||||
<p style="font-size:13px;color:var(--emerald);margin:0;">✓ <?php esc_html_e( 'Connected. Manage this any time on the ANIS page.', 'argus-wordpress-defence' ); ?></p>
|
||||
<?php else : ?>
|
||||
<p style="font-size:13px;color:var(--faint);margin:0 0 16px;line-height:1.7;"><?php esc_html_e( 'Shares reputation data about IPs ARGUS blocks on your site with a global intelligence network, and benefits from what every other connected site has already seen. What this shares, honestly: the visitor\'s IP address, a short reason code, a confidence score, and (if resolvable) its country. Nothing else -- never usernames, passwords, or page content. Off by default because an IP address can be personal data; you can disconnect any time from the ANIS page.', 'argus-wordpress-defence' ); ?></p>
|
||||
<form method="post">
|
||||
<?php wp_nonce_field( 'argus_wpd_anis_toggle', 'argus_wpd_anis_toggle_nonce' ); ?>
|
||||
<input type="hidden" name="anis_action" value="enable" />
|
||||
<button type="submit" class="button button-primary"><?php esc_html_e( 'Connect to ARGUS Cloud', 'argus-wordpress-defence' ); ?></button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="argus-wpd-panel" style="text-align:center;">
|
||||
<h2 style="margin-bottom:10px;"><?php esc_html_e( 'You\'re all set', 'argus-wordpress-defence' ); ?></h2>
|
||||
<p style="color:var(--faint);font-size:13px;margin:0 0 18px;"><?php esc_html_e( 'ARGUS Defence is protecting your site. Come back to this checklist any time from Settings if you want to revisit these choices.', 'argus-wordpress-defence' ); ?></p>
|
||||
<a class="button button-primary button-hero" href="<?php echo esc_url( admin_url( 'admin.php?page=argus-wpd-dashboard' ) ); ?>"><?php esc_html_e( 'Go to Dashboard', 'argus-wordpress-defence' ); ?></a>
|
||||
</div>
|
||||
|
||||
<?php include ARGUS_WPD_DIR . 'admin/views/partials/footer.php'; ?>
|
||||
Reference in New Issue
Block a user