Keyword-free filters can enumerate coworkers and expose unnecessary personal and relationship data
Source references: 5The documentation permits Boolean-filter-only searches without a name or email, and its example lists every departed coworker the user has chatted with. Results may also include personal email, department, signature, account status, chat history indication, and a P2P chat ID. Even within the account's visibility, this can exceed what is needed to resolve one contact.
If an agent uses a broad search for an ambiguous request, terminal output, model context, or subsequent replies may expose coworkers' contact details, organizational affiliation, departure status, and communication relationships. Batch lookup of up to 100 open IDs increases the possible exposure in one operation.
The documentation explicitly permits searches with only Boolean filters—without a name, email, or ID—and provides an executable example that enumerates all former colleagues the user has chatted with. The output contract includes personal/work email, department, signature, account status, P2P chat ID, and chat relationship, potentially exceeding what is needed to resolve one contact. This risk arises if the agent uses the broad filter for a vague request or on its own; results remain limited to the current user's visibility. Users can ask the author to disable filter-only enumeration by default, minimize returned fields, and require confirmation of scope and purpose before bulk queries.
`--query` / `--queries` / `--user-ids` / bool filter 至少传一个。bool filter 显式传 `=false` 会报错——不传等于不过滤。Show 4 other places
# filter-only 枚举:列出所有"聊过天的离职同事"(无关键词)lark-cli contact +search-user --has-chatted --left-organization```- ✅ 已知姓名 / 邮箱 / 「聊过的人」想找出 open_id- ✅ 已知一组 open_id 想批量校验或回填字段(`--user-ids`,最多 100,支持 `me`)- ✅ 按聊天关系 / 在职状态 / 租户边界 / 企业邮箱等维度筛选员工- ❌ 已知 open_id 想发消息 → 直接走 `lark-im`,不经过本命令| `localized_name` | string | 按 `--lang` / brand 选出的展示名 | 始终非空(兜底为 open_id) || `email` | string | 个人邮箱 | 可能为空 || `enterprise_email` | string | 企业邮箱 | 可能为空 || `is_activated` | bool | 是否已激活飞书账号(未激活也可投递消息,但用户可能看不到) | 可能 false || `is_cross_tenant` | bool | 是否跨租户用户(同公司=false,外部联系人=true) | — || `p2p_chat_id` | string | 与当前用户的 P2P 会话 ID(`oc_...`);空表示从未私聊过。可作为接受 `--chat-id` 的 IM 命令的输入 | 可能为空 || `has_chatted` | bool | `p2p_chat_id != ""` 的派生字段 | — || `department` | string | 部门路径,服务端可能用 `-` 拼层级,层级数不固定。**按可子串匹配的字符串处理** | 可能为空 || `signature` | string (optional) | 用户个性签名;空时字段不出现 | 可能不出现 || `chat_recency_hint` | string | 最近联系的提示文案,仅供展示 | 可能为空 |- **41050 / Permission denied** 受当前身份的可见范围限制(三条命令都可能遇到)。细节见 [`lark-shared`](../lark-shared/SKILL.md)。- **跨租户用户**(`is_cross_tenant=true`)多数业务字段为空字符串,这是飞书可见性规则,下游做空值兜底。- **ID 类型**:`+get-user` 可通过 `--user-id-type` 使用 `open_id`、`union_id` 或 `user_id`;`+search-user` 使用用户 open_id;`+search-bot` 不支持按 ID 查询,它按关键词搜索并返回机器人 open_id。