Skip to content
Report library
Purpose / Other

Wecomcli Contact Skill Security Audit

What the author says it does (original text)

使用 wecom-cli 按姓名、拼音、英文名或别名搜索企业微信通讯录中的人员,并查询匹配人员的 userid、部门和职务。适用于查找联系人、区分同名人员、获取用户 userid,以及列出全部同名人员。

Independent security check

Security risks found

Files checked
1
Risks found
2
Could it run dangerous commands?Looks for programs run straight after downloading, remote control of your computer, and hidden commands.Risks found: 1
Medium risk

A single quote can escape the JSON argument if keywords are interpolated directly into the shell example

Source references: 2
What we found

The command template encloses JSON in shell single quotes, while keywords originate from user input. The supplied material does not require an argument array or reliable JSON and shell escaping. If an execution agent substitutes the placeholder directly, a keyword containing a quote and shell operators could terminate the argument and be interpreted by the shell.

Why this matters

A malicious or accidentally crafted search term could cause additional local commands to run with the agent's permissions, potentially reading or changing accessible files and credentials. This depends on the actual command-construction method and is not proof that execution will occur.

What this evidence establishes

The visible command only single-quotes the placeholder `<JSON 参数>`; it does not show an implementation that directly concatenates a user-supplied keyword into a shell command. If an executor replaces that placeholder with an unescaped string, a quote in the keyword could enable shell injection. However, the command may instead be run using safe JSON serialization and a structured argument array. Without the script or command-building code, the risk cannot be confirmed. Users can ask for evidence that arguments are passed as structured argv values with correct JSON and shell-boundary encoding.

This assessment concerns the code and conditions shown, not proof that harm has occurred.
SKILL.md:22In the instructionsOpen original file
```bashwecom-cli contact users search --json '<JSON 参数>'```
Show 1 other places
SKILL.md:29In the instructionsOpen original file
|---|---|---|---|---|| `keywords` | string[] | 是 | — | 搜索关键词列表,可按姓名(用户名)/ 拼音 / 英文名 / 别名匹配,最多 10 个;多个关键词之间是 OR 关系 || `search_mode` | string | 否 | — | 搜索模式,默认不传该参数;仅当需要拿到完整人员名单时,才显式传 `"list"` |
Could it expose your files or keys?Looks for uploads of files containing passwords or keys, and keys written directly in the code.Risks found: 1
Medium risk

Search results may disclose personal and organizational directory data to the requester

Source references: 3
What we found

Results include unique user IDs, names, email addresses, positions, and department paths. Complete-list mode can enumerate every matching person. The Skill requires an explicit request for a complete list, but the supplied instructions do not require checking whether the requester may view the records or limiting returned fields.

Why this matters

If the underlying account has broad access, an unauthorized requester could obtain employee contact details, organizational placement, job information, and unique identifiers usable in other WeCom operations. Complete-list queries increase the scope of disclosure.

The skill queries and returns directory data including unique user IDs, names, email addresses, positions, and department paths, and enables a full-match mode when the requester explicitly asks for a complete list. The visible rules do not explain how the requester's authorization to access this personal and organizational data is verified. They refer to a separate prerequisite skill, but its contents are not provided. If the underlying account has broad access or these fields are shown directly, sensitive directory data could be disclosed. Users can ask whether the shared checks enforce identity, authorization, and minimum-field output.

