mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-11-04 23:37:31 +00:00
[PR #3299] [MERGED] v4: Restrict Flagged CNR installs on non-local listeners #3175
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/ComfyUI-Manager#3175
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/ComfyUI-Manager/pull/3299
Author: @ltdrdata
Created: 9/18/2026
Status: ✅ Merged
Merged: 9/18/2026
Merged by: @ltdrdata
Base:
manager-v4← Head:feat/v4-flagged-policy📝 Commits (1)
0c8f423Restrict flagged CNR installs on non-local listeners📊 Changes
12 files changed (+1325 additions, -168 deletions)
View changed files
📝
README.md(+52 -2)📝
comfyui_manager/common/cnr_utils.py(+2 -1)📝
comfyui_manager/common/manager_security.py(+42 -0)📝
comfyui_manager/glob/manager_core.py(+71 -37)📝
comfyui_manager/glob/manager_server.py(+10 -7)📝
comfyui_manager/legacy/manager_core.py(+150 -86)📝
comfyui_manager/legacy/manager_server.py(+29 -27)📝
comfyui_manager/prestartup_script.py(+23 -3)➕
tests/e2e/test_e2e_flagged_nodepacks.py(+509 -0)➕
tests/test_flagged_nodepack_policy.py(+431 -0)📝
tests/test_install_flags_config.py(+3 -2)📝
tests/test_legacy_secgate_other_paths.py(+3 -3)📄 Description
Purpose and scope
A successful Registry install response previously allowed a Flagged CNR version to proceed. Require Flagged versions to satisfy the same installation conditions as Active versions, plus a server listening exclusively on loopback or an explicit administrator override. Covers glob and legacy installation, switching, updates, deferred startup and server-scheduled restores, plus legacy batch reinstallation.
The allow_flagged_nodepack_install option belongs in config.ini’s [default] section. It defaults to false; only case-insensitive true enables it, after restarting ComfyUI. The override is intended for a trusted private network and permits non-loopback listeners. It does not detect private networks or bypass common security checks, Registry refusals or Git/pip restrictions.
Key changes
Affected modules: CNR metadata mapping, installation cores, server queues, startup processing, configuration and README. Deferred switches use stored status without refreshing it from the Registry. Older reservations without status require loopback-only listeners or the override; otherwise startup rejects them without changing the pack and tells the user to request installation again. Enabling an already installed identical version remains a local activation with no Registry lookup or installation script.
Validation approach
Core tests run production installation paths with controlled external responses. E2E uses actual HTTP requests, queues, ZIP installation, restart and CLI subprocesses, with a local Registry and isolated node paths, settings and databases.
Tests fail when status propagation is removed, Registry refusals are ignored, or reinstall script execution is suppressed. Immediate-switch checks fail when the execution flag is dropped, and missing-status reservations are tested under both allowed and denied startup settings. Restored code passes; successful Git reinstall cases cover both catalogue entries and the CNR repository fallback.
Validation results
Current source is
0c8f423fon manager-v4, which includes #3297. Its complete Git tree is identical to the verified UI + Flagged integration 6df4aa14. Integration results below were recorded on 1a04122a; the only difference is the strengthened legacy denial-response test, and production and policy E2E files are identical. Focused policy/configuration regressions were rerun on0c8f423f: 176 passed.The three Git backup fixture failures also occur on unchanged manager-v4. The complete local regression suite is not green. The twelve non-E2E skips require a separate CLI environment. Eight policy E2E skips require a preinstalled pack under strong security; four exclude loopback from non-local Git checks. Strong-security denial is tested directly.
Ruff, OpenAPI, code-quality and Socket checks passed on
0c8f423f. CLI E2E CI also passed on Ubuntu, Windows and macOS after rebasing onto the merged UI change.Policy E2E uses a local Registry with real HTTP routes, queues, archive installation, deferred startup and CLI subprocesses. Separate Playwright scenarios exercise the integrated legacy UI, real installation and WebSocket completion, Active installation, Flagged denial and configuration preservation. Browser checks use frontend 1.45.15 and single-tab sessions; the legacy menu opens through its registered command because of an inherited toolbar issue.
Tests use Python 3.12 and ComfyUI 039ed38e on Python 3.10.20. The public Registry was not exercised in this run. Snapshot checks establish admission, extraction and denial-state preservation; fresh-snapshot install.py completion and file-lock/deferred-deletion handling remain outside this PR.
The existing deferred-deletion/state-consistency defect is tracked in #3301, including removal-result semantics, restart cleanup and regression acceptance criteria. The uninstall-failure test in this PR checks a reported failure; it does not establish correct reporting of a deferred deletion.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.