T09 · Insecure Skill Coding Practices
- Location
scripts/list_tags.py:34- Finding
Developer Token Prefix Disclosed Through Standard Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
scripts/list_tags.py:34Developer Token Prefix Disclosed Through Standard Output
scripts/list_tags.py:25Developer Token Can Be Transmitted to an Unrestricted Configured Endpoint
scripts/get_note_enml.py:12Undocumented Hard-Coded Note Exporter Writes Raw Content to Plaintext
scripts/empty_trash.py:69Permanent Trash Deletion Can Bypass the CLI Confirmation Prompt
scripts/sync_to_obsidian.py:509Unsanitized Note HTML Is Persisted as Renderable Web-Clip Content
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.
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
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.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_config():
"""从 .env 文件加载配置"""
script_dir = os.path.dirname(__file__)
skill_dir = os.path.dirname(script_dir)
skills_dir = os.path.dirname(skill_dir)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_config():
"""从 .env 文件加载配置"""
script_dir = os.path.dirname(__file__)
skill_dir = os.path.dirname(script_dir)
skills_dir = os.path.dirname(skill_dir)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_config():
"""从 .env 文件加载配置"""
script_dir = os.path.dirname(__file__)
skill_dir = os.path.dirname(script_dir)
skills_dir = os.path.dirname(skill_dir)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_config():
"""从 .env 文件加载配置"""
script_dir = os.path.dirname(__file__)
skill_dir = os.path.dirname(script_dir)
skills_dir = os.path.dirname(skill_dir)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_config():
"""从 .env 文件加载配置"""
script_dir = os.path.dirname(__file__)
skill_dir = os.path.dirname(script_dir)
skills_dir = os.path.dirname(skill_dir)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_config():
"""从 .env 文件加载配置"""
script_dir = os.path.dirname(__file__)
skill_dir = os.path.dirname(script_dir)
skills_dir = os.path.dirname(skill_dir)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_config():
"""从 .env 文件加载配置"""
script_dir = os.path.dirname(__file__)
skill_dir = os.path.dirname(script_dir)
skills_dir = os.path.dirname(skill_dir)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def load_config():
"""从 .env 文件加载配置"""
script_dir = os.path.dirname(__file__)
skill_dir = os.path.dirname(script_dir)
skills_dir = os.path.dirname(skill_dir)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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
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.
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}")
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.
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.
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.
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.
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.
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.
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.
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.