Back to skill

Security audit

elsewhere-companion

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its travel-companion purpose, but its setup and image-handling paths create real risks of unintended code execution or local image disclosure.

Review before installing. The skill should replace the python -c onboarding snippet with a dedicated JSON-writing script or stdin-based workflow, restrict reference images to a fixed approved directory before sending them to Gemini, add a pinned dependency manifest, and make the Gemini/photo-sharing and loop persistence behavior explicit to users.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:46
Finding

User-Controlled Python Code Injection in Persona Creation Workflow

Content
View full analysis
', 'relation': '', 'personality': '', 'tone_of_voice': '', }, 'appearance': { 'description': '', 'reference_image_path': './assets/personas/persona_ref.png', }, } with open('data/persona.json', 'w', encoding='utf-8') as f: json.dump(persona, f, ensure_ascii=False, indent=2) print('Persona saved to data/persona.json') " ``` ### Technical Analysis The documented onboarding workflow instructs the agent to insert user-provided values directly into quoted Python source code passed to `python -c`. The fields `name`, `relation`, `personality`, `toneOfVoice`, and `appearance` are not encoded or escaped as Python string literals. A malicious value containing a quote and valid Python syntax can terminate the intended string literal and inject an expression or statement into the generated program. Shell metacharacters may introduce an additional parsing risk because the complete program is also enclosed in a shell double-quoted argument, but Python-level injection alone is sufficient to make the workflow unsafe. This vulnerability arises from generating executable source code using untrusted data rather than passing user values through a structured data channel. ### Attack Path 1. The onboarding workflow asks a user for persona information. 2. An attacker supplies a persona field containing a closing quote followed by malicious Python syntax. 3. The agent substitutes that value into the documented `python -c` command. 4. The command is executed to create `data/persona.json`. 5. The injected Python executes with the same operating-system pri ...[truncated 782 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_post.py:143
Finding

Unrestricted Reference Image Path Can Disclose Local Files to Gemini

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:17
Finding

Missing and Unpinned Dependency Manifest Creates Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared purpose presents a benign postcard-style companion experience, but the documented behavior includes local persistence, shell execution, cron-like looping, and itinerary generation workflows that are materially different and more operationally capable. This mismatch can mislead users and reviewers about what the skill actually does, weakening informed consent and increasing the chance that risky actions are approved under false expectations.

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/generate_itinerary.py (reported line 26)May include surrounding context.

python
SKILL_DIR_STR = str(SKILL_DIR)
DATA_DIR = PROJECT_ROOT / "data"

load_dotenv(PROJECT_ROOT / ".env")
os.environ["SKILL_DIR"] = SKILL_DIR_STR

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/generate_post.py (reported line 27)May include surrounding context.

python
SKILL_DIR_STR = str(SKILL_DIR)
DATA_DIR = PROJECT_ROOT / "data"

load_dotenv(PROJECT_ROOT / ".env")
os.environ["SKILL_DIR"] = SKILL_DIR_STR

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the agent to use shell execution, environment variables, and file read/write operations, but it declares no explicit tool scope or permissions. This creates an authorization and transparency gap: an agent may execute privileged actions such as writing user-provided data to disk or invoking Python scripts without prior limitation or user-visible consent boundaries.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation phrases are broad and include generic travel-related terms, which can cause the skill to trigger outside narrowly intended contexts. Overbroad invocation increases the likelihood that users are routed into workflows involving data collection, file writes, and script execution without clearly intending to use this specific skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The onboarding flow collects personal profile attributes and a reference photo, then stores them in local files, but the skill description does not clearly disclose this persistence. Undisclosed collection and storage of personal data and images creates privacy risk, especially because the data may remain on disk and be reused by later scripts or other processes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring presents the tool description, usage, and output notes only in Chinese, and later logic also defaults to a China-specific origin city. Under the policy for natural-language violations, forcing a specific language without user opt-in is in scope even in code files via docstrings and user-facing text.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This Python file contains natural-language documentation in Chinese and describes the tool as generating content in that language context, while the prompting logic provides no user language selection or opt-in mechanism. Under the policy, forcing a specific language or locale without explicit choice 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
92% confidence
Finding

The natural-language documentation is entirely in Chinese and explicitly states that the tool outputs rendered Markdown, with no indication that other languages are supported or selectable. Under the policy rules, forcing a specific language without offering user choice is a locale/language policy concern.

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 is entirely in Chinese and describes the skill's behavior and usage only in Chinese, indicating a fixed language assumption. Under the policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/run_cron.py (reported line 106)May include surrounding context.

python
"""调用 generate_post.py 生成内容,再调用 render_output.py 渲染模板。"""
    node_id = node["node_id"]

    result = subprocess.run(
        [sys.executable, str(SCRIPT_DIR / "generate_post.py"), node_id],
        capture_output=True,
        text=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/run_cron.py (reported line 146)May include surrounding context.

python
}

    context_json = json.dumps(context, ensure_ascii=False)
    result = subprocess.run(
        [sys.executable, str(SCRIPT_DIR / "render_output.py"), "--context", context_json],
        capture_output=True,
        text=True,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The template contains fixed Chinese text ('到了!!'), which implies the skill outputs content in a specific language without any visible user opt-in or documented locale restriction. This can violate language/locale policy when users have not chosen Chinese or when the skill is expected to adapt to user language preferences.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This template forces a specific language/locale in its natural-language content without indicating that the user can choose another language. That matches the policy-violation category for language or locale constraints lacking user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This markdown template is entirely written in Chinese and provides no indication that language selection is optional or user-configurable. That creates a natural-language policy concern because the skill appears to enforce a specific language/locale without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The template header uses fixed Chinese text ('回到'), which imposes a specific language on generated output. For a generic skill template, this is a natural-language locale policy issue unless the skill explicitly limits itself to Chinese users or offers language selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The template hard-codes Chinese text ("在...上") in its output format, which imposes a specific language regardless of user preference. This is a natural-language policy issue because the file does not offer any user opt-in or indicate that the skill is intentionally limited to a Chinese-language or region-specific context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown template uses Chinese text for its user-facing output, such as the departure announcement on L3, with no indication that the user can opt into another language. That can violate a language/locale policy requiring user choice unless the skill is explicitly documented as Chinese-only or region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown template is entirely written in Chinese and provides no indication that the user can choose another language or that the template is intended only for a Chinese-language or region-specific context. That creates a natural-language locale policy issue because the skill appears to enforce a specific language by default.

Content

No source excerpt is available for this finding.