Back to skill

Security audit

ts-prompt-optimizer

Security checks for vulnerabilities and agentic risk

Overview

This prompt-optimization skill is mostly purpose-aligned, but its setup and diagnostics can persist or reveal API keys and store prompt history without enough protection or disclosure.

Review before installing. Do not run the setup wizard with real API keys unless you are comfortable with keys being written to local config or shell profile files. Avoid using show/get diagnostics with live credentials, and do not submit sensitive prompts unless you have disabled or cleaned the memory/history files. Rotate any keys that were already processed by this skill.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/config_wizard.py:289
Finding

Shell Profile Command Injection Through Unescaped Environment Variable Persistence

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/quick_setup.py:16
Finding

API Keys Are Persisted in Plaintext Configuration Files

Content
View full analysis
bool: try: if format == "yaml": with ope ...[truncated 2023 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/config_manager.py:137
Finding

Configuration CLI Prints Resolved API Credentials to Standard Output

Content
View full analysis
Dict: resolved = config.copy() if "models" in resolved: for model_name, model_config in resolved["models"].items(): if "api_key_env" in model_config: env_var = model_config["api_key_env"] api_key = os.getenv(env_var) if api_key: model_config["api_key"] = api_key model_config["api_key_source"] = "env" elif "api_key" not in model_config: model_config["api_key"] = None model_config["api_key_source"] = "missing" return resolved ``` The CLI then prints that object without redaction: ```python elif command == "show": config = config_manager.load_config() print("[FILE] [EMOJI:5B8C][EMOJI:6574][EMOJI:914D][EMOJI:7F6E]:") print(json.dumps(config, ensure_ascii=False, indent=2)) ``` ```python elif command == "get" and len(sys.argv) > 2: model_name = sys.argv[2] config = config_manager.get_model_config(model_name) if config: print(f"[LIST] {model_name} [EMOJI:914D][EMOJI:7F6E]:") print(json.dumps(config, ensure_ascii=False, indent=2)) ``` The wrapper CLI repeats the issue: ```python elif args.command == "show": from config_manager import TSConfigManager import json config_manager = TSConfigManager() config = config_manager.load_config() print(json.dumps(config, ensure_ascii=False, indent=2)) elif args.command == "get": from config_manager import TSConfigManager import json config_manager = ...[truncated 1486 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/optimizer.py:367
Finding

Unfiltered User Prompts and Feedback Are Retained Indefinitely

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:571
Finding

Unpinned Third-Party Package Installation Instructions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (73)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation describes API keys, model routing, and external model usage, but it does not clearly warn that user prompts, context, and possibly conversation history may be transmitted to third-party services. In this skill's context, that omission is more dangerous because the optimizer is explicitly context-aware and personalized, increasing the chance that sensitive or identifying data will be sent off-device without informed user consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill presents itself as a ts:-triggered optimizer, yet much of the documented functionality is actually a configuration wizard, connectivity tester, and model configuration inspection CLI. This mismatch undermines informed consent and can cause users to run setup and diagnostic operations with broader access than expected.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill presents itself as a ts:-triggered optimizer, yet much of the documented functionality is actually a configuration wizard, connectivity tester, and model configuration inspection CLI. This mismatch undermines informed consent and can cause users to run setup and diagnostic operations with broader access than expected.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill presents itself as a ts:-triggered optimizer, yet much of the documented functionality is actually a configuration wizard, connectivity tester, and model configuration inspection CLI. This mismatch undermines informed consent and can cause users to run setup and diagnostic operations with broader access than expected.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill presents itself as a ts:-triggered optimizer, yet much of the documented functionality is actually a configuration wizard, connectivity tester, and model configuration inspection CLI. This mismatch undermines informed consent and can cause users to run setup and diagnostic operations with broader access than expected.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The CLI show and get commands print resolved model configuration directly as JSON, and the resolved config can include live api_key values loaded from environment variables. This creates a straightforward secret disclosure path to terminal output, logs, screenshots, shell history tooling, or calling processes, which is especially dangerous because the file already enriches config objects with credentials.

Content

No source excerpt is available for this finding.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.

Content

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

python
def clear_screen(self):
        """[EMOJI:6E05][EMOJI:5C4F][EMOJI:FF08][EMOJI:8DE8][EMOJI:5E73][EMOJI:53F0][EMOJI:FF09]"""
        os.system('cls' if os.name == 'nt' else 'clear')
    
    def print_header(self, title: str):
        """[EMOJI:6253][EMOJI:5370][EMOJI:6807][EMOJI:9898]"""

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill presents itself as a prompt optimizer, but this file persistently modifies user shell startup files and installs API secrets into them. That creates a lasting side effect outside the expected scope of the skill and stores sensitive credentials in places that may be broadly readable, backed up, or later exposed through logs, dotfile sync, or local compromise.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The helper writes API credentials directly into .bashrc/.zshrc/.profile, which is a persistence mechanism not justified by a prompt-optimization feature. Plaintext secrets in shell profiles can be leaked via backups, source-control mistakes, workstation sharing, endpoint monitoring, or any later process that reads those files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The entire publish checklist, form content, example descriptions, and user-facing instructions are written in Chinese, including recommended marketplace descriptions and usage examples. Because the file does not indicate that the skill is region-specific or provide an opt-in language choice, it presents a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description advertises multi-model routing and multiple AI providers but does not clearly warn users that their prompts, and potentially attached context, may be sent to third-party APIs. This creates a meaningful transparency and privacy risk because users may disclose sensitive business, personal, or proprietary information without understanding the external data flow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill claims it will automatically supplement prompts using conversation history and known user preferences, but it does not provide a clear warning that such contextual data may be incorporated and possibly forwarded onward to external models. This increases the risk of unintended disclosure of sensitive prior chat content, profile data, or inferred personal information beyond the user's immediate request.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The marketing description advertises '智能前缀触发' but does not state concrete constraints for when the skill should activate. Because this is a prompt-manipulation skill, under-specified triggering increases the risk of accidental execution and unintended rewriting of prompts, making the skill more dangerous than a passive informational tool.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented trigger phrases (ts:, ts-opt:, 优化:) are described broadly without clear start-of-input, token-boundary, or exclusion rules. In a prompt-optimizer skill, ambiguous activation can cause unintended invocation on normal user text, which may alter user intent, interfere with other skills, or create prompt-routing confusion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The release notes state that the skill stores personalized learning history and user preferences, but they do not disclose retention limits, sensitivity of stored content, access controls, or how users can review/delete that data. For a prompt-optimization skill that processes user tasks and conversation context, this can lead users to unknowingly persist sensitive prompts, creating privacy and compliance risk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises capabilities that imply environment access, local file read/write, and shell execution, but it does not declare any explicit tool scope or permissions. This creates a governance gap where reviewers and users cannot accurately assess what the skill may access or modify, increasing the chance of over-privileged execution and unintended system changes.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly normalizes collecting and reusing user history, preferences, and learning data over time. This is dangerous because it encourages long-term storage of natural-language interactions that may contain credentials, personal data, or sensitive project context, expanding breach and cross-session disclosure risk.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Automatically combining conversation history and owner preferences into new prompt optimizations can leak prior sensitive information into later outputs or external model requests. In a prompt-optimization skill, this context mixing is especially risky because users may assume each optimization only uses the current request.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Defining dedicated memory files for optimization history and user preferences establishes persistent local stores of potentially sensitive behavioral and prompt data. If those files are accessed by other local users, backups, or tools, they can expose confidential information beyond the original optimization session.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The learning mechanism instructs the system to record every optimization and store feedback, success cases, and failures, creating broad ongoing accumulation of user-provided data. Such blanket retention increases the blast radius of any compromise and raises the likelihood of sensitive information being reused or exposed later.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill states that optimization history and knowledge updates are recorded automatically, but it does not warn users that their prompts and feedback may be stored persistently. Because prompts often include confidential business, code, or personal data, silent retention creates a meaningful privacy and data leakage risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The installation text says setup will automatically set environment variables, but it does not warn that credentials or shell configuration files may be created or modified. This can leave secrets persisted on disk unexpectedly and alter the user's shell environment in ways that are hard to audit or undo.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JSON file contains multiple natural-language values entirely in Chinese, including role labels, formatting expectations, and tone/style preferences. Because the configuration does not indicate that Chinese is optional or restricted to a justified locale-specific context, it appears to impose a language preference without user opt-in, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The task routing thresholds and model capability descriptors are written exclusively in Chinese, and one capability explicitly specifies Chinese writing. This imposes a language/locale assumption in natural-language configuration without offering user opt-in or documenting that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The configuration enables automatic prefix detection and multiple trigger prefixes without any visible scoping, authorization, or context restrictions. In an agent skill, ambiguous activation can cause the optimizer to process unintended user input or be invoked in contexts the user did not clearly intend, which can widen prompt-injection and misrouting exposure.

Content

No source excerpt is available for this finding.