Back to skill

Security audit

DPP Pipeline

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a real product-placement video pipeline, but it needs review because it sends local media and credentials to configurable network endpoints and stores sensitive API data in local logs.

Review this before installing. Use only trusted Ark/TOS endpoints, keep credentials narrowly scoped, avoid sensitive unreleasable media, run it in an isolated workspace, and do not share the generated log directory without checking it for prompts, media URLs, and task metadata.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
runtime/src/dpp_storyboard/composition_service.py:158
Finding

Unrestricted Download of a Remotely Supplied Generated-Asset URL

Content
View full analysis
Path: output_path.parent.mkdir(parents=True, exist_ok=True) with urllib.request.urlopen(url, timeout=120) as response, output_path.open("wb") as destination: shutil.copyfileobj(response, destination) return output_path ``` ```python def _download_generated_video( self, *, video_url: str | None, target_dir: Path, task_id: str, ) -> str | None: if not video_url: return None suffix = Path(urlparse(video_url).path).suffix or ".mp4" output_path = target_dir / "generated" / f"{task_id}{suffix}" try: downloaded = self._downloader.download_video(url=video_url, output_path=output_path) except Exception as exc: logger.warning("Failed to download generated video for task %s: %s", task_id, exc) return None return str(downloaded.resolve()) ``` ### Technical Analysis The downloader consumes `video_url` from a remote Ark task response and passes it directly to `urllib.request.urlopen`. It does not validate: - The URL scheme. - The destination hostname. - The resolved IP address. - Redirect destinations. - Whether the destination is loopback, link-local, private, multicast, or reserved. - The response content type. - The response body size. Consequently, a compromised or attacker-controlled Ark-compatible service can return a URL targeting an internal network service, loopback interface, cloud metadata endpoint, or another sensitive destination accessible from the machine running the Skill. Since `urllib` supports redirects, validating only the initial URL would also be insufficient. The use of `shutil.copyfileobj` w ...[truncated 1269 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
runtime/src/dpp_storyboard/config.py:49
Finding

Credentials and User Media Can Be Transmitted to Arbitrary Configured Endpoints

Content
View full analysis
Any: try: logger.info("Uploading file to Ark: %s", file_path.name) uploaded = self._client.files.create( file=file_path, purpose=self._settings.file_purpose, ) ``` ```python return TosClientV2( ak=config.access_key, sk=config.secret_key, endpoint=config.endpoint, region=config.region, request_timeout=config.timeout_seconds, connection_time=config.connect_timeout_seconds, enable_verify_ssl=config.enable_https, is_custom_domain=config.force_endpoint, ) ``` ```python config = self._build_tos_config() object_key = build_object_key(config.object_prefix, path.name) logger.info ...[truncated 2363 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
runtime/src/dpp_storyboard/ark_client.py:465
Finding

Complete Ark Request and Response Payloads Are Persisted in Plaintext Logs

Content
View full analysis
Path: """配置 Responses API 入参与出参的文件日志。""" resolved_log_dir = Path(log_dir).expanduser().resolve() resolved_log_dir.mkdir(parents=True, exist_ok=True) log_path = resolved_log_dir / "ark_responses.log" responses_logger.handlers.clear() file_handler = logging.FileHandler(log_path, encoding="utf-8") file_handler.setFormatter(logging.Formatter("%(asctime)s %(message)s")) responses_logger.addHandler(file_handler) responses_logger.setLevel(logging.INFO) responses_logger.propagate = False return log_path ``` ```python self._log_api_event( phase="request", operation=operation, endpoint="/responses", payload=request_payload, request_run_id=request_run_id, ) ``` ```python self._log_api_event( phase="response", operation=operation, endpoint="/responses", payload=response, request_run_id=request_run_id, ) ``` ```python @staticmethod def _log_api_event( *, phase: str, operation: str, endpoint: str, payload: Any, request_run_id: str | None = None, ) -> None: """将 Ark API 的请求或响应写入文件日志。""" record = { "phase": phase, "endpoint": endpoint, "operation": operation, "payload": _serialize_for_log(payload), } if request_run_id: record["request_run_id"] = request_run_id responses_logger.info(json.dumps(record, ensure_ascii=False)) ``` ```python def configure_logging() -> None: logging.basicConfig(level=logging.INFO, format="[%(levelname)s] %(message)s") log_path = configure_response_logging() logging.getLogger(__name__).info("Ark API logs are written to % ...[truncated 1632 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/bootstrap_runtime.sh:27
Finding

Runtime Bootstrap Installs Unpinned Dependencies and Unnecessary Development Packages

Content
View full analysis
=3.11" dependencies = [ "tos>=2.8.7", "pydantic>=2.8.0", "python-dotenv>=1.0.1", "volcengine-python-sdk[ark]>=5.0.21", ] [project.optional-dependencies] dev = [ "pytest>=8.2.0", ] ``` ### Technical Analysis The mandatory bootstrap command installs dependencies from the configured Python package index using minimum-version constraints. No lockfile or package hashes constrain which future releases are accepted. The command also installs the `dev` extra, including `pytest`, even though development tooling is not required to execute the Skill. Python package installation may execute build-backend or installation-related code. If a dependency account, package index, release artifact, or transitive dependency is compromised, a later package version satisfying these broad constraints can execute code during bootstrap or runtime. No specific listed dependency was confirmed to be malicious. The finding concerns the unsafe and non-reproducible installation mechanism. ### Attack Path 1. An attacker compromises a permitted dependency, one of its transitive dependencies, or the package distribution channel. 2. The attacker publishes a newer version that satisfies the configured `>=` constraint. 3. A user runs the documented `scripts/bootstrap_runtime.sh`. 4. `pip` resolves and downloads the attacker-controlled release. 5. Package build, installation, or import code executes with the privileges of the user running the bootstrap process. ### Impact Assessment A compromised dependency can ob ...[truncated 438 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (77)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description says this skill should take a local source video plus one product image and produce a single-product placement video via the DPP pipeline. The supplied code chunk instead implements a command-line entrypoint for storyboard generation only. It accepts a video path and output directory, but there is no argument or visible handling for a product image, and the parser description explicitly says it generates storyboard.json from a local video. This is a materially different primary purpose from creating a final product-placement video, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill should generate a single-product placement video from a local source video and one product image via the DPP pipeline. The supplied code does something entirely different: it parses CLI options for prefix/delimiter/start-after/max-keys, creates a TOS client from environment configuration, lists objects in a bucket, extracts keys, and prints them. There is no video processing, no use of a local source video, no handling of a product image, and no DPP pipeline execution. This is a clear material mismatch in primary purpose and accessed resources.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is about media processing: taking a local source video plus one product image and generating a single-product placement video through the DPP pipeline. The supplied code does none of that. Instead, it is a generic TOS upload demo that parses CLI args, loads TOS credentials from environment variables, uploads a file or inline text to object storage, optionally checks object metadata with head_object, and prints upload details. This is a materially different primary purpose and includes undeclared remote storage access capabilities. Therefore the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description is about generating a single-product placement video from a local source video and one product image using a DPP pipeline. The supplied code chunk does not implement video generation, image/video processing, or pipeline orchestration. Instead, it checks TOS/CDN configuration, uploads a local file to remote object storage, and constructs a URL for the uploaded object. That is a materially different capability and involves external network/storage access not reflected in the description. While upload could be a supporting component of a larger pipeline, this specific chunk’s actual behavior is CDN upload, not the declared DPP video transformation purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The declared description says this skill is for turning a local source video and one product image into a single-product placement video. The supplied code chunk does not accept a source video path or product image path directly. Instead, it expects precomputed storyboard and placement_analysis JSON files plus a material config, then invokes a BestSegmentCompositionService to create a composition result. That suggests this component is a later-stage composition/planning step within a broader pipeline, not the full end-to-end video generation flow described. The optional reference-video URL and model override parameters further indicate behavior not captured by the declared purpose. Therefore the description materially overstates or misstates what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description suggests an end-to-end skill that accepts a source video and a product image to produce a placement video. The supplied code instead exposes a command-line interface for a downstream final-cut component. It requires a preexisting composition_result.json, calls FinalCutService, and its documented purpose is to replace the best segment in the original video with a generated video clip. This is materially narrower and different from the declared purpose. There is no evidence in this chunk of handling the original product image input or orchestrating the full DPP pipeline from raw inputs.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description says this skill should take a local source video plus one product image and produce a single-product placement video. However, the provided code only parses arguments for an image and output JSON path, auto-detects a single image under assets/, and invokes MaterialGenerationService to write a material config JSON. There is no CLI argument or logic for a source video, no video processing pipeline visible, and no output video generation. This is a materially different primary purpose, not just an implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The declared description says this skill should take a local source video and one product image and turn them into a single-product placement video with the DPP pipeline. The supplied code does not handle any video input at all, nor does it perform video composition or placement generation. Instead, it uploads a product image to an external Ark service, asks for a material configuration response, validates/repairs the JSON into a MaterialConfig object, and writes that JSON config to an output file. This is a materially different primary purpose and includes external network-style behavior not reflected in the declared permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description promises an end-to-end pipeline step that turns a source video and product image into a single-product placement video. The code shown does not perform video generation or compositing output; its stated parser description and arguments indicate a narrower task: analyzing an already-created storyboard to determine suitable placement segments. Its inputs are also materially different from the declared description, requiring a storyboard JSON and material config file rather than a raw local video and image. This is a substantive purpose/input mismatch, not just an implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The code is a placement analysis service, not a video-generation pipeline step that turns a source video plus product image into a final single-product placement video. Its primary function is to analyze storyboard segments for placement suitability using an external model service and save a JSON report. It also uploads the product image to Ark, which is an external resource access not reflected in the declared permissions. While this may support a broader DPP pipeline, this specific code chunk materially differs from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description claims the skill is for producing a single-product placement video from a local source video and one product image. However, this code builds a command-line utility named 'dpp-preview-prompt' whose stated description is 'Generate the composition prompt only (no video generation task).' It requires paths to an existing storyboard.json and placement_analysis.json, invokes the composition service with prompt_only=True, reads composition_result.json, and prints the generated prompt. This is a materially different primary purpose from full video creation, and the expected inputs differ from the declared local source video plus product image workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description suggests a skill whose purpose is to take a local source video plus one product image and produce a single-product placement video via the DPP pipeline. The supplied code does not implement end-to-end video transformation; instead it contains prompt strings and builders for several intermediate LLM-analysis tasks within such a pipeline. These include storyboard generation, placement-space analysis, product metadata extraction, JSON repair, and composition prompt authoring. While these are related to a DPP workflow, the actual code chunk's primary behavior is orchestration/prompt construction for analysis and planning stages, not directly turning inputs into a placement video. That is a materially different capability profile from the concise declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The declared description says the skill should create a single-product placement video from a local source video and one product image using the DPP pipeline. However, the provided code only contains data models for storyboard segments/drafts/reports, validation/normalization of text and timing fields, and a helper to assemble a storyboard report object with timestamps. There is no code for loading local media, ingesting a product image, compositing product placement, invoking any DPP pipeline, or outputting a video. This is a materially different primary purpose, so the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description says this skill should combine a local source video and one product image into a single-product placement video. The code does not take any product image parameter and never performs video compositing or product placement generation. Instead, it accepts only a video path, sends that video to an external Ark client for storyboard generation, validates/repairs the returned JSON, generates thumbnails, and saves a storyboard.json report. This is a materially different primary purpose from the declared one, and it also involves undeclared external upload/network behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says this skill is for creating a single-product placement video from a local source video and one product image via the DPP pipeline. However, the provided code only implements thumbnail/storyboard preview generation: it computes centered time windows for segments, invokes ffmpeg to extract animated GIFs from the source video, and writes thumbnail paths back into a storyboard report. There is no handling of a product image, no compositing or placement logic, and no end-to-end video generation. This is a materially different primary purpose, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared purpose is media transformation via the DPP pipeline, but the supplied code does not perform any video or image processing, product placement generation, or pipeline execution. Its primary function is runtime setup and dependency validation. While bootstrapping can support the declared skill, this code chunk itself materially differs from the stated behavior because it only installs and verifies prerequisites rather than creating a placement video.

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 · SKILL.md (reported line 57)May include surrounding context.

