Back to skill

Security audit

yinxiang-notes

Security checks for vulnerabilities and agentic risk

Overview

This Evernote China skill mostly matches its stated purpose, but it needs Review because it handles account tokens unsafely, includes an undocumented note export script, and can permanently delete or persist note data.

Install only if you are comfortable giving the skill broad access to your Yinxiang/Evernote account and writing note contents to local disk. Remove token-printing debug output, validate the NoteStore URL, delete or document get_note_enml.py, use a dedicated skill-scoped secret location, and require explicit confirmation before permanent trash deletion.

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 (5)

T09 · Insecure Skill Coding Practices

Note
Location
scripts/list_tags.py:34
Finding

Developer Token Prefix Disclosed Through Standard Output

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/list_tags.py:25
Finding

Developer Token Can Be Transmitted to an Unrestricted Configured Endpoint

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/get_note_enml.py:12
Finding

Undocumented Hard-Coded Note Exporter Writes Raw Content to Plaintext

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/empty_trash.py:69
Finding

Permanent Trash Deletion Can Bypass the CLI Confirmation Prompt

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sync_to_obsidian.py:509
Finding

Unsanitized Note HTML Is Persisted as Renderable Web-Clip Content

Content
View full analysis
\n") f.write(f"\n") f.write(make_clip_html(original_content or '', hash_to_file)) ``` The HTML conversion function only replaces ENML media and removes wrapper declarations: ```python c = enml_content for _ in range(100): new_c = replace_en_media_html(c) if new_c == c: break c = new_c c = re.sub(r'<\?xml[^?]*\?>', '', c) c = re.sub(r']*>', '', c) c = re.sub(r']*>', '
', c) c = re.sub(r'', '
', c) return c.strip() ``` ### Technical Analysis Long clipped notes identified as ENML web clips are written to `.html` files. `make_clip_html()` does not sanitize active elements or attributes. It does not remove scripts, inline event handlers, iframes, unsafe URL schemes, forms, or remote resource references. If hostile content reaches an Evernote note—such as through a malicious web clip, shared note, compromised account, or imported content—the synchronized HTML preserves that active content. Execution depends on how the resulting file is opened. The risk becomes exploitable when it is rendered by a browser or an Obsidian plugin that permits active HTML behavior. ### Attack Path 1. An attacker causes a malicious or compromised web clip to exist in the Evernote account. 2. The note contains active HTML, such as script-capable elements, event handlers, unsafe links, or remote resources. 3. The user runs `sync_to_obsidian.py`. 4. The script classifies the content as a sufficiently large clipped note. 5. `make_clip_html()` ...[truncated 729 chars]
Remediation
View remediation
`, ``, `<object>`, `<embed>`, and active form elements - all inline event attributes such as `onclick` and `onload` - `javascript:`, unsafe `data:`, and other executable URL schemes - automatic remote-resource references unless explicitly permitted - Consider converting all clips to inert Markdown or escaped source text. - If original HTML must be retained, store it with a non-renderable extension and require an explicit export step. - Add a prominent warning that generated clips are untrusted content. - Test the sanitizer against malformed markup and common HTML injection payloads. - Recommend that viewers use sandboxing and disable script execution and remote resource loading. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (40)

Credential Access

High
Category
Privilege Escalation
Confidence
72% confidence
Finding

The script walks up to a workspace-level .env and reads Evernote credentials from there, which broadens the trust boundary beyond the script's own directory. In an agent/skill ecosystem, this can unintentionally consume secrets from a shared workspace and make cross-skill secret exposure more likely if an untrusted skill is introduced or logs/errors reveal the loaded values.

Content

Scanner excerpt · scripts/create_note.py (reported line 26)May include surrounding context.

python
skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)
    workspace_dir = os.path.dirname(skills_dir)
    env_path = os.path.join(workspace_dir, '.env')

    token = None
    note_store_url = None

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code loads a live Evernote token from a workspace .env file and then exposes part of it in console output while establishing the connection. In an agent skill context, console output may be captured by orchestrators, shared logs, or other tools, making credential leakage more dangerous than in a purely local one-off script.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/create_note.py (reported line 21)May include surrounding context.

python
def load_config():
    """从 .env 文件加载配置"""
    script_dir = os.path.dirname(__file__)
    skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/delete_note.py (reported line 19)May include surrounding context.

python
def load_config():
    """从 .env 文件加载配置"""
    script_dir = os.path.dirname(__file__)
    skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/empty_trash.py (reported line 18)May include surrounding context.

python
def load_config():
    """从 .env 文件加载配置"""
    script_dir = os.path.dirname(__file__)
    skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/list_notebooks.py (reported line 18)May include surrounding context.

python
def load_config():
    """从 .env 文件加载配置"""
    script_dir = os.path.dirname(__file__)
    skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/list_notebooks.py (reported line 54)May include surrounding context.

python
def load_config():
    """从 .env 文件加载配置"""
    script_dir = os.path.dirname(__file__)
    skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/list_trash.py (reported line 19)May include surrounding context.

python
def load_config():
    """从 .env 文件加载配置"""
    script_dir = os.path.dirname(__file__)
    skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/search_notes.py (reported line 21)May include surrounding context.

python
def load_config():
    """从 .env 文件加载配置"""
    script_dir = os.path.dirname(__file__)
    skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/update_note.py (reported line 23)May include surrounding context.

python
def load_config():
    """从 .env 文件加载配置"""
    script_dir = os.path.dirname(__file__)
    skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/delete_note.py (reported line 24)May include surrounding context.

python
skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)
    workspace_dir = os.path.dirname(skills_dir)
    env_path = os.path.join(workspace_dir, '.env')
    
    token = None
    note_store_url = None

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/empty_trash.py (reported line 23)May include surrounding context.

python
skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)
    workspace_dir = os.path.dirname(skills_dir)
    env_path = os.path.join(workspace_dir, '.env')
    
    token = None
    note_store_url = None

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/list_notebooks.py (reported line 23)May include surrounding context.

python
skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)
    workspace_dir = os.path.dirname(skills_dir)
    env_path = os.path.join(workspace_dir, '.env')
    
    token = None
    note_store_url = None

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/list_trash.py (reported line 24)May include surrounding context.

python
skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)
    workspace_dir = os.path.dirname(skills_dir)
    env_path = os.path.join(workspace_dir, '.env')
    
    token = None
    note_store_url = None

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/search_notes.py (reported line 26)May include surrounding context.

python
skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)
    workspace_dir = os.path.dirname(skills_dir)
    env_path = os.path.join(workspace_dir, '.env')
    
    token = None
    note_store_url = None

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/update_note.py (reported line 28)May include surrounding context.

python
skill_dir = os.path.dirname(script_dir)
    skills_dir = os.path.dirname(skill_dir)
    workspace_dir = os.path.dirname(skills_dir)
    env_path = os.path.join(workspace_dir, '.env')
    
    token = None
    note_store_url = None

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The script explicitly locates and reads a workspace-level .env file to obtain an Evernote bearer token, which is credential access behavior beyond the narrow need of a simple tag-listing utility and broadens the blast radius to any shared workspace secrets. In the context of an agent skill, this is more dangerous because skills may run in semi-automated environments where stdout/logging and cross-skill file access can expose credentials without the user noticing.

Content

Scanner excerpt · scripts/list_tags.py (reported line 15)May include surrounding context.

python
skill_dir = os.path.dirname(scripts_dir)
skills_dir = os.path.dirname(skill_dir)
workspace_dir = os.path.dirname(skills_dir)
env_path = os.path.join(workspace_dir, '.env')

print(f"工作目录: {workspace_dir}")
print(f"ENV文件: {env_path}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file lists empty_trash.py as permanently deleting the trash, but provides no caution, confirmation note, or warning about data loss. Because the operation is destructive and irreversible, the skill description should explicitly warn users before they run it.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents and encourages local file read/write behavior by synchronizing notes into a local Obsidian vault, but it does not declare any explicit tool scope such as allowed-tools or permissions. That creates a capability-transparency problem: an agent or reviewer may not realize the skill can modify local files, increasing the chance of unintended data writes, overwrites, or exposure of synced note content on the host filesystem.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill documentation is entirely in Chinese and explicitly targets users of the China-specific Yinxiang service, but it does not indicate any language choice or opt-in for users who may expect another locale. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file's natural-language usage text and runtime messages are written only in Chinese, which imposes a specific language choice on users without offering an alternative or opt-in. Under the policy, forcing a language or locale without user choice is a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script prints the first 25 characters of the Evernote developer token to stdout during normal operation. Even partial credential disclosure is unnecessary for note creation and can leak sensitive material into terminal history, CI logs, chat transcripts, or monitoring systems, reducing the effort needed for token theft or correlation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring presents the script description and usage solely in Chinese, and the rest of the script continues with Chinese-only user-facing messages. This enforces a specific language for interaction without any opt-in or alternative, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The docstring and all user-facing prompts are written only in Chinese, which constitutes a language/locale constraint in the skill's natural-language interface. The file does not offer an opt-in language choice or explain that the skill is intentionally limited to a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script retrieves the full content of a specified Evernote/Yinxiang note and writes it directly to a local file on disk without any confirmation, warning, access control, or cleanup. Because notes can contain sensitive personal or business data, silent persistence increases the risk of unintended local disclosure through shared machines, backups, or other processes reading the file.

Content

No source excerpt is available for this finding.