funasr-punctuation-restore

Security checks across malware telemetry and agentic risk

Overview

The skill does restore punctuation, but it also makes broad, partly under-disclosed Python environment changes and installs unrelated audio-processing packages.

Review before installing. Use only in an isolated Python environment, expect network downloads and package changes, avoid sensitive text if local logs are unacceptable, and run directory mode only on folders you intentionally want copied and processed.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (24)

subprocess module call

Medium
Category
Dangerous Code Execution
Content
"""专门为老项目(使用 pkg_resources 的 setup.py)修复 setuptools 版本"""
    logger.info("🔧 正在修复 setuptools 版本(兼容旧 GitHub 包构建)...")
    try:
        subprocess.check_call([
            sys.executable, "-m", "pip", "install",
            "--quiet", "--force-reinstall", "setuptools<=81.2.0", "wheel"
        ])
Confidence
98% confidence
Finding
subprocess.check_call([ sys.executable, "-m", "pip", "install", "--quiet", "--force-reinstall", "setuptools<=81.2.0", "wheel" ])

subprocess module call

Medium
Category
Dangerous Code Execution
Content
cmd.extend(["-i", "https://pypi.tuna.tsinghua.edu.cn/simple"])

    try:
        subprocess.check_call(cmd)
        logger.info(f"✅ {spec} 安装/升级完成!")
        
    except subprocess.CalledProcessError as e:
Confidence
99% confidence
Finding
subprocess.check_call(cmd)

subprocess module call

