Back to skill

Security audit

Local fun-asr-nano powered by sherpa-onnx

Security checks for vulnerabilities and agentic risk

Overview

The skill is for local audio transcription, but it advertises fully offline use while the code downloads an unpinned model at runtime.

Review this before installing in private or restricted environments. Only use it if you are comfortable with unpinned Python packages and a ModelScope model download, or prefetch and verify the model yourself and run it with network access disabled afterward.

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/cli.py:117
Finding

Unpinned Dependencies and Mutable Remote Model Supply Chain

Content
View full analysis

Vulnerability Details

File Location: scripts/cli.py:117-118
Vulnerability Type: Unpinned remote model dependency
Risk Level: Medium

Vulnerable Code

python
model_dir = snapshot_download("pengzhendong/Fun-ASR-Nano-int8")
return sherpa_onnx.OfflineRecognizer.from_funasr_nano(

The associated installation instructions at SKILL.md:43 also install unpinned Python dependencies:

bash
pip install sherpa-onnx soundfile modelscope

Technical Analysis

The Skill retrieves pengzhendong/Fun-ASR-Nano-int8 from ModelScope without specifying an immutable revision or validating expected artifact hashes. The effective model contents can therefore change after the Skill has been reviewed. The documented Python dependencies are similarly installed without pinned versions or hashes, leaving package selection dependent on mutable package-index state.

This creates a third-party supply-chain trust boundary. Compromise of a dependency release, package source, ModelScope account, model repository, or mutable model revision could cause users to retrieve modified components. Malicious Python packages can execute code during installation or import. Crafted model artifacts may also exploit vulnerabilities in native model parsers or runtimes when loaded.

The automatic download additionally conflicts with the documentation's claim that the Skill operates completely offline and requires no network connection. No evidence was found that the code uploads audio, credentials, or environment data.

Attack Path

  1. An attacker compromises a listed package distribution channel, the ModelScope publisher account, or the mutable model repository.
  2. The attacker publishes a malicious package release or replaces model artifacts referenced by the unpinned repository identifier.
  3. A user follows the installation instructions or runs the CLI in an environment where the model is not already cached.
  4. The environment ...[truncated 831 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin all direct and transitive Python dependencies to reviewed versions in a lock file.
  2. Require cryptographic hashes for downloaded Python distributions, such as with pip --require-hashes.
  3. Pin the ModelScope model to a reviewed immutable revision rather than resolving the repository's current state.
  4. Maintain and verify expected SHA-256 hashes for every model, tokenizer, and ONNX artifact before loading it.
  5. Replace automatic model retrieval with an explicit installation step, or require a local model-directory argument at runtime.
  6. Store reviewed artifacts in a controlled registry or mirror with provenance and access controls.
  7. Run installation and inference under a dedicated, unprivileged account or sandbox with minimal filesystem and network access.
  8. Update the documentation to disclose that initial setup requires network access, while clearly documenting how to operate in a strictly offline mode afterward.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill claims to be 'fully offline' and 'no network required', but its documented dependency on ModelScope strongly suggests model artifacts may be fetched from an external repository unless they are fully pre-bundled. This mismatch is dangerous because users or orchestrators may grant it trust, privacy assumptions, or deployment approval based on offline-only behavior, while actual execution may trigger undeclared outbound network access and external supply-chain exposure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill description promises fully offline local ASR, but create_recognizer() fetches model artifacts from a remote repository at runtime via snapshot_download(). This creates a supply-chain and privacy boundary violation: using the skill can trigger unexpected network access, download unpinned artifacts, and process transcription workflows in a way inconsistent with the advertised offline trust model.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Triggering on essentially any user-sent audio file is overly broad and can cause the skill to activate when transcription was not requested. In an agent environment, broad activation increases the chance of unintended processing of sensitive audio, unnecessary resource consumption, or misrouting tasks to a capability the user did not explicitly invoke.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The invocation description says audio-file processing is a trigger condition but does not define scope, boundaries, or exclusions. That ambiguity can lead to automatic handling of arbitrary audio content, including sensitive or irrelevant files, which increases privacy risk and makes the skill easier to misuse in multi-skill agent workflows.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Importing and using modelscope snapshot_download for a skill whose stated purpose is offline transcription introduces unjustified network dependency and remote artifact trust. Even if audio is processed locally after download, the hidden fetch expands attack surface and can violate user expectations in restricted or sensitive environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The CLI sets a Chinese default user prompt string ("语音转写:") that biases transcription behavior toward a specific language/locale context. The file does provide a separate --language option, but it does not clearly obtain user opt-in before imposing this locale-specific default.

Content

No source excerpt is available for this finding.