Back to skill

Security audit

Yinxiang Skill 1.0.4

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Yinxiang/Evernote integration that uses the user's token to manage notes, with some credential-handling and input-escaping weaknesses to be aware of.

Install only if you trust this skill with your Yinxiang notes. It can read note details and create or modify notes, notebooks, and tags using your token. Prefer a short-lived or revocable token, avoid pasting long-lived secrets where logs are retained, and rotate the token if it may have been exposed.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/get-note-detail.sh:4
Finding

Unsafe JSON Construction in the Bash Note-Detail Request

Content
View full analysis
" exit 1 fi curl -s -X POST \ "https://app.yinxiang.com/third/ai-chat-note/grpc-api/search/getNoteDetail" \ -H "Content-Type: application/json" \ -H "auth: $TOKEN" \ -d "{\"guid\":\"$GUID\",\"source\":\"skill\",\"resultSpec\":{\"includeContent\":true,\"includeResources\":false,\"includeTags\":true,\"includeResourceContent\":false}}" ``` ### Technical Analysis The script inserts the first command-line argument directly into a JSON string without applying JSON escaping or validating the expected GUID format. Shell quoting prevents ordinary shell command substitution inside the already-expanded variable, so this is not a local shell-command injection vulnerability. However, characters such as quotes and backslashes can terminate or alter the JSON string. For example, a crafted value could inject additional JSON properties or create duplicate properties. Whether an altered request is accepted, and which duplicate value takes precedence, depends on the remote service's JSON parser and request validation. The project already uses `python3` with `json.dumps` in other Bash scripts, demonstrating that safe serialization is available but is not used here. ### Attack Path 1. An attacker persuades a user or agent to process a crafted value as a note GUID. 2. The agent invokes `get-note-detail.sh` with the crafted value as its first argument. 3. The script places that value directly inside the JSON request body. 4. Quotes or JSON delimiters in the value alter or invalidate the request structure. 5. The authenticated request is sent to the Yinxiang note-detail endpoint using the victim's token. 6. If the server accepts the modified structure, unintend ...[truncated 640 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/get-note-detail.ps1:1
Finding

Unsafe JSON Construction in the PowerShell Note-Detail Request

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/save-token.sh:3
Finding

Authorization Token Exposed Through Command-Line Arguments

Content
View full analysis
TOKEN="$1" ``` The documented authorization flow also embeds the token in commands such as: ```bash openclaw config set skills.entries.yinxiang-skill.apiKey && mkdir -p ~/.config/yinxiang-skill && printf '%s' '' > ~/.config/yinxiang-skill/token && chmod 600 ~/.config/yinxiang-skill/token ``` ### Technical Analysis The token is accepted as a command-line argument. Command arguments may be recorded in shell history, terminal transcripts, agent execution logs, monitoring systems, and process metadata. On systems where process arguments are visible to other local users, the token may also be observable while the command is running. The authorization instructions additionally ask the user to send the token through the conversation and direct the agent to embed it into generated commands. This increases the number of systems that may retain the credential. The Unix token file itself is protected with mode `0600`, but that protection does not remove copies retained in history, logs, chat records, or process listings. ### Attack Path 1. The user obtains a Yinxiang authorization token. 2. The token is sent through chat or passed to `save-token.sh` as a command-line argument. 3. The full invocation is retained in shell history, execution logs, a transcript, or process metadata. 4. A local user or party with access to those records retrieves the token. 5. The exposed token is reused against Yinxiang APIs. 6. The attacker accesses or modifies note resources within the token's authorized scope. ### Impact Assessment A stolen token may allow authenticated access to the victim's Yinxiang account features exposed by these APIs, including reading note details, searching notes, creating not ...[truncated 277 chars]
Remediation
View remediation
"$HOME/.config/yinxiang-skill/token" ``` - Document token revocation and rotation procedures. - Rotate tokens that may already have been captured in transcripts or logs. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/save-token.ps1:2
Finding

Windows Token File Is Stored Without Explicitly Restrictive Access Controls

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (86)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 17)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 165)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 192)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 204)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 212)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 220)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 222)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 267)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 275)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 283)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 293)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 303)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 309)May include surrounding context.

md
- 优先使用 `scripts/` 中当前平台对应的脚本或 `references/api-commands.md` 中的命令调用 API;如果参考脚本疑似有误、在当前环境运行异常、输出格式不适合继续处理,或与接口文档/字段声明不一致,不要修改 skill 内置参考脚本,改为以 `references/api-comm

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/_common.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/clip-url.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/create-note.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/create-notebook.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/create-tag.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/get-note-detail.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/list-notebooks.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/list-notes.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/list-tags.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/save-token.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/search-notes.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · scripts/update-note.ps1 (reported line 1)May include surrounding context.

text
param(
    [Parameter(Mandatory)][string]$NoteGuid,
    [string]$Title = "",
    [string]$Content = "",