Medium
Category
Dangerous Code Execution
Content
logger.warning(f"🔧 正在安装 {install_str} ...")

    try:
        subprocess.check_call([
            sys.executable, "-m", "pip", "install",
            install_str,
            "-i", "https://pypi.tuna.tsinghua.edu.cn/simple",
Confidence
96% confidence
Finding
subprocess.check_call([ sys.executable, "-m", "pip", "install", install_str, "-i", "https://pypi.tuna.tsinghua.edu.cn/simple", "--quiet"

subprocess module call

Medium
Category
Dangerous Code Execution
Content
sys.executable, "-m", "pip", "install",
                        "--upgrade", fallback_zip, "--quiet"
                    ]
                    subprocess.check_call(cmd_fallback)
                    logger.info(f"✅ 使用本地包 {fallback_zip} 安装成功!")
                    return
                except subprocess.CalledProcessError as e2:
Confidence
97% confidence
Finding
subprocess.check_call(cmd_fallback)

subprocess module call

Medium
Category
Dangerous Code Execution
Content
logger.info("虚拟环境创建成功")

        logger.info("正在升级 pip...")
        subprocess.check_call([str(venv_python), "-m", "pip", "install", "--upgrade", "pip"])

    # ==================== 检查 PyTorch GPU 是否已安装 ====================
    if Path(venv_python).exists() and is_torch_gpu_installed(venv_python):
Confidence
91% confidence
Finding
subprocess.check_call([str(venv_python), "-m", "pip", "install", "--upgrade", "pip"])

subprocess module call

Medium
Category
Dangerous Code Execution
Content
# 安装 PyTorch
        logger.info("正在安装 PyTorch(~2-3GB,请耐心等待)...")
        subprocess.check_call([
            str(venv_python), "-m", "pip", "install", "torch", "torchvision", "torchaudio",
            "--index-url", index_url
        ])
Confidence
96% confidence
Finding
subprocess.check_call([ str(venv_python), "-m", "pip", "install", "torch", "torchvision", "torchaudio", "--index-url", index_url ])

subprocess module call

Medium
Category
Dangerous Code Execution
Content
logger.info("安装 audio-separator CPU 版 + librosa...")
            subprocess.check_call([str(venv_python), "-m", "pip", "install", "audio-separator[cpu]", "librosa"])

        subprocess.check_call([str(venv_python), "-m", "pip", "install", "pydub"])
        subprocess.check_call([str(venv_python), "-m", "pip", "install", "huggingface-hub[tqdm]"])
        
        logger.info("✅ 虚拟环境及所有依赖安装完成!")
Confidence
93% confidence
Finding
subprocess.check_call([str(venv_python), "-m", "pip", "install", "pydub"])

subprocess module call

Medium
Category
Dangerous Code Execution
Content
subprocess.check_call([str(venv_python), "-m", "pip", "install", "audio-separator[cpu]", "librosa"])

        subprocess.check_call([str(venv_python), "-m", "pip", "install", "pydub"])
        subprocess.check_call([str(venv_python), "-m", "pip", "install", "huggingface-hub[tqdm]"])
        
        logger.info("✅ 虚拟环境及所有依赖安装完成!")
Confidence
94% confidence
Finding
subprocess.check_call([str(venv_python), "-m", "pip", "install", "huggingface-hub[tqdm]"])

subprocess module call

Medium
Category
Dangerous Code Execution
Content
# 安装 audio-separator + librosa(你提到的)
        if use_gpu:
            logger.info("安装 audio-separator GPU 版 + librosa...")
            subprocess.check_call([str(venv_python), "-m", "pip", "install", "audio-separator[gpu]", "librosa"])
        else:
            logger.info("安装 audio-separator CPU 版 + librosa...")
            subprocess.check_call([str(venv_python), "-m", "pip", "install", "audio-separator[cpu]", "librosa"])
Confidence
98% confidence
Finding
subprocess.check_call([str(venv_python), "-m", "pip", "install", "audio-separator[gpu]", "librosa"])

subprocess module call

Medium
Category
Dangerous Code Execution
Content
subprocess.check_call([str(venv_python), "-m", "pip", "install", "audio-separator[gpu]", "librosa"])
        else:
            logger.info("安装 audio-separator CPU 版 + librosa...")
            subprocess.check_call([str(venv_python), "-m", "pip", "install", "audio-separator[cpu]", "librosa"])

        subprocess.check_call([str(venv_python), "-m", "pip", "install", "pydub"])
        subprocess.check_call([str(venv_python), "-m", "pip", "install", "huggingface-hub[tqdm]"])
Confidence
98% confidence
Finding
subprocess.check_call([str(venv_python), "-m", "pip", "install", "audio-separator[cpu]", "librosa"])

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill declares no permissions, yet its documented behavior invokes Python, reads user-supplied files/directories, writes output files, and executes shell commands. This under-declaration is dangerous because it hides the actual trust boundary from the user and host system, making file and command execution occur without transparent consent or policy review.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill claims to only restore punctuation for text, files, or directories, but the analysis indicates substantially broader behavior: creating virtual environments, probing GPU/CUDA state, installing packages from the network, and downloading remote models and unrelated audio/model dependencies. This mismatch is risky because users may invoke a seemingly simple text-processing skill while unintentionally granting it networked code installation and expanded system inspection capabilities.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The file implements a general-purpose package installer with network and environment-modification behavior unrelated to the declared punctuation-restoration purpose. Capability mismatch is dangerous because it hides powerful behavior inside a narrowly scoped skill, making review and user consent less likely.

Context-Inappropriate Capability

High
Confidence
100% confidence
Finding
This code can install arbitrary packages from PyPI mirrors, git sources, URLs, wheels, and zip archives based on runtime input. In a punctuation skill, that is an unjustified remote code acquisition capability and creates severe supply-chain and arbitrary code execution risk if the spec is influenced by users, configs, or compromised upstream sources.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The module changes the Python environment as soon as it is imported by force-reinstalling setuptools and wheel. Import-time side effects are especially dangerous because they occur implicitly, can break other software, and can trigger network/package-management activity without any explicit action from the user.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The docstring labels the component as part of a punctuation-restoration skill while describing a generic installer utility. This misalignment obscures the true capabilities of the code, hindering review and increasing the chance that dangerous package-management behavior is accepted as part of a harmless text-processing skill.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The bootstrapper installs audio-processing packages such as audio-separator, librosa, pydub, and huggingface-hub even though the skill explicitly claims to handle only text punctuation restoration. This scope mismatch is dangerous because it broadens capabilities, increases dependency and supply-chain risk, and suggests the code may do more than users were led to expect.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The file performs broad GPU probing, CUDA parsing, and substantial package installation logic beyond the advertised text-only purpose. This overreach increases attack surface, creates privacy and integrity concerns, and makes the skill more dangerous because users would not reasonably expect hardware profiling and heavy environment mutation from punctuation restoration.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The module docstring explicitly describes hardware-specific PyTorch deployment and audio-processing dependency installation, directly contradicting the skill metadata that promises text-only punctuation restoration. This discrepancy is a security-relevant transparency issue because hidden or misrepresented capabilities undermine informed trust and can mask risky behavior.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The skill reaches out to a remote model service and writes model artifacts locally, which expands its capabilities beyond simple local punctuation restoration. Even if this is likely intended to bootstrap a required model, undeclared network access introduces supply-chain and data-governance risk because execution now depends on a remote service and downloaded content.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
Installing Python packages at runtime gives the skill code execution through package managers and external repositories, which is far more privilege than a punctuation utility should need during normal operation. This creates a significant supply-chain attack surface and can modify the host environment in unexpected ways.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The code downloads a model from a remote service during execution, which introduces external network dependency and the risk of consuming tampered or unexpected artifacts. In an agent setting, this is security-relevant because a seemingly local text-processing skill can unexpectedly access the network and persist third-party content.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The README advertises very broad natural-language triggers such as '帮我给这段文本加标点' and '把这个转录结果恢复标点' without strong boundary conditions. In agent environments that auto-route skills from user phrasing, this can cause over-triggering on unrelated requests containing similar wording, leading the agent to access files or directories and perform unintended bulk processing.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
Automatic package installation and environment modification occur during import without an explicit warning in the file description or a user-triggered action. Hidden side effects reduce informed consent and can lead to unintended network access, package changes, and unstable environments.

VirusTotal

65/65 vendors flagged this skill as clean.

View on VirusTotal