Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

False positive: native auto_update_plugins option triggers update_modification_detected

Đang mở
#1,506 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@KhushalSainS đang làm issue này rồi.

Từ ngày 20/10/2026.

  • #1510 của @KhushalSainS — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php, wordpress
Lĩnh vực
backend, testing-qa

Hướng nghiên cứu

Start with Plugin_Updater_Check::look_for_updater_routines() in includes/Checker/Checks/Plugin_Repo/Plugin_Updater_Check.php and inspect how the auto_update_plugin pattern matches the plural auto_update_plugins option. Reproduce the report using the read-only PHP example and the documented wp plugin check command with the plugin_updater check. Done when reading the native option no longer triggers the warning while genuine update hook usage still does.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi Plugin Check team,

Plugin Check 2.1.0 reports update_modification_detected when code accesses WordPress’s native auto_update_plugins option. The detection also exists in the current default branch.

I encountered this in AI Puffer, where an explicitly requested command enables or disables native plugin auto-updates. It uses the connected user’s update_plugins permission and our normal approval policy. It does not implement an external updater or replace the update source.

The following read-only example reproduces the warning without changing any update behavior:

<?php
/**
 * Plugin Name: Native Auto-Update Option Example
 * Description: Minimal reproduction of an auto-update option detection warning.
 * Version: 1.0.0
 * License: GPL-2.0-or-later
 */
defined( 'ABSPATH' ) || exit;

function example_read_native_update_setting() {
    return get_site_option( 'auto_update_plugins', array() );
}
Steps to reproduce
  1. Save this as native-update-option-example/native-update-option-example.php.
  2. Run the updater check:
    wp plugin check /absolute/path/to/native-update-option-example \
      --slug=native-update-option-example --mode=update \
      --checks=plugin_updater --format=strict-json
    
  3. Observe the warning:
    update_modification_detected
    Plugin Updater detected. Detected code which may be altering WordPress update routines. Detected: auto_update_plugin
    

Reproduced with Plugin Check 2.1.0 and PHP 8.3, with unrelated plugins and themes skipped. The example function does not even need to be called: reading the option name in the file is enough to trigger detection.

Expected behavior

Accessing the native auto_update_plugins option, particularly just reading it, should not be classified as a custom updater or update-routine modification.

Likely cause

Plugin_Updater_Check::look_for_updater_routines() searches for:

'#auto_update_plugin#'

This matches the plural option name auto_update_plugins, not just the auto_update_plugin filter. WordPress core itself uses the plural option for its native auto-update controls in wp-admin/includes/ajax-actions.php.

Could the detection distinguish the hook from the option, ideally by checking actual hook usage rather than an unrestricted substring? The intended warning for genuine update hooks can remain.

We are keeping the option name and our auto-update functionality unchanged rather than disguising the code to avoid detection.

Thanks!

Ngôn ngữ chính
PHP
Star
365
Fork
129
Merge trung bình
15 giờ 53 phút
Pull request đã merge (30 ngày)
18

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của WordPress/plugin-check

Tất cả issue của WordPress/plugin-check

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.