ARGUS WordPress Defence 1.0.0 — first production release

Automatic WordPress security: local firewall, malware and file-integrity
scanning, vulnerability protection, quarantine, scheduled backups, an
optional page cache, and automatic global threat intelligence.

See README.md for installation, update, and uninstall instructions.
This commit is contained in:
root
2026-08-09 13:40:16 +00:00
commit df0f2fccb8
73 changed files with 12302 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$argus_compact = $argus_compact ?? false;
$action = $finding->evidence['action'] ?? null;
$finding_ip = $finding->evidence['ip'] ?? null;
?>
<div class="argus-wpd-finding-card argus-wpd-sev-<?php echo esc_attr( $finding->severity ); ?>">
<div class="argus-wpd-finding-summary">
<span class="argus-wpd-sev-badge"><?php echo esc_html( strtoupper( $finding->severity ) ); ?></span>
<span class="argus-wpd-finding-title">
<?php if ( $finding_ip ) : ?>
<span class="argus-wpd-flag" title="<?php echo esc_attr( Argus_GeoIP::label( $finding_ip ) ); ?>"><?php echo esc_html( Argus_GeoIP::icon( $finding_ip ) ); ?></span>
<?php endif; ?>
<?php echo esc_html( $finding->title ); ?>
</span>
<span class="argus-wpd-status-pill argus-wpd-status-<?php echo esc_attr( $finding->status ); ?>"><?php echo esc_html( ucfirst( str_replace( '_', ' ', $finding->status ) ) ); ?></span>
<span class="argus-wpd-finding-time"><?php echo esc_html( human_time_diff( strtotime( $finding->last_seen_at . ' UTC' ) ) ); ?> <?php esc_html_e( 'ago', 'argus-wordpress-defence' ); ?></span>
</div>
<div class="argus-wpd-finding-actions">
<?php if ( $action && ! empty( $action['type'] ) ) : ?>
<form method="post" action="<?php echo esc_url( add_query_arg( 'finding', $finding->id ) ); ?>" style="display:inline">
<?php wp_nonce_field( 'argus_wpd_run_action_' . $finding->id, 'argus_wpd_action_nonce' ); ?>
<button type="submit" class="button button-primary" onclick="return confirm('<?php echo esc_js( sprintf( __( 'Run "%s" now? This will make a real change to your site.', 'argus-wordpress-defence' ), $action['label'] ) ); ?>')">
<?php echo esc_html( $action['label'] ); ?>
</button>
</form>
<?php endif; ?>
<?php if ( Argus_Findings::STATUS_OPEN === $finding->status ) : ?>
<form method="post" action="<?php echo esc_url( add_query_arg( 'finding', $finding->id ) ); ?>" style="display:inline">
<?php wp_nonce_field( 'argus_wpd_set_status_' . $finding->id, 'argus_wpd_status_nonce' ); ?>
<button type="submit" name="new_status" value="acknowledged" class="button"><?php esc_html_e( 'Acknowledge', 'argus-wordpress-defence' ); ?></button>
<button type="submit" name="new_status" value="resolved" class="button"><?php esc_html_e( 'Resolve', 'argus-wordpress-defence' ); ?></button>
<button type="submit" name="new_status" value="risk_accepted" class="button"><?php esc_html_e( 'Accept Risk', 'argus-wordpress-defence' ); ?></button>
</form>
<?php endif; ?>
<form method="post" action="<?php echo esc_url( add_query_arg( 'finding', $finding->id ) ); ?>" style="display:inline">
<?php wp_nonce_field( 'argus_wpd_delete_finding_' . $finding->id, 'argus_wpd_delete_finding_nonce' ); ?>
<button type="submit" class="button" style="color:var(--rose)" onclick="return confirm('<?php echo esc_js( __( 'Delete this finding permanently? This cannot be undone.', 'argus-wordpress-defence' ) ); ?>')"><?php esc_html_e( 'Delete', 'argus-wordpress-defence' ); ?></button>
</form>
</div>
<?php if ( ! $argus_compact && ! empty( $finding->explain ) ) : ?>
<details class="argus-wpd-finding-details">
<summary><?php esc_html_e( 'Show full explanation', 'argus-wordpress-defence' ); ?></summary>
<?php echo Argus_Explain::render( $finding->explain ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
</details>
<?php endif; ?>
</div>
+7
View File
@@ -0,0 +1,7 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
</div>
</div>
+58
View File
@@ -0,0 +1,58 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$argus_active_page = $argus_active_page ?? 'overview';
$argus_mode = Argus_Settings::mode();
$argus_mode_labels = array( 'monitor' => 'Monitor', 'block' => 'Block', 'strict' => 'Strict' );
$argus_domain = wp_parse_url( home_url(), PHP_URL_HOST ) ?: get_bloginfo( 'name' );
$argus_protection_state = Argus_Console_Stats::protection_state();
$argus_protection_labels = array(
'protected' => array( 'class' => 'on', 'label' => __( 'Protected', 'argus-wordpress-defence' ) ),
'action_required' => array( 'class' => 'danger', 'label' => __( 'Action Required', 'argus-wordpress-defence' ) ),
'checking' => array( 'class' => 'checking', 'label' => __( 'Checking Security', 'argus-wordpress-defence' ) ),
);
$argus_protection_display = $argus_protection_labels[ $argus_protection_state ] ?? $argus_protection_labels['protected'];
$argus_nav_items = array(
'overview' => array( __( 'Overview', 'argus-wordpress-defence' ), 'argus-wpd-dashboard' ),
'firewall' => array( __( 'Firewall', 'argus-wordpress-defence' ), 'argus-wpd-firewall' ),
'threats' => array( __( 'Threats', 'argus-wordpress-defence' ), 'argus-wpd-threats' ),
'findings' => array( __( 'Findings', 'argus-wordpress-defence' ), 'argus-wpd-findings' ),
'scanner' => array( __( 'Scanner', 'argus-wordpress-defence' ), 'argus-wpd-scanner' ),
'quarantine' => array( __( 'Quarantine', 'argus-wordpress-defence' ), 'argus-wpd-quarantine' ),
'cache' => array( __( 'Cache & Performance', 'argus-wordpress-defence' ), 'argus-wpd-cache' ),
'backups' => array( __( 'Backups', 'argus-wordpress-defence' ), 'argus-wpd-backups' ),
'vulnerabilities' => array( __( 'Vulnerabilities', 'argus-wordpress-defence' ), 'argus-wpd-vulnerabilities' ),
'intelligence' => array( __( 'Intelligence', 'argus-wordpress-defence' ), 'argus-wpd-intelligence' ),
'anis' => array( __( 'ANIS', 'argus-wordpress-defence' ), 'argus-wpd-anis' ),
'audit-log' => array( __( 'Audit Log', 'argus-wordpress-defence' ), 'argus-wpd-audit-log' ),
);
?>
<div class="argus-wpd-shell">
<div class="argus-wpd-inner">
<div class="argus-wpd-topbar">
<div class="argus-wpd-logo">&#128737;</div>
<div class="argus-wpd-brand">
<span class="argus-wpd-eyebrow"><span class="dot"></span>ARGUS DEFENCE &middot; SECURITY OPERATIONS CENTER</span>
<span class="argus-wpd-title"><?php echo esc_html( $argus_domain ); ?></span>
<span class="argus-wpd-domain-caption"><?php esc_html_e( 'ARGUS Defence is protecting this website', 'argus-wordpress-defence' ); ?></span>
</div>
<div class="argus-wpd-status-badge <?php echo esc_attr( $argus_protection_display['class'] ); ?>">
<span class="dot"></span>
<?php echo esc_html( $argus_protection_display['label'] ); ?>
&middot; <?php echo esc_html( $argus_mode_labels[ $argus_mode ] ?? $argus_mode ); ?>
</div>
<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' ); ?>">&#9881;</a>
</div>
<nav class="argus-wpd-nav">
<?php foreach ( $argus_nav_items as $key => $item ) : ?>
<a href="<?php echo esc_url( admin_url( 'admin.php?page=' . $item[1] ) ); ?>" class="<?php echo $key === $argus_active_page ? 'active' : ''; ?>"><?php echo esc_html( $item[0] ); ?></a>
<?php endforeach; ?>
</nav>
+32
View File
@@ -0,0 +1,32 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$argus_page_param = $argus_page_param ?? 'paged';
if ( $total_pages <= 1 ) {
return;
}
?>
<div class="argus-wpd-pagination">
<?php if ( $page > 1 ) : ?>
<a href="<?php echo esc_url( add_query_arg( $argus_page_param, $page - 1, $base_url ) ); ?>" class="argus-wpd-page-link">&larr; <?php esc_html_e( 'Previous', 'argus-wordpress-defence' ); ?></a>
<?php endif; ?>
<span class="argus-wpd-page-info">
<?php
printf(
esc_html__( 'Page %1$d of %2$d', 'argus-wordpress-defence' ),
(int) $page,
(int) $total_pages
);
?>
</span>
<?php if ( $page < $total_pages ) : ?>
<a href="<?php echo esc_url( add_query_arg( $argus_page_param, $page + 1, $base_url ) ); ?>" class="argus-wpd-page-link"><?php esc_html_e( 'Next', 'argus-wordpress-defence' ); ?> &rarr;</a>
<?php endif; ?>
</div>