Skip to content

feat: manage ComfyUI-Manager security level from Desktop settings#1041

Open
Kosinkadink wants to merge 1 commit into
mainfrom
feat/manager-security-level
Open

feat: manage ComfyUI-Manager security level from Desktop settings#1041
Kosinkadink wants to merge 1 commit into
mainfrom
feat/manager-security-level

Conversation

@Kosinkadink

Copy link
Copy Markdown
Member

Summary

Gives Desktop a UI control for ComfyUI-Manager's security_level, addressing part of #1037.

ComfyUI-Manager (v4) has no runtime API to change security_level - it reads the value once from config.ini at startup. As a result there is no way to relax or tighten which node packs may be installed (for example, when ComfyUI is exposed to the network with --listen, some installs are blocked for security), and the restriction is invisible to the user. Since Manager won't own this control, Desktop does.

Changes

  • Add a persistent managerSecurityLevel setting (strong / normal / normal- / weak).
  • Expose it as a select in the Advanced settings section, with a tooltip explaining the --listen implications.
  • Reconcile config.ini before each local launch:
    • fresh installs: write security_level (plus the China-mirror keys when opted in),
    • existing configs: update security_level in place while preserving all other keys,
    • skip entirely when a legacy Manager config exists (avoids tripping Manager's legacy-migration path).
  • Generalize ensureManagerMirrorConfig into ensureManagerConfig.
  • Add en/zh translations.

Companion PR

The offline-loading and security-message UX fixes from #1037 are handled in ComfyUI_frontend on branch fix/manager-offline-loading-and-security-msg.

Testing

  • pnpm typecheck / pnpm lint pass (run via pre-commit).
  • pnpm test src/main/lib/managerConfig.test.ts - 15 tests pass (fresh/update/legacy behavior).

Part of #1037

ComfyUI-Manager has no runtime API to change its security_level; it reads
it once from config.ini at startup. Without a Desktop-side control, users
cannot relax/tighten which node packs may be installed (e.g. when ComfyUI
is exposed with --listen), and the restriction is invisible in the UI.

- Add a persistent managerSecurityLevel setting (strong/normal/normal-/weak)
- Expose it as a select in the Advanced settings section
- Reconcile config.ini before each local launch: write security_level on
  fresh installs and update it in place on existing configs, preserving
  other keys; skip when a legacy Manager config exists
- Generalize ensureManagerMirrorConfig into ensureManagerConfig
- Add en/zh translations

Amp-Thread-ID: https://ampcode.com/threads/T-019eafaf-ac38-734b-8fa1-1422ed378e78
Co-authored-by: Amp <amp@ampcode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant