figma-agent
The skill reads Figma OAuth tokens from third-party credential stores (Claude Code, Codex, Windsurf) and writes them to OpenClaw config — a credential harvesting pattern that is completely undeclared in SKILL.md, creating significant documentation deception risk.
为什么得出这个结论
2/4 个维度触发发现 3 项声明之外的能力或越权行为。
提取到 13 个一般风险产物,需要结合上下文判断。
报告包含 6 步攻击链,另有 2 项高危或严重发现。
依赖结构存在,但暂未看到明显高危告警。
攻击链
初始入口 · SKILL.md:1
reconnaissance · scripts/token-scanner.mjs:56
reconnaissance · scripts/token-scanner.mjs:74
权限提升 · scripts/bootstrap-token.mjs:39
持久化 · scripts/bootstrap-token.mjs:77
最终危害 · scripts/bootstrap-token.mjs:77
风险分是怎么被拉高的
SKILL.md never mentions that bootstrap-token.mjs scans ~/.claude/.credentials.json, ~/.codex/auth.json, and ~/.codeium/windsurf/mcp_config.json for OAuth tokens — this is a critical omission
The token-scanner.mjs file iterates all keys in mcpOAuth and all top-level keys in auth.json, making it structurally capable of harvesting non-Figma tokens beyond declared scope
bootstrap-token.mjs performs POST to api.figma.com for token refresh, not declared in SKILL.md prerequisites or capability groups
Token is written to openclaw.json (filesystem:WRITE) — SKILL.md only declares FIGMA_MCP_TOKEN env requirement, not config file modification
Tokens are written only to openclaw.json, not exfiltrated to third-party servers; refresh targets official Figma API
Claude Code token scan filters by key.includes('figma'), reducing scope of harvested data
最关键的证据
Undeclared scanning of Claude Code credential store
token-scanner.mjs reads and parses ~/.claude/.credentials.json, iterating all mcpOAuth keys to extract Figma tokens. This is not declared in SKILL.md's prerequisites or any capability group. While the intent is to bootstrap a Figma MCP token, the scanning pattern (iterating all keys, not just Figma-specific paths) and the absence of any disclosure raises concerns.
scripts/token-scanner.mjs:56 Undeclared scanning of Codex and Windsurf credential stores
The same token-scanner.mjs also reads ~/.codex/auth.json and ~/.codeium/windsurf/mcp_config.json. SKILL.md mentions 'Claude Code' and 'add Figma in MCP settings' for Codex/Cursor/VS Code, but never describes that this skill will parse their local credential files.
scripts/token-scanner.mjs:74 SKILL.md declares only env and node requirements, omits all file and network access
The 'requires' section of SKILL.md only states env: FIGMA_MCP_TOKEN and anyBins: node. It never mentions that bootstrap-token.mjs will read 3 credential files, make HTTP POST requests to api.figma.com, and write to openclaw.json. This constitutes a documentation mismatch on declared vs actual capabilities.
SKILL.md:1 Overly broad key iteration in Claude Code credential parsing
The Claude Code scan iterates all keys in mcpOAuth (Object.entries) and checks key.includes('figma'). This structural pattern (full key iteration + string containment check) is a common indicator of token harvesting code, even though the specific filter narrows the scope at evaluation time. The same pattern exists for Codex auth.json (all top-level keys iterated).
scripts/token-scanner.mjs:60 Token bootstrap script and --refresh flag not documented in SKILL.md
SKILL.md describes 'node scripts/bootstrap-token.mjs' but does not document the --refresh flag which performs a network request. The token refresh capability (POST to Figma OAuth endpoint) is entirely absent from documentation.
SKILL.md:58 声明能力 vs 实际能力
token-scanner.mjs:56-72 reads ~/.claude/.credentials.json, ~/.codex/auth.json, ~/.codeium/windsurf/mcp_config.json — no filesystem:READ declared anywhere in SKILL.md bootstrap-token.mjs:77 writes to openclaw.json — SKILL.md declares only FIGMA_MCP_TOKEN env requirement, not config file writes bootstrap-token.mjs:39-49 POSTs refresh token to api.figma.com/v1/oauth/token — no network access declared in SKILL.md SKILL.md declares FIGMA_MCP_TOKEN env requirement; figma-mcp-cli.mjs:9 reads process.env.FIGMA_MCP_TOKEN No subprocess or shell execution found 可疑产物与外联
https://keepachangelog.com/ CHANGELOG.md:5
https://semver.org/ CHANGELOG.md:5
https://help.figma.com/hc/en-us/articles/32132100833559 README.md:5
https://img.shields.io/badge/License-MIT-green.svg README.md:9
https://img.shields.io/badge/version-v0.1.1-blue.svg README.md:10
https://clawhub.ai README.md:11
https://img.shields.io/badge/ClawHub-skill-purple.svg README.md:11
https://mcp.figma.com/mcp README.md:37
https://nodejs.org README.md:57
https://developers.figma.com/docs/figma-mcp-server/write-to-canvas/ README.md:168
https://api.figma.com/v1/oauth/token scripts/bootstrap-token.mjs:32
https://figma.com/mcp scripts/figma-mcp.mjs:179
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| none | N/A | none | 否 | No npm dependencies — pure Node.js built-ins (fs, os, path, fetch) |
文件构成
scripts/bootstrap-token.mjs scripts/token-scanner.mjs SKILL.md README.md scripts/figma-mcp.mjs CHANGELOG.md package.json