SKILL.md:33In the instructionsOpen original file
- 默认(不传 `search_mode`):返回最相关的候选结果,用于常规按名 / 拼音等查单个人的场景,绝大多数场景走此分支。- 传 `search_mode = "list"`:返回全量命中列表。仅当用户明确要"完整名单"时才传,典型话术如"一共有几个张三 / 所有叫李四的人 / 列出全部同名 / 全部同名人员"等清点、穷举意图;此时不受"前 5 位"展示上限约束。
Show 2 other places
SKILL.md:40In the instructionsOpen original file
| `users` | array | 命中的用户列表 || `users[].userid` | string | 用户唯一标识 || `users[].name` | string | 中文姓名 || `users[].alias` | string | 英文名 / 别名(可能为空) || `users[].email` | string | 邮箱(可能为空) || `users[].position` | string | 管理职务(如"负责人"),**不是**"职位"(可能为空) || `users[].matched_keywords` | string[] | 本条 user 命中的请求关键词|| `users[].departments` | string[] | 所在部门路径列表(从大到小),主部门靠前 || `hint` | string | 结果限制提示(可能为空):当某个关键词的命中结果因限制未完整返回时,接口会在此字段给出说明 |
SKILL.md:11In the instructionsOpen original file
> 执行任何 `wecom-cli` 命令前,必须先读取并完成 `wecomcli-shared` 技能的公共前置检查。
Could it delete files or keep running?Looks for broad file deletion, disk overwrites, and programs set to start automatically.No risks found
Could it bypass safety checks?Looks for skipped website security checks, excessive file access, or actions that skip your approval.No risks found
Could it mislead the AI or hide text?Checks the skill instructions for requests to ignore you, influence the report, or hide text in invisible characters.No risks found
Could it change links or payment recipients without asking?Looks for forced referral or payment changes combined with instructions to hide the change.No risks found

Inside this skill

2 instruction sections

The Skill invokes an existing local `wecom-cli` binary and submits search keywords as a JSON argument to the WeCom contact-search interface.

View source
SKILL.md:6In the instructionsOpen original file
  requires:    bins: ["wecom-cli"]---
SKILL.md:22In the instructionsOpen original file
```bashwecom-cli contact users search --json '<JSON 参数>'```
SKILL.md:29In the instructionsOpen original file
|---|---|---|---|---|| `keywords` | string[] | 是 | — | 搜索关键词列表,可按姓名(用户名)/ 拼音 / 英文名 / 别名匹配,最多 10 个;多个关键词之间是 OR 关系 || `search_mode` | string | 否 | — | 搜索模式,默认不传该参数;仅当需要拿到完整人员名单时,才显式传 `"list"` |

A normal search returns the most relevant candidates. When the user explicitly requests a complete list, the Skill enables `list` mode and returns all matches without the five-person display limit.

View source
SKILL.md:32In the instructionsOpen original file
- 默认(不传 `search_mode`):返回最相关的候选结果,用于常规按名 / 拼音等查单个人的场景,绝大多数场景走此分支。- 传 `search_mode = "list"`:返回全量命中列表。仅当用户明确要"完整名单"时才传,典型话术如"一共有几个张三 / 所有叫李四的人 / 列出全部同名 / 全部同名人员"等清点、穷举意图;此时不受"前 5 位"展示上限约束。

Before any command runs, this Skill requires reading and completing another Skill named `wecomcli-shared`. Its contents are absent from the supplied evidence, so this audit cannot verify what permissions, network operations, or credential handling that prerequisite requires.

View source
SKILL.md:11In the instructionsOpen original file
> 执行任何 `wecom-cli` 命令前,必须先读取并完成 `wecomcli-shared` 技能的公共前置检查。
Start here · InstructionsSKILL.md
wecomcli-contact
Lines connect the instruction file to its sections, not an observed execution order. Select a section to read the source.
Files and check records1 files

Coverage and gaps

Content covered in each file

These are the source ranges included in this check, not a guarantee that every issue has been resolved.

  • SKILL.mdFull text included

This report is for the version above. We read the available code and instructions without running the skill or checking extra packages it installs. This is not a promise of safety: a different version or setup may behave differently.

  • SKILL.mdInstructions

Operations mentioned in code and instructions

Run commands
SKILL.md:21In the instructionsOpen original file
```bashwecom-cli contact users search --json '<JSON 参数>'
Lines read
59
File checksum (to compare versions)
94ca5e35439af192529299d744869e9b9fddd3f1f37f1d86325ec16c8f7e7703