T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/figma_generator.py:24- Finding
Unnecessary Automatic Discovery and Loading of Figma Credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a normal UI prototype generator, but its Figma path reads local access-token files too broadly and its packaging script could accidentally include credentials.
Review this before installing if you plan to use Figma. Use a dedicated, revocable Figma token with minimal scope, keep real auth-profiles.json files outside the skill package directory, and avoid running the packaging script near credential files. Treat generated output paths as untrusted unless you control the requested names. HTML-only use is much lower risk.
scripts/figma_generator.py:24Unnecessary Automatic Discovery and Loading of Figma Credentials
scripts/package_skill.py:35Credential Files Can Be Accidentally Included in Distributable Skill Archives
scripts/html_generator.py:37Unrestricted HTML Output Path and Unescaped Title Derived from User Input
scripts/figma_generator.py:105Figma Prototype Name Allows Output Path Traversal and File Overwrite
This mismatch explicitly mentions reading a local credential store (auth-profiles.json) even though that sensitive local-access behavior is not clearly declared in the skill's purpose. Undisclosed access to stored tokens materially changes the security posture because users may invoke a prototype skill without realizing it can inspect local secrets and use them for API operations.
This mismatch explicitly mentions reading a local credential store (auth-profiles.json) even though that sensitive local-access behavior is not clearly declared in the skill's purpose. Undisclosed access to stored tokens materially changes the security posture because users may invoke a prototype skill without realizing it can inspect local secrets and use them for API operations.
This mismatch explicitly mentions reading a local credential store (auth-profiles.json) even though that sensitive local-access behavior is not clearly declared in the skill's purpose. Undisclosed access to stored tokens materially changes the security posture because users may invoke a prototype skill without realizing it can inspect local secrets and use them for API operations.
This mismatch explicitly mentions reading a local credential store (auth-profiles.json) even though that sensitive local-access behavior is not clearly declared in the skill's purpose. Undisclosed access to stored tokens materially changes the security posture because users may invoke a prototype skill without realizing it can inspect local secrets and use them for API operations.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"note": "Get your token from https://www.figma.com/settings"
}
},
"_comment": "Replace YOUR_FIGMA_TOKEN_HERE with your actual Figma Personal Access Token"
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"note": "Get your token from https://www.figma.com/settings"
}
},
"_comment": "Replace YOUR_FIGMA_TOKEN_HERE with your actual Figma Personal Access Token"
}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def check_auth(self):
"""Check if Figma authentication is available"""
if not self.access_token:
print("❌ Figma access token not found")
print("\nTo set up Figma authentication:")
print("1. Go to https://www.figma.com/settings")
print("2. Scroll to 'Personal Access Tokens'")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
print("❌ Figma access token not found")
print("\nTo set up Figma authentication:")
print("1. Go to https://www.figma.com/settings")
print("2. Scroll to 'Personal Access Tokens'")
print("3. Click 'Create new token'")
print("4. Copy the token (starts with 'figd_')")
print("5. Save it to auth-profiles.json:")
The README instructs users to use a third-party Figma API and supply an access token, but it does not clearly warn that uploaded screenshots, UI descriptions, and generated design structure may be transmitted to an external service. This creates a real privacy and data-governance risk because users may unknowingly send proprietary or sensitive design artifacts off-platform.
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.
# Location: ~/.openclaw/agents/main/agent/auth-profiles.json
{
The README states that the skill can send user-provided design content to the Figma API and return a file link, but it does not clearly warn users that screenshots, descriptions, or other potentially sensitive UI data will be transmitted to a third-party service. In a prototyping skill, users may unknowingly include internal product screens, customer data, or unreleased designs, so the lack of an explicit disclosure meaningfully increases privacy and data-handling risk.
The skill describes capabilities that imply file reads, file writes, and outbound network access, but it does not declare any explicit tool scope or allowed-tools boundary. This weakens least-privilege controls and makes it easier for a host agent to grant broader access than necessary, especially because the workflow also references credential reads and API calls.
Natural-language policy violations include forcing a specific language or locale without user opt-in. The entire skill description and examples are in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context.
The workflow describes reading stored credentials and sending prototype data to an external API without an explicit privacy or security warning. This is dangerous because users may provide proprietary screenshots, design details, or tokens without understanding that local secrets will be accessed and data will be transmitted off-system.
This finding points to the concrete POST request that sends JSON payloads to the Figma API. In a design-prototype skill this behavior is legitimate, but without clear permission gating and data-handling disclosure it can still expose confidential UI assets or metadata to a third party.
headers = {"X-Figma-Token": auth['access_token']}
response = requests.post(
"https://api.figma.com/v1/files",
json={"name": "Prototype", "nodes": nodes},
headers=headers
This finding points to the concrete POST request that sends JSON payloads to the Figma API. In a design-prototype skill this behavior is legitimate, but without clear permission gating and data-handling disclosure it can still expose confidential UI assets or metadata to a third party.
headers = {"X-Figma-Token": auth['access_token']}
response = requests.post(
"https://api.figma.com/v1/files",
json={"name": "Prototype", "nodes": nodes},
headers=headers
The hardcoded external endpoint confirms third-party data transmission. While appropriate for optional Figma export, it becomes more dangerous in this skill because the same document also references local credential access and does not clearly separate default local HTML generation from optional networked behavior with consent safeguards.
headers = {"X-Figma-Token": auth['access_token']}
response = requests.post(
"https://api.figma.com/v1/files",
json={"name": "Prototype", "nodes": nodes},
headers=headers
)
The package description is written entirely in Chinese, which indicates a language-specific experience without offering the user any language or locale choice. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.
The skill manifest describes generating interactive prototypes from images or descriptions, defaulting to HTML output and only using Figma when explicitly requested. This plugin manifest instead defines a Figma-side 'UI Prototype Importer' with no indication of HTML generation, suggesting the file implements only a Figma import path rather than the broader/default behavior claimed for the skill.
This plugin manifest declares no permissions and explicitly forbids network access via allowedDomains set to 'none'. The skill description claims support for generating Figma design files through an API, which would ordinarily require network access or additional permissions, so this component’s declared permissions do not cover that advertised capability.
The top-level description says the tool 'Generates Figma designs via API from HTML or reference images', and the manifest states Figma files can be generated through an API. In practice, create_prototype explicitly avoids API calls and instead serializes a local JSON file for later manual import, so the implemented behavior is materially narrower than the claimed capability.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def __init__(self, access_token=None):
self.access_token = access_token or self._load_token()
self.base_url = "https://api.figma.com/v1"
def _load_token(self):
"""Load Figma token from auth-profiles.json"""
The docstring states 'Create or update Figma prototype', which implies direct creation or modification of a Figma resource. The implementation immediately notes that no real API call is made and instead generates a JSON file that can be imported later, contradicting the documented behavior.
The generated document sets <html lang="zh-CN">, which forces a specific locale in all output regardless of user preference or project context. This is a natural-language/locale policy issue because the skill does not offer opt-in, configuration, or a documented reason for restricting output to Chinese.
SQP-3 适用于所有文件类型。该 README 全文以中文给出操作说明和使用方式,但没有说明这是可选本地化版本、也没有提供语言选择或用户 opt-in,可能与要求不强制特定语言的组织政策冲突。