Back to skill

Security audit

Byted Las Pdf Parse Doubao

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a real cloud PDF parsing workflow, but it automatically installs mutable remote SDK code and handles local credentials/documents in ways users should review carefully.

Review this before installing in sensitive workspaces. Only use it with documents you are willing to send to Volcengine/TOS, avoid placing executable shell content in .env/env.sh files, and prefer a version that pins and verifies the SDK wheel instead of auto-upgrading remote code during normal use.

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)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/env_init.sh:31
Finding

Unverified Remote SDK Download and Execution

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 ``` The installation is also made a mandatory initialization step by `SKILL.md:59-67`. ### Technical Analysis The initialization script retrieves a mutable remote manifest and installs a Python wheel directly from an object-storage URL. The downloaded wheel is not validated using a pinned cryptographic hash, package signature, trusted lockfile, or equivalent integrity control. HTTPS protects the package in transit but does not establish that the current remote artifact is identical to the artifact reviewed with the skill. If the storage account, publication pipeline, DNS resolution, certificate trust chain, or artifact itself is compromised, the effective code executed by the skill can change after review. The manifest's reported version determines whether installation occurs, but the wheel URL is hardcoded to version `0.2.0`. Consequently, a missing, malformed, or mismatched manifest version can trigger installation even when the manifest does not identify the exact artifact being installed. Python package installation and subsequent imports may execute package-controlled code. The inst ...[truncated 1501 chars]
Remediation
View remediation
" SDK_FILE="$(mktemp)" curl --fail --proto '=https' --tlsv1.2 --location \ --output "$SDK_FILE" "$SDK_URL" echo "${SDK_SHA256} ${SDK_FILE}" | sha256sum --check --status || { echo "SDK integrity verification failed" >&2 rm -f "$SDK_FILE" return 1 2>/dev/null || exit 1 } python -m pip install --no-deps "$SDK_FILE" rm -f "$SDK_FILE" ``` 3. Prefer a signed package repository or verify a detached artifact signature against a pinned public key. 4. Ensure the manifest identifies the exact wheel version and digest. Reject unknown or malformed manifest values instead of falling back to an installation-triggering state. 5. Do not perform automatic updates during routine skill execution. Require explicit administrator or user approval before changing executable dependencies. 6. Use a lockfile with hashes for all transitive dependencies. 7. Run dependency installation and document processing in a restricted environment with minimal filesystem access, no unnecessary credentials, and constrained outbound network access. 8. Log the resolved package version and verified digest to support incident response and reproducible audits. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/poll_background.sh:19
Finding

Arbitrary Shell Execution Through Sourced .env File

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is described as a PDF parsing tool, but its instructions include environment bootstrapping, virtualenv activation, remote update checks, and SDK installation/update from external sources. That mismatch hides meaningful execution and supply-chain behavior from users and reviewers, making it easier to smuggle risky networked code execution under an innocuous document-processing label.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is described as a PDF parsing tool, but its instructions include environment bootstrapping, virtualenv activation, remote update checks, and SDK installation/update from external sources. That mismatch hides meaningful execution and supply-chain behavior from users and reviewers, making it easier to smuggle risky networked code execution under an innocuous document-processing label.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs uploading local input files and optional result files to remote services using presigned URLs and file-upload APIs, but it does not clearly and prominently warn that document contents leave the local system. For PDFs, this can expose sensitive business, legal, medical, or personal data to third-party infrastructure without informed user consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The manifest describes a PDF parsing/OCR skill that converts PDF documents into Markdown/text with layout, table, and chart extraction. This script instead generates a Markdown report for ASR speech-recognition output, referencing audio duration, language ID, transcripts, and utterance speaker data rather than PDF parsing artifacts.

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 19)May include surrounding context.

sh
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

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
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

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes shell commands extensively (source, lasutil, jq, file operations) but does not declare any permissions or allowed-tools boundary. This weakens enforcement and review because the runtime capabilities exceed what is explicitly disclosed, increasing the chance of unintended command execution or abuse if the skill is auto-enabled.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The invocation guidance is very broad and overlaps with many generic PDF, OCR, text extraction, and digitization requests. Over-broad triggers increase the likelihood that the skill runs in contexts the user did not specifically intend, which is more dangerous here because the skill can upload documents and execute shell-based workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill tells users to place API credentials in a local env.sh file but does not warn about file permissions, accidental check-in, shell history, or leakage through workspace sharing. This creates a realistic credential exposure risk, especially in collaborative or persistent environments.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script fetches a remote manifest and then conditionally installs or upgrades an SDK from a remote wheel URL during environment initialization. This creates a supply-chain trust boundary inside a PDF-parsing skill: if the manifest source, wheel URL, or transport chain is compromised, arbitrary code can be introduced and executed under the user's environment with no integrity pinning or explicit consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

A skill advertised for PDF parsing includes package-management and remote bootstrap behavior unrelated to its core function. That expanded capability increases attack surface and makes the skill able to change its runtime dynamically, which is risky because users invoking document parsing would not reasonably expect dependency installation and remote-controlled behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script performs a remote package install/upgrade after only printing a generic update message, without requiring confirmation or clearly warning that code from a remote source will be downloaded and executed. Silent or near-silent updater behavior is dangerous because it normalizes execution of unreviewed code and can lead to compromise through dependency or hosting tampering.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The header comment says the script generates a generic 'result display markdown template' with billing disclosure, which is consistent with the surrounding PDF skill context. However, the emitted Markdown hard-codes 'ASR 识别结果' and audio/transcript-specific sections, indicating the script is for speech-recognition reporting rather than the declared PDF-processing intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This shell script hardcodes user-facing headings, errors, and billing notes in Chinese, including the generated markdown content and console error message. Because the file provides no opt-in, locale selection, or justification that the skill is strictly China-region or Chinese-only, it violates the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script sources the project .env file and exports LAS_API_KEY and LAS_REGION, which is access to sensitive credentials. Although this is visible in code comments as environment loading, there is no user-facing warning, confirmation, or disclosure that credential material will be read and used.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents pricing and usage guidance only in Chinese, which can constitute a language policy violation if users are not given an option to choose their preferred language. There is no visible indication that the skill is intentionally limited to a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script’s title/comment and user-facing output are written in Chinese, including the error message shown to users. For a general-purpose formatting check script, this imposes a specific language/locale without opt-in or documented justification, which matches the natural-language policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's human-facing title, usage description, and runtime messages are written only in Chinese, imposing a specific language on users. There is no indication that the skill is region-specific or that users can choose another language, which creates a language/locale policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The script is documented as a background polling utility for an existing task, but it sources the project .env and exports LAS_API_KEY/LAS_REGION before polling. While network polling itself is expected for this skill, reading ambient credentials from local environment files is a broader capability than the script's narrow documented purpose suggests.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The inline comment explains the extended polling interval as necessary because 'long video understanding takes longer,' which conflicts with the manifest's PDF parsing purpose and this script's LAS PDF polling behavior. This suggests copied documentation that misstates the intent of the code path.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The script writes the full polling response to last_poll.json, and later to result.json, under the output directory. These file writes may persist task data locally, but the script provides no user-facing disclosure beyond internal comments and log entries written after the fact.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.