Back to skill

Security audit

Byted Las Asr Pro

Security checks for vulnerabilities and agentic risk

Overview

This cloud transcription skill is mostly purpose-aligned, but it automatically installs unverified remote code and can run detached polling jobs with credential access.

Review this skill before installing. It is not clearly malicious, but install it only if you trust the Volcengine-hosted SDK URL and are comfortable with automatic dependency installation, local .env sourcing, audio/transcript upload to the provider, and detached background polling. Prefer a version that pins and verifies the SDK, parses credentials safely, keeps the venv inside the skill or project directory, and uses managed cancellable polling instead of disown.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/poll_background.sh:15
Finding

Arbitrary Shell Code Execution Through Incorrect Project Root Resolution

Content
View full analysis
, go up 3 levels) SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)" # 加载环境 if [ -f "${PROJECT_ROOT}/.env" ]; then source "${PROJECT_ROOT}/.env" export LAS_API_KEY LAS_REGION fi # 激活虚拟环境 if [ -d "${PROJECT_ROOT}/.las_venv" ]; then source "${PROJECT_ROOT}/.las_venv/bin/activate" fi ``` Related code from `scripts/env_init.sh:15-28`: ```bash SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)" # 优先复用项目根目录的虚拟环境,不存在才创建新的 if [ -d "${PROJECT_ROOT}/.las_venv" ]; then source "${PROJECT_ROOT}/.las_venv/bin/activate" elif [ ! -d ".las_venv" ]; then python3 -m venv .las_venv source .las_venv/bin/activate else source .las_venv/bin/activate fi ``` ### Technical Analysis The scripts assume the package is installed under a layout such as `project/skills//scripts`. In the audited directory layout, the scripts are located directly under `artifact/scripts`. Traversing three parent directories from that location resolves `PROJECT_ROOT` to `/tmp`, rather than to the artifact directory. Consequently, the polling script may execute `/tmp/.env`, and both scripts may execute `/tmp/.las_venv/bin/activate`. The `source` command interprets these files as shell programs rather than as passive configuration data. Any shell commands contained in them execute in the current shell with the privileges and environment of the user running the skill. Because `/tmp` is a shared, predictable location, another local user, process, or previously executed package may be able to create the ex ...[truncated 1735 chars]
Remediation
View remediation
&2 return 1 2>/dev/null || exit 1 fi ``` 3. Do not execute `.env` as shell code. Parse only explicitly allowed variable assignments such as `LAS_API_KEY` and `LAS_REGION`, rejecting command substitutions, shell operators, and unknown fields. 4. Keep the virtual environment inside the validated project directory or another private directory owned by the current user. Before activation, verify ownership and permissions with `stat`, reject symbolic links, and ensure the directory is not group- or world-writable. 5. Quote all paths and use `--` where supported to prevent option interpretation. 6. Add automated tests that execute the scripts from the repository root and from unrelated working directories, asserting that `PROJECT_ROOT` always resolves to the artifact directory and never to `/tmp`. ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/env_init.sh:32
Finding

Automatic Installation and Execution of an Unverified Remote Python Wheel

Content
View full analysis
/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' || echo "0.0.0") remote_ver=$(echo "$manifest" | jq -r '.sdk_version // "unknown"') if [ "$local_ver" = "0.0.0" ] || [ "$local_ver" != "$remote_ver" ]; then echo "📦 SDK 更新: $local_ver → $remote_ver,正在安装..." pip install --quiet --upgrade https://las-ai-cn-beijing-online.tos-cn-beijing.volces.com/operator_cards_serving/public/skills/sdk/las_sdk-0.2.0-py3-none-any.whl fi ``` ### Technical Analysis The mandatory environment initialization script retrieves a remote manifest and may automatically install a Python wheel from an external URL. The wheel is not validated against a pinned SHA-256 digest, a cryptographic signature, or a reviewed lock file. Although HTTPS provides transport protection, it does not establish that the current remote artifact is identical to the version that was reviewed. The hosted object may be replaced following storage-account compromise, credential misuse, publication error, or upstream supply-chain compromise. The remote manifest influences whether installation occurs. If manifest retrieval fails, the script substitutes `{}`, producing `remote_ver="unknown"`. Unless the local version is also reported as `unknown`, this condition causes an installation attempt. Therefore, a manifest failure does not fail closed and may unexpectedly trigger remote package installation. Installing a Python package can execute package build or installation behavior, and the installed `lasutil` code is later run with access to API keys and user data. Thi ...[truncated 1629 chars]
Remediation
View remediation
" WHEEL_PATH="$(mktemp)" curl --fail --proto '=https' --tlsv1.2 --output "$WHEEL_PATH" "$WHEEL_URL" printf '%s %s\n' "$EXPECTED_SHA256" "$WHEEL_PATH" | sha256sum --check --status || { echo "SDK integrity verification failed" >&2 rm -f "$WHEEL_PATH" return 1 2>/dev/null || exit 1 } python3 -m pip install --upgrade "$WHEEL_PATH" rm -f "$WHEEL_PATH" ``` 3. Prefer a trusted package repository with pinned versions and hash enforcement, such as: ```bash python3 -m pip install --require-hashes -r requirements.lock ``` 4. Do not make dependency updates an automatic side effect of sourcing an initialization script. Separate installation from runtime initialization and require explicit user or administrator approval for updates. 5. Fail closed when the manifest cannot be retrieved or parsed. A network or parsing failure should retain the currently installed reviewed version rather than trigger installation. 6. Cryptographically sign the manifest and package, validate both signatures, and bind the manifest's declared version and hash to the exact wheel being installed. 7. Run installation with the least privileges possible inside a project-specific virtual environment. Never install the package globally or under an elevated account. 8. Record the installed package version and verified digest in logs so operators can reproduce and audit the dependency state. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as an ASR wrapper, but its workflow also performs remote network retrieval, SDK installation/update, virtualenv setup, and version/change checks via an initialization script. This hidden behavior expands the attack surface to supply-chain compromise, unexpected code execution, and outbound network activity that a user invoking transcription would not reasonably anticipate.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script performs an automatic pip install --upgrade from a direct wheel URL during initialization, which is effectively remote code installation and execution in the user's environment. For a transcription skill, this is especially dangerous because sourcing the script is expected to prepare the environment, not to mutate it by pulling executable code from the network without verification, making supply-chain compromise or malicious replacement highly impactful.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/poll_background.sh (reported line 20)May include surrounding context.

