T08 · Insecure Dependencies
- Location
SKILL.md:41- Finding
Unpinned and Unverified Third-Party CLI Dependency
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Zhihu CLI skill is purpose-aligned, but it needs review because it handles reusable account cookies and allows account-content deletion without a required confirmation step.
Review this before installing if the agent will use your Zhihu account. Prefer QR login over cookie login, avoid pasting cookies into chat or command lines, consider pinning and reviewing the pyzhihu-cli version, and require the agent to ask for explicit confirmation before any delete, publish, vote, follow, or other account-changing action. Use zhihu logout to clear the local session when finished.
SKILL.md:41Unpinned and Unverified Third-Party CLI Dependency
SKILL.md:15Zhihu Session Cookies Exposed Through Command-Line Arguments
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
1. **诉求 → 命令**:按下表映射。
2. **数据查询优先用 --json**:凡执行**数据查询类**指令(如 `search`、`hot`、`question`、`answers`、`answer`、`user`、`user-answers`、`user-articles`、`followers`、`following`、`feed`、`topic`、`collections`、`notifications`、`whoami` 等),**必须**带 `--json`,以获取 API 返回的完整数据,便于解析、汇总或向用户展示;不得仅依赖终端表格等非结构化输出。例外:`feeds` 当前不支持 `--json`;需要展示回答评论时使用 `answer --comments`(`--json` 只输出回答详情,不输出评论)。
3. **需登录时**:先 `zhihu status`;未登录则 `zhihu login --qrcode` 或引导用户 `zhihu login --cookie "..."`。
4. **扫码登录**:执行 `zhihu login --qrcode` 后,若本轮未发过二维码且用户已配置 OpenClaw → 先将二维码复制到 OpenClaw 工作目录的 `media` 文件夹,再 `openclaw message send --channel <渠道> --target <目标> --media <media 路径>/login_qrcode.png --message "请用知乎 App 扫码并确认登录"`;**保持登录进程不中断**直到成功/失败/超时;用户说「重新登录/换号」则中断当前进程再重新执行登录。**复制步骤**:Linux/macOS:`mkdir -p ~/.openclaw/workspace/media && cp ~/.zhihu-cli/login_qrcode.png ~/.openclaw/workspace/media/`;Windows:`mkdir "%USERPROFILE%\.openclaw\workspace\media" 2>nul & copy "%USERPROFILE%\.zhihu-cli\login_qrcode.png" "%USERPROFILE%\.openclaw\workspace\media\login_qrcode.png"`(若 OpenClaw 工作目录不同则替换为实际路径)。
5. **安全**:Cookie 仅本地;优先扫码,避免在不可信处粘贴 Cookie;可提醒 `zhihu logout` 清空。
6. **升级**:`uv tool upgrade pyzhihu-cli` / `pipx upgrade pyzhihu-cli` / `pip install -U pyzhihu-cli`。
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
1. **诉求 → 命令**:按下表映射。
2. **数据查询优先用 --json**:凡执行**数据查询类**指令(如 `search`、`hot`、`question`、`answers`、`answer`、`user`、`user-answers`、`user-articles`、`followers`、`following`、`feed`、`topic`、`collections`、`notifications`、`whoami` 等),**必须**带 `--json`,以获取 API 返回的完整数据,便于解析、汇总或向用户展示;不得仅依赖终端表格等非结构化输出。例外:`feeds` 当前不支持 `--json`;需要展示回答评论时使用 `answer --comments`(`--json` 只输出回答详情,不输出评论)。
3. **需登录时**:先 `zhihu status`;未登录则 `zhihu login --qrcode` 或引导用户 `zhihu login --cookie "..."`。
4. **扫码登录**:执行 `zhihu login --qrcode` 后,若本轮未发过二维码且用户已配置 OpenClaw → 先将二维码复制到 OpenClaw 工作目录的 `media` 文件夹,再 `openclaw message send --channel <渠道> --target <目标> --media <media 路径>/login_qrcode.png --message "请用知乎 App 扫码并确认登录"`;**保持登录进程不中断**直到成功/失败/超时;用户说「重新登录/换号」则中断当前进程再重新执行登录。**复制步骤**:Linux/macOS:`mkdir -p ~/.openclaw/workspace/media && cp ~/.zhihu-cli/login_qrcode.png ~/.openclaw/workspace/media/`;Windows:`mkdir "%USERPROFILE%\.openclaw\workspace\media" 2>nul & copy "%USERPROFILE%\.zhihu-cli\login_qrcode.png" "%USERPROFILE%\.openclaw\workspace\media\login_qrcode.png"`(若 OpenClaw 工作目录不同则替换为实际路径)。
5. **安全**:Cookie 仅本地;优先扫码,避免在不可信处粘贴 Cookie;可提醒 `zhihu logout` 清空。
6. **升级**:`uv tool upgrade pyzhihu-cli` / `pipx upgrade pyzhihu-cli` / `pip install -U pyzhihu-cli`。
The skill explicitly exposes destructive commands such as delete-question, delete-pin, and delete-article including the -y non-interactive confirmation flag, but it does not require an explicit user confirmation step or warn that deletion is irreversible. In an agent-execution context, this increases the chance of accidental or prompt-induced destructive actions against the user's account and content.
No suspicious patterns detected.