text
<workspace>/
  .env
  assets/
    <single product image>
  video/

Lp1

High
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The file clearly performs outbound network operations to the Ark API for file upload, response generation, and task polling, yet the finding states this capability is not covered by declared permissions. Undeclared network access weakens user/admin trust controls and can allow a skill advertised for local media processing to transmit local content to external services without an explicit permission boundary.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The script reads sensitive cloud credentials and configuration from environment variables via os.environ and load_dotenv, but the skill metadata does not indicate that environment access is required. In an agent skill, undeclared access to environment data is dangerous because it can silently consume secrets and route local data to external services without the user understanding the capability boundary.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
83% confidence
Finding

This module writes multiple files to disk, including extracted clips, downloaded generated videos, and JSON reports, but the static finding indicates these write capabilities may not be declared in the skill's permissions model. In an agent setting, undeclared file-write behavior weakens user consent and sandbox expectations, which can enable unintended persistence or overwrite of local data.

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/run_compose_best.sh (reported line 31)May include surrounding context.

sh
fi

export PYTHONPATH="${RUNTIME_DIR}/src${PYTHONPATH:+:${PYTHONPATH}}"
if [[ -f "${WORKDIR}/.env" ]]; then
  export DPP_DOTENV_PATH="${WORKDIR}/.env"
