Scan Report
48 /100
figma-agent
Unified Figma skill for OpenClaw. Reads design context via Figma's Remote MCP and routes write/edit/create operations through ACP coding sessions.
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.
Use with caution
Remove the credential-store scanning logic from token-scanner.mjs. Replace with a user-driven flow where the token is pasted or provided directly, or clearly document the credential scanning in SKILL.md with a prominent security warning explaining exactly which files are read and why.
Attack Chain 6 steps
◎
Entry Skill presents as a legitimate Figma design tool with minimal requirements (node + FIGMA_MCP_TOKEN)
SKILL.md:1⬡
Escalation bootstrap-token.mjs invokes token-scanner.mjs which reads ~/.claude/.credentials.json, iterating all mcpOAuth entries
scripts/token-scanner.mjs:56⬡
Escalation Same scanner reads ~/.codex/auth.json and ~/.codeium/windsurf/mcp_config.json for additional tokens
scripts/token-scanner.mjs:74⬡
Escalation If --refresh is passed, bootstrap-token.mjs POSTs refresh token to api.figma.com — undeclared network access
scripts/bootstrap-token.mjs:39⬡
Escalation Extracted tokens are written to openclaw.json under mcp.servers.figma — config file modification undeclared
scripts/bootstrap-token.mjs:77◉
Impact Figma access tokens stored in openclaw.json could be read by other processes with filesystem access to ~/.openclaw/
scripts/bootstrap-token.mjs:77Findings 5 items
| Severity | Finding | Location |
|---|---|---|
| High | Undeclared scanning of Claude Code credential store Credential Theft | scripts/token-scanner.mjs:56 |
| High | Undeclared scanning of Codex and Windsurf credential stores Credential Theft | scripts/token-scanner.mjs:74 |
| Medium | SKILL.md declares only env and node requirements, omits all file and network access Doc Mismatch | SKILL.md:1 |
| Medium | Overly broad key iteration in Claude Code credential parsing Sensitive Access | scripts/token-scanner.mjs:60 |
| Low | Token bootstrap script and --refresh flag not documented in SKILL.md Doc Mismatch | SKILL.md:58 |
| Resource | Declared | Inferred | Status | Evidence |
|---|---|---|---|---|
| Filesystem | NONE | READ | ✗ Violation | token-scanner.mjs:56-72 reads ~/.claude/.credentials.json, ~/.codex/auth.json, ~… |
| Filesystem | NONE | WRITE | ✗ Violation | bootstrap-token.mjs:77 writes to openclaw.json — SKILL.md declares only FIGMA_MC… |
| Network | NONE | WRITE | ✗ Violation | bootstrap-token.mjs:39-49 POSTs refresh token to api.figma.com/v1/oauth/token — … |
| Environment | READ | READ | ✓ Aligned | SKILL.md declares FIGMA_MCP_TOKEN env requirement; figma-mcp-cli.mjs:9 reads pro… |
| Shell | NONE | NONE | — | No subprocess or shell execution found |
13 findings
Medium External URL 外部 URL
https://keepachangelog.com/ CHANGELOG.md:5 Medium External URL 外部 URL
https://semver.org/ CHANGELOG.md:5 Medium External URL 外部 URL
https://help.figma.com/hc/en-us/articles/32132100833559 README.md:5 Medium External URL 外部 URL
https://img.shields.io/badge/License-MIT-green.svg README.md:9 Medium External URL 外部 URL
https://img.shields.io/badge/version-v0.1.1-blue.svg README.md:10 Medium External URL 外部 URL
https://clawhub.ai README.md:11 Medium External URL 外部 URL
https://img.shields.io/badge/ClawHub-skill-purple.svg README.md:11 Medium External URL 外部 URL
https://mcp.figma.com/mcp README.md:37 Medium External URL 外部 URL
https://nodejs.org README.md:57 Medium External URL 外部 URL
https://developers.figma.com/docs/figma-mcp-server/write-to-canvas/ README.md:168 Medium External URL 外部 URL
https://api.figma.com/v1/oauth/token scripts/bootstrap-token.mjs:32 Medium External URL 外部 URL
https://figma.com/mcp scripts/figma-mcp.mjs:179 Info Email 邮箱地址
[email protected] package.json:7 File Tree
9 files · 35.4 KB · 961 lines Markdown 4f · 491L
JavaScript 4f · 451L
JSON 1f · 19L
├─
▾
references
│ └─
figma-api.md
Markdown
├─
▾
scripts
│ ├─
bootstrap-token.mjs
⚠
JavaScript
│ ├─
figma-mcp-cli.mjs
JavaScript
│ ├─
figma-mcp.mjs
JavaScript
│ └─
token-scanner.mjs
⚠
JavaScript
├─
CHANGELOG.md
Markdown
├─
package.json
JSON
├─
README.md
Markdown
└─
SKILL.md
Markdown
Dependencies 1 items
| Package | Version | Source | Known Vulns | Notes |
|---|---|---|---|---|
none | N/A | none | No | No npm dependencies — pure Node.js built-ins (fs, os, path, fetch) |
Security Positives
✓ Zero npm dependencies in package.json — eliminates supply-chain attack surface entirely
✓ No base64 encoding, eval(), or obfuscated code patterns anywhere in the codebase
✓ Tokens are written only to the local openclaw.json config, not exfiltrated to external servers
✓ Token refresh targets the official Figma OAuth endpoint (api.figma.com), not an attacker-controlled server
✓ Claude Code token scan includes a Figma-scope filter (key.includes('figma')) limiting data exposure
✓ No reverse shell, C2 communication, or data theft chains identified
✓ Code is modular with clear separation: token-scanner.mjs (file I/O), bootstrap-token.mjs (network + config), figma-mcp.mjs (MCP client)