False positive: native auto_update_plugins option triggers update_modification_detected
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
- 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
- Save this as
native-update-option-example/native-update-option-example.php. - 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 - 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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của WordPress/plugin-check
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
WordPress/plugin-check#1509 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Accept PolyFillsCó thể đã có người làm @sanketio đã nhận 14 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
WordPress/plugin-check#1496 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Question about a PCP WarningĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
WordPress/plugin-check#1475 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
WordPress/plugin-check#1474 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
WordPress/plugin-check#1445 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của WordPress/plugin-check
Issue tương tự
-
L: javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dependabot/dependabot-core#16744 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
linuxserver/docker-bookstack#302 · 1 bình luận ·
-
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 62/100
OpenConext/OpenConext-devconf#101 ·
-
component/document-portal domain/b2b
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày