Skip to content

feat(security): DANGEROUS_SKIP explicit escape hatch + protocol & v17 migration support - #199

Closed
raymondginger2018-sudo wants to merge 4 commits into
HKUDS:mainfrom
raymondginger2018-sudo:pr/deepcode-security
Closed

feat(security): DANGEROUS_SKIP explicit escape hatch + protocol & v17 migration support#199
raymondginger2018-sudo wants to merge 4 commits into
HKUDS:mainfrom
raymondginger2018-sudo:pr/deepcode-security

Conversation

@raymondginger2018-sudo

Copy link
Copy Markdown
Contributor

Summary

Two related security improvements:

1. DANGEROUS_SKIP 显式命名危险逃生通道

Explicitly name the dangerous bypass channel as DANGEROUS_SKIP (borrowed from Claude Code), so the escape hatch is discoverable and auditable instead of implicit.

2. Protocol + v17 migration support for dangerous_skip access preset

Extend the protocol and v17 migration to support the dangerous_skip access preset, keeping the permission model consistent across versions.

跳过全部权限校验的逃生通道叫 dangerous_skip 而不是沉默的
full_access, 让使用者与审计日志一眼看到这是危险选择。
与 FULL_ACCESS 同强度, 序列化 roundtrip 保留 dangerous_skip。
- config: access_preset 增加 dangerous_skip 字面量
- migrations: v17 加宽 threads.access_preset_override CHECK(含回滚,
  降级时清除 dangerous_skip 值)
- protocol schema + 生成 TS 类型同步
- 测试: v17 存取/downgrade roundtrip + v16 fresh 断言适配
- Wraps the long type annotation added in 8371c79
- Fixes lint-and-format PR check failure (HKUDS#199)
@Zongwei9888

Copy link
Copy Markdown
Collaborator

Thanks for the PR. dangerous_skip maps to exactly the same permission mode, sandbox setting, filesystem scope and approval policy as full_access — the difference is only the name. For that, the change asks for a wire-protocol extension, a v17 schema migration (ALTER TABLE … DROP COLUMN, which also drops any dangerous_skip value on downgrade), regenerated TypeScript types, and — not included here — matching options in the Desktop and TUI pickers. That is a lot of surface for a label.

If we want the "name the danger explicitly" idea from Claude Code, the cheaper route is to make the existing full_access preset carry the warning in the UI copy and the audit log rather than add a fourth preset. This is the same half of #186 that we left out at the time, and the reasoning has not changed, so I am closing this one.

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.

2 participants