Back to skill

Security audit

bailian-tts

Security checks for vulnerabilities and agentic risk

Overview

This TTS skill is coherent, but it can automatically install an unpinned global npm package, which users should review before running.

Review the npm dependency before running the smoke test. Prefer installing a pinned, reviewed version locally or in an isolated environment, and only provide BAILIAN_API_KEY and text you are comfortable sending to Aliyun Bailian for speech synthesis.

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

T08 · Insecure Dependencies

Warning
Location
scripts/quick-test.sh:19
Finding

Automatic Installation and Execution of an Unpinned Global npm Package

Content
View full analysis
/dev/null 2>&1; then npm i -g @hackerpl/bailian-cli fi ``` From `SKILL.md:14-24`: ```bash npm ls -g --depth=0 @hackerpl/bailian-cli ``` ```bash npm i -g @hackerpl/bailian-cli ``` ### Technical Analysis The smoke-test script automatically installs `@hackerpl/bailian-cli` from the npm registry when the package is not already available. No exact version, package integrity hash, lockfile, provenance requirement, or reviewed artifact is specified. As a result, the code installed and subsequently executed can change without any modification to this project. npm installation may execute package lifecycle scripts, and the installed `bailian` command later runs with the invoking user's permissions and environment. Global installation also places the package outside an isolated project dependency tree, increasing its reach and making reproducible review more difficult. The project does not contain evidence that the named package is currently malicious. The risk arises from trusting an unpinned external package and automatically installing it before execution. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution process, or a future package release. 2. The attacker publishes a modified version of `@hackerpl/bailian-cli` containing a malicious lifecycle script or CLI payload. 3. A user runs `scripts/quick-test.sh` on a system where the package is not globally installed. 4. The script executes `npm i -g @hackerpl/bailian-cli` and retrieves the current uncontrolled package version. 5. Malicious lifecycle code may execute during installation, or malicious code executes when the script ...[truncated 893 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

[ -n "$BAILIAN_API_KEY" ] && echo SET || echo MISSING

text

If missing, ask user to create and configure key from the 阿里云百炼官方入口(控制台/平台):

- https://bailian.console.aliyun.com/

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

[ -n "$BAILIAN_API_KEY" ] && echo SET || echo MISSING

text

If missing, ask user to create and configure key from the 阿里云百炼官方入口(控制台/平台):

- https://bailian.console.aliyun.com/

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script sets LANG to Chinese by default, which encodes a specific language/locale choice in the skill behavior. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the constraint is clearly justified or the user is explicitly offered a choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script automatically installs a global npm package when it is missing, without user confirmation, version pinning, or integrity verification. This creates a supply-chain risk: a compromised or typosquatted package, or an unexpected newer version, would be executed with the user's privileges and persist globally on the system.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file is generally in English, but the available voices are annotated with Chinese gender markers '女' and '男'. That imposes a language-specific convention in the user-facing documentation without opt-in or explanation, which can conflict with language/locale policy expectations.

Content

No source excerpt is available for this finding.