qwen-code fixes flaw letting repo project hooks execute without folder trust by default

yiliang114 · ghdev · 2026-11-04

PR #16264 in QwenLM/qwen-code fixes a security issue: project hooks declared in a repo's .qwen/settings.json previously executed unconditionally, including in headless one-shot runs — meaning a freshly cloned repo could run arbitrary hooks on a default install (a proof of concept was reported).

The fix unifies one rule: project hooks load only with explicit folder trust, in every mode — interactive TUI, headless/CI, and ACP/SDK embeddings alike, with no implicit-trust exemption and intentional fail-closed behavior. User- and system-level hooks are unaffected.

This is a breaking change: automation relying on repo hooks must enable security.folderTrust.enabled and pre-trust directories in its managed home (a single TRUSTPARENT entry can cover a workspace tree). The web shell now also surfaces withheld hooks with the remedy.

Original post →

More from coding & agent

coding & agent channel →