Back to skill

Security audit

有声读物生成助手

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but it can automatically install code at runtime and can send the API key and story text to an unrestricted endpoint.

Install only if you are comfortable with story text being sent to SenseAudio and with the skill using your SenseAudio API key. Do not set SENSEAUDIO_API_BASE or --api-base to an untrusted URL, and prefer installing dependencies in a controlled environment before running so the skill does not auto-install packages at invocation time.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/main.py:125
Finding

Unrestricted API endpoint override can disclose credentials and story content

Content
View full analysis
Dict[str, str]: if not self.api_key: raise APIError(missing_key_message()) return { "Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json", } def synthesize(self, *, text: str, voice_id: str, output_path: Path) -> Dict[str, Any]: validate_text(text) payload = { "model": DEFAULT_MODEL, "text": text, "stream": False, "voice_setting": { "voice_id": voice_id, "speed": DEFAULT_SPEED, "vol": DEFAULT_VOL, "pitch": DEFAULT_PITCH, }, "audio_setting": { "format": DEFAULT_OUTPUT_FORMAT, "sample_rate": DEFAULT_SAMPLE_RATE, "bitrate": DEFAULT_BITRATE, "channel": DEFAULT_CHANNEL, }, } try: response = requests.post( f"{self.api_base}{TTS_API_PATH}", headers=self.headers, json=payload, timeout=300, ) ``` The destination can also be supplied through command-line options: ```python parser.add_argument("--api-key", help="Override the SENSEAUDIO_API_KEY environment variable") parser.add_argument("--api-base", help="Override the SENSEAUDIO_API_BASE environment va ...[truncated 2528 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/main.py:30
Finding

Unpinned dependency is automatically downloaded and installed at runtime

Content
View full analysis
None: pip_name = pip_name or import_name try: importlib.import_module(import_name) return except ImportError: pass result = subprocess.run( [sys.executable, "-m", "pip", "install", pip_name], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, ) if result.returncode != 0: raise RuntimeError(result.stderr.strip()) importlib.import_module(import_name) ensure_python_package("requests") import requests ``` ### Technical Analysis The Skill automatically invokes pip whenever `requests` is unavailable. The package name has no version constraint or artifact hash, and the project contains no reviewed lockfile controlling resolution. Pip therefore obtains whichever release the active package index and resolver select at execution time. The effective dependency source can also be affected by the runtime's pip configuration, environment variables, index URL, proxy, and local package sources. This makes Skill execution non-reproducible and allows code not present during the audit to enter the runtime. Although the literal package name `requests` is not a typographical error, automatic installation without a pinned version, verified hashes, or an approved index creates a supply-chain execution path. A compromised index, malicious mirror, poisoned pip configuration, or compromised selected release could provide a malicious artifact. Source distributions may execute build logic during installation, and the code explicitly imports the installed module afterward. ### Attack Path 1. The Agent runs the Skill in an environment where `requests` is not installed. 2. The runtime's pip configuration points to, ...[truncated 1371 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented purpose focuses on story-to-audio conversion, but the observed behavior includes runtime package installation and auxiliary commands like auth-check, list-voices, and analyze. Undocumented side effects and extra execution paths reduce transparency and can be abused or misreviewed, especially because runtime installation expands the supply-chain and execution surface.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/main.py`:统一 CLI

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/main.py`:统一 CLI

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/main.py`:统一 CLI

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/main.py`:统一 CLI

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/main.py`:统一 CLI

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/main.py`:统一 CLI

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares capabilities that imply file access, shell execution, network use, and environment-variable access, but it does not constrain them with an explicit tool scope. That increases the blast radius if the skill is invoked unexpectedly or later modified, because the runtime permissions are broader than what is documented and reviewable.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The activation description and operating instructions are entirely written as Chinese-only directives, effectively constraining the skill to a specific language/locale without any opt-in choice. Under the stated policy, language constraints should either be optional for the user or explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends user-provided story text to an external TTS provider, but the description does not prominently warn users that their content leaves the local environment. This creates a privacy and data-governance risk, especially if users input unpublished manuscripts, sensitive dialogue, or regulated data assuming processing is local.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown prompt is written as a mandatory Chinese instruction set, which effectively fixes the interaction language without any user opt-in or alternative locale guidance. The policy explicitly calls out language or locale constraints as violations when the skill forces a specific language without giving the user a choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The top-level docstring describes the skill entirely in Chinese, and user-facing messages and CLI help throughout the file are also Chinese-only. This imposes a specific language/locale on users without offering a choice or documenting that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Auto-installing Python packages at runtime is risky because it expands the skill's privileges from local processing into network retrieval and code execution. For a story-to-audio skill, this behavior is not essential to core functionality and increases supply-chain and environment-tampering risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill performs package installation automatically, which triggers both network activity and subprocess execution without explicit user consent. In agent environments, hidden side effects like this are dangerous because they bypass least-privilege expectations and can expose the system to malicious packages or unintended changes.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

The skill automatically executes pip install at runtime when requests is missing. This introduces network access and arbitrary code execution through package installation without user confirmation, and if package sources or dependency resolution are compromised, untrusted code can run inside the agent environment.

Content

Scanner excerpt · scripts/main.py (reported line 38)May include surrounding context.

python
except ImportError:
        print(f"缺少 {pip_name},正在自动安装...", file=sys.stderr)

    result = subprocess.run(
        [sys.executable, "-m", "pip", "install", pip_name],
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/main.py (reported line 167)May include surrounding context.

python
},
        }
        try:
            response = requests.post(
                f"{self.api_base}{TTS_API_PATH}",
                headers=self.headers,
                json=payload,

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
79% confidence
Finding

The manifest says the skill calls SenseAudio TTS and concatenates audio, but does not mention executing local binaries. While audio conversion can be functionally related, spawning ffmpeg introduces host-level command execution capability that is broader than the stated purpose and should be explicitly justified or declared.

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

python
return None

    mp3_path = wav_path.with_suffix(".mp3")
    result = subprocess.run(
        [
            ffmpeg,
            "-y",

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description is presented in Chinese on L3 while the default prompt is in English on L4, and there is no indication that the user can choose their preferred language or locale. This creates a natural-language policy concern because the skill appears to impose language behavior without explicit opt-in or documented justification.

Content

No source excerpt is available for this finding.