sh
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"

# 加载环境
if [ -f "${PROJECT_ROOT}/.env" ]; then
  source "${PROJECT_ROOT}/.env"
  export LAS_API_KEY LAS_REGION
fi

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/poll_background.sh (reported line 21)May include surrounding context.

sh
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"

# 加载环境
if [ -f "${PROJECT_ROOT}/.env" ]; then
  source "${PROJECT_ROOT}/.env"
  export LAS_API_KEY LAS_REGION
fi

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill invokes shell commands extensively, including environment initialization, file inspection, uploads, and polling, but does not declare any tool scope such as allowed-tools or permissions. This creates an authorization gap: a host agent may permit execution capabilities broader than the user expects, reducing visibility and policy enforcement around dangerous shell behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest description says to use the skill when the user wants to extract spoken content from 'any audio/video media file' and lists many broad scenarios. This lacks clear trigger boundaries or exclusion conditions, increasing the chance of unintended invocation for generic media-related requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instructional content is presented entirely in Chinese while directing agent behavior, and there is no statement that users may choose another language. This can violate language or locale policy when the skill is used in multilingual contexts without explicit opt-in.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
94% confidence
Finding

The workflow explicitly backgrounds a polling script and disowns it, allowing execution to persist beyond the interactive session. Detached background jobs can continue network access, file processing, and data extraction without active user oversight, making containment, auditing, and cancellation harder—especially for a skill handling potentially sensitive audio transcripts.

Content

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

使用优化的后台轮询脚本(动态间隔 + 自动提取结果):

bash
mkdir -p "./output/{task_id}"
./scripts/poll_background.sh {task_id} "./output/{task_id}" & disown

脚本特性:

  • 动态间隔:前 5 次 30s,5-10 次 60s,10 次后 120s,减少不必要轮询

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The environment initialization script silently fetches a remote manifest and uses it to drive SDK update behavior, which extends far beyond simple local setup for an ASR skill. Even though the manifest itself is JSON, this creates a trust-on-first-use supply-chain path where remote state can alter local execution and dependency decisions without integrity verification or explicit user approval.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script downloads remote content and then conditionally installs a package from a network URL with only routine status output, giving users little indication that code from outside the local project may be introduced. This lack of transparency increases the risk of unnoticed supply-chain abuse, particularly because users are instructed to source the script, which runs in their current shell context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script embeds the first 500 bytes of transcript content directly into generated Markdown, which can surface sensitive speech-derived data such as personal information, meeting content, or credentials into logs, reports, or downstream interfaces without any explicit consent or warning. In an ASR skill, transcripts are often highly sensitive, so automatic preview generation increases the risk of unintended disclosure beyond the original processing context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This shell script contains user-facing natural-language text in Chinese, beginning with the file header and later error messages, but does not provide any user opt-in or alternative locale handling. Under the policy criteria, forcing a specific language without user 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
98% confidence
Finding

The script prints a Chinese-only error message when no task ID is supplied. Because this is direct user-facing output and no language preference or documented regional constraint is present, it violates the language/locale policy requirement.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file’s own documentation frames it as a background polling script that checks task status and extracts results. Instead of only consuming an existing authenticated context, it sources a project-root .env and exports LAS_API_KEY/LAS_REGION, which introduces credential access behavior beyond simple polling orchestration.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The natural-language examples and required outputs are entirely specified in Chinese, which can imply a fixed language requirement for the skill's interaction pattern. There is no indication that users may choose another language or that the locale constraint is intentionally limited to a Chinese-only context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script's comments and user-facing messages are written in Chinese only, including the usage error and warning text. This creates a language/locale policy issue because the skill enforces a specific language without any opt-in, fallback, or documented justification for being Chinese-only.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

Comments and runtime messages are presented only in Chinese, including usage, errors, update notices, and completion output. Under the policy, a skill should not impose a language or locale without user opt-in unless the constraint is explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

Multiple comments, error messages, headings, and output strings are presented only in Chinese, including the generated markdown content. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not documented here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The manifest describes an ASR transcription capability, and this file is documented as a background polling utility. Sourcing and activating a virtual environment alters the execution environment and broadens the script’s operational scope beyond merely polling LAS and extracting transcription outputs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.