fi
cd "${WORKDIR}"

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/run_compose_best.sh (reported line 32)May include surrounding context.

sh
fi

export PYTHONPATH="${RUNTIME_DIR}/src${PYTHONPATH:+:${PYTHONPATH}}"
if [[ -f "${WORKDIR}/.env" ]]; then
  export DPP_DOTENV_PATH="${WORKDIR}/.env"
fi
cd "${WORKDIR}"

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/run_final_cut.sh (reported line 31)May include surrounding context.

sh
fi

export PYTHONPATH="${RUNTIME_DIR}/src${PYTHONPATH:+:${PYTHONPATH}}"
if [[ -f "${WORKDIR}/.env" ]]; then
  export DPP_DOTENV_PATH="${WORKDIR}/.env"
fi
cd "${WORKDIR}"

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/run_final_cut.sh (reported line 32)May include surrounding context.

sh
fi

export PYTHONPATH="${RUNTIME_DIR}/src${PYTHONPATH:+:${PYTHONPATH}}"
if [[ -f "${WORKDIR}/.env" ]]; then
  export DPP_DOTENV_PATH="${WORKDIR}/.env"
fi
cd "${WORKDIR}"

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/run_generate_material.sh (reported line 31)May include surrounding context.

sh
fi

export PYTHONPATH="${RUNTIME_DIR}/src${PYTHONPATH:+:${PYTHONPATH}}"
if [[ -f "${WORKDIR}/.env" ]]; then
  export DPP_DOTENV_PATH="${WORKDIR}/.env"
fi
cd "${WORKDIR}"

Static analysis

No suspicious patterns detected.