make_result( array( 'id' => 'debug_enabled', 'title' => __( 'Debug mode is active', 'aipatch-security-scanner' ), 'description' => __( 'WP_DEBUG is enabled on this site.', 'aipatch-security-scanner' ), 'severity' => $severity, 'confidence' => 'high', 'category' => 'configuration', 'why_it_matters' => __( 'Debug mode can expose sensitive information like file paths, database queries, and PHP errors to visitors.', 'aipatch-security-scanner' ), 'recommendation' => __( 'Disable WP_DEBUG in wp-config.php for production sites. Use WP_DEBUG_LOG instead of WP_DEBUG_DISPLAY if you need logging.', 'aipatch-security-scanner' ), 'dismissible' => true, 'evidence' => sprintf( 'WP_DEBUG=%s, WP_DEBUG_DISPLAY=%s', WP_DEBUG ? 'true' : 'false', ( defined( 'WP_DEBUG_DISPLAY' ) && WP_DEBUG_DISPLAY ) ? 'true' : 'false' ), ) ), ); } }