Back to skill

Security audit

Termaid

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Termaid integration with disclosed local installation steps and no evidence of hidden execution, exfiltration, or destructive behavior.

Install in a virtual environment or other low-privilege context, avoid running the installer with sudo, and review or back up any existing `~/.termaid` files before running it. For stronger supply-chain hygiene, pin and verify the Termaid package version instead of using the latest package-index resolution.

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
install.sh:32
Finding

Unpinned Third-Party Package Installation

Content
View full analysis

Vulnerability Details

File Location: install.sh:32-34
Vulnerability Type: Unpinned and unverified third-party dependency installation
Risk Level: Medium

bash
# Install Termaid
echo "📦 Installing Termaid..."
pip install termaid

The equivalent installation commands are also recommended in README.md and SKILL.md, including pip install termaid, optional dependency extras, and execution through uvx.

Technical Analysis

The installation script retrieves termaid from the package index without specifying an audited version or verifying package hashes. Consequently, the installed code is mutable and may differ between executions of the same script.

No lockfile, hash-locked requirements file, package signature validation, or vendored source is present in the reviewed project. The package and its transitive dependencies are therefore trusted based solely on package-index resolution at installation time. Package installation can execute build-system code, while subsequent import and CLI operations execute the downloaded package with the privileges of the invoking user.

This is a supply-chain weakness rather than evidence that the current termaid package is malicious. Exploitation requires compromise of the upstream package, one of its dependencies, the package-distribution account, or the dependency-resolution channel.

Attack Path

  1. An attacker compromises the upstream package publisher, a transitive dependency, or the relevant package-index distribution path.
  2. The attacker publishes a malicious release that satisfies the unrestricted termaid requirement.
  3. A user runs install.sh, causing pip install termaid to resolve and download the attacker-controlled release.
  4. Malicious code executes during package build or installation, during the script's subsequent import termaid verification, or when the user invokes the installed termaid command.
  5. The payload operates with t ...[truncated 764 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin termaid to a specifically reviewed version rather than resolving the latest release:
    bash
    python3 -m pip install "termaid==<reviewed-version>"
    
  2. Generate and maintain a hash-locked requirements file covering the complete transitive dependency graph:
    text
    termaid==<reviewed-version> \
        --hash=sha256:<verified-package-hash>
    
    Install it with:
    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Review dependency updates before changing the pinned version, including package ownership, release provenance, source changes, and transitive dependency changes.
  4. Replace unversioned uvx termaid documentation with an explicitly pinned invocation, or remove that recommendation where package integrity cannot be verified.
  5. Use python3 -m pip instead of a standalone pip command to ensure installation targets the same Python interpreter used for the import verification.
  6. Run installation in an isolated virtual environment with least privilege. Explicitly warn users not to execute the installer as root or through sudo.
  7. Where supported by the distribution workflow, verify signed release artifacts or install from a reviewed source commit identified by an immutable tag or commit digest.
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (6)

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The documentation recommends executing uvx termaid without pinning a specific version. This creates a supply-chain risk because users may fetch and run whatever version is current at execution time, including a compromised or breaking release. In this skill context, the command is presented as a convenient no-install trial path, which makes copy-paste execution more likely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This shell script presents user-facing messages and generates documentation content entirely in Chinese, starting with the header comments and continuing throughout the script. Under the policy, forcing a specific language without offering a language or locale choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The shell script's comments, status messages, generated documentation, and example outputs are all written in Chinese, which imposes a specific language on users. Under the policy, locale-specific behavior should either be optional or clearly justified as region-specific; neither is present here.

Content

No source excerpt is available for this finding.

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 · install.sh (reported line 46)May include surrounding context.

sh
# 创建示例目录
echo "📁 创建示例目录..."
mkdir -p ~/.termaid/examples

# 创建基本示例
cat > ~/.termaid/examples/basic.mmd << 'EOF'

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The troubleshooting section tells users to set LANG=en_US.UTF-8 and LC_ALL=en_US.UTF-8, which imposes a specific U.S. English locale rather than a generic UTF-8-capable locale. This is a natural-language locale policy issue because the documentation does not offer user choice or justify why that exact locale is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The troubleshooting section instructs users to export LANG=en_US.UTF-8 and LC_ALL=en_US.UTF-8, which imposes a specific language/locale configuration. This is a natural-language locale policy concern because it does not present this as one option among several or explain why this exact locale is required instead of generic UTF-8 support.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.