Back to skill

Security audit

智能体上手手册 Start

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent quickstart for dLazy, but it asks users to grant broad browser-cookie access and install mutable npm code globally without enough safeguards.

Review this before installing. Use a pinned, trusted @dlazy/cli version in an isolated environment where possible, prefer device-code login over putting API keys on command lines, confirm any paid or file-writing action, and do not allow cookies_from_browser against your normal browser profile unless you understand and accept the session-cookie exposure; a dedicated throwaway browser profile is safer.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T08 · Insecure Dependencies

Error
Location
SKILL.md:40
Finding
Unpinned Third-Party Package Installation and Execution## Vulnerability Details **File Location**: `SKILL.md:7, 38-44, 165`; mirrored in `SKILL-cn.md:7, 30-36, 144` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: High ### Vulnerable Code ```bash # Install once npm install -g @dlazy/cli # Authenticate (device-code flow; works in remote shells) dlazy auth login ``` The metadata also specifies an unpinned execution alternative: ```text "install":"npm install -g @dlazy/cli", "installAlternative":"npx @dlazy/cli" ``` ### Technical Analysis The Skill instructs the agent to globally install or directly execute `@dlazy/cli` without pinning an exact reviewed version or verifying package integrity. The effective code retrieved from npm can therefore change after the Skill itself has been audited. Both `npm install -g` and `npx` may execute package lifecycle scripts and package-provided binaries. A malicious or compromised package release could consequently execute arbitrary code under the account running the command. Global installation also makes the package persist in the user's global npm environment beyond the immediate task. The audited project contains only documentation and does not include the package implementation, a lockfile, an integrity hash, or a vendored reviewed artifact. The behavior of the downloaded dependency therefore cannot be established from this repository alone. There is no evidence in the reviewed files that the current npm package is malicious; the vulnerability is the unsafe and mutable dependency acquisition mechanism. ### Attack Path 1. An attacker compromises the npm publisher account, publication pipeline, package dependency tree, or another component involved in distributing `@dlazy/cli`. 2. The attacker publishes a malicious release under the expected package name or causes the package's mutable distribution tag to resolve to a compromised version. 3. An agent follows the Skill and runs `npm install -g ...[truncated 1091 chars]
Remediation
## Remediation Suggestions 1. Pin the CLI to an exact reviewed version, such as `@dlazy/cli@2.0.6`, rather than relying on a mutable distribution tag. 2. Prefer a project-local installation governed by a committed lockfile instead of a global installation. 3. Verify the package artifact against a documented integrity hash, trusted provenance attestation, or signed release before execution. 4. Use an isolated, least-privileged environment for installation and execution. 5. Avoid `npx` without an exact version because it can retrieve and immediately execute a changed package. 6. Use `--ignore-scripts` where the package supports operation without lifecycle scripts. If lifecycle scripts are required, document and review them explicitly. 7. Add an upgrade process requiring review and integrity verification before changing the pinned version. 8. Keep the English and Chinese Skill documents synchronized so both provide the same dependency safeguards.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:128
Finding
Broad Browser Session Cookie Access Recommended for Downloader Recovery## Vulnerability Details **File Location**: `SKILL.md:128-131`; mirrored in `SKILL-cn.md:114-116` **Vulnerability Type**: Excessive access to browser authentication credentials **Risk Level**: Medium ### Vulnerable Code ```text **`video_downloader` returns "Sign in to confirm you're not a bot":** - YouTube anti-bot challenge. Pass `"cookies_from_browser": "chrome"` (or firefox / safari / edge) in the input JSON. ``` ### Technical Analysis The recovery instruction recommends allowing the downloader toolchain to read cookies directly from a Chrome, Firefox, Safari, or Edge browser profile. Browser cookies are authentication credentials and may grant access to active user sessions. Reading cookies from a general-purpose browser profile can expose substantially more credential material than is required for one video-download operation. The Skill does not require explicit user approval, a dedicated browser profile, domain restriction, cookie minimization, isolation, or secure deletion. It also does not explain whether the selected tool reads cookies locally, copies them into temporary files, logs them, or transmits them to a remote service. This risk is compounded by the fact that the cookie-reading implementation resides in the externally installed CLI or optional downloader runtime rather than in the audited files. No evidence in the reviewed documents establishes that cookies are actually exfiltrated; the confirmed issue is the recommendation to grant broad access to sensitive browser credentials without adequate safeguards. ### Attack Path 1. The downloader encounters an anti-bot or authentication challenge. 2. The agent follows the documented recovery procedure and sets `cookies_from_browser` to the user's normal browser. 3. The third-party CLI or downloader runtime accesses the selected browser's cookie database and associated decryption facilities. 4. A compromised, vulnerable, or overly broad implementation reads ...[truncated 978 chars]
Remediation
## Remediation Suggestions 1. Require explicit, informed user approval before accessing any browser cookie store. 2. Use a dedicated browser profile containing only the minimum session required for the intended service. 3. Prefer a narrowly scoped cookie export restricted to the required domain instead of granting access to an entire browser profile. 4. Document whether cookie data remains local, whether it is sent to any cloud endpoint, and how temporary copies are secured and deleted. 5. Prohibit cookie values from appearing in command output, verbose logs, telemetry, audit logs, or error reports. 6. Run the downloader in an isolated, least-privileged environment that cannot access unrelated browser profiles. 7. Revoke the dedicated session after use and securely delete temporary cookie files. 8. Treat cookie-based recovery as an exceptional operation rather than an automatic response to downloader failure.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Content
材 URL)或 `failed`(带 `error.code` + `error.message`)。

---

## Phase 4 — 常见失败恢复

**`dlazy doctor remotion --install` 在 npm install 阶段失败:**
- 检查 Node ≥ 18(`node --version`)。
- 公司代理后面:设 `npm_config_proxy` / `npm_config_https_proxy`。

**`video_downloader` 回复 "Sign in to confirm you're not a bot":**
- YouTube 反爬挑战。input JSON 里加 `"cookies_from_browser": "chrome"`(或 firefox / safari / edge)。

**`video_compose` 返回 "render_runtime=hyperframes not yet implemented":**
- HyperFrames runtime 还没 ship。把 `edit_decisions.render_runtime` 切成 `remotion` 或 `ffmpeg`,再用 `pre_render_validator` 复检。

**ElevenLabs STT 返回空 `words` 数组:**
- 显式传 `timestamps_granularity: "word"`。

**不知道工具成本就要调:**
- `dlazy tools describe <名字>` 暴露 `hasCosts` 和成本形态。先把 estimate 写到本地审计日志,再调工具。

**unknown command 提示:**
- `dlazy <错字>` 返回 `
Confidence
78% confidence
Finding
The skill suggests using `cookies_from_browser` to pull browser cookies for `video_downloader` in order to bypass anti-bot challenges. Even if framed as troubleshooting, instructing an agent to extract authentication material from a browser crosses into credential-access behavior and could expose sensitive session data beyond the immediate use case.

Ae1

High
Category
analysis-evasion
Content
[English](./SKILL.md) · [中文](./SKILL-cn.md)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Content
is in the payload) or
`failed` (with `error.code` + `error.message`).

---

## Phase 4 — Common failure recovery

**`dlazy doctor remotion --install` fails on `npm install`:**
- Check Node ≥ 18 (`node --version`).
- Behind a corp proxy: set `npm_config_proxy` / `npm_config_https_proxy`.

**`video_downloader` returns "Sign in to confirm you're not a bot":**
- YouTube anti-bot challenge. Pass `"cookies_from_browser": "chrome"`
  (or firefox / safari / edge) in the input JSON.

**`video_compose` returns "render_runtime=hyperframes not yet implemented":**
- HyperFrames runtime not shipped. Switch `edit_decisions.render_runtime` to
  `remotion` or `ffmpeg`, then re-validate via `pre_render_validator`.

**ElevenLabs STT returns an empty `words` array:**
- Pass `timestamps_granularity: "word"` explicitly.

**Need to know a tool's cost before invoking:**
- `dlazy tools describe <name>` exposes `hasCosts` and the cost shape. Log
  the estimate to a local file or your audit log before callin
Confidence
75% confidence
Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill instructs the agent/user to run installation and setup commands (`npm install -g`, auth flow, runtime installers) that modify the host system, but it does not include an explicit warning that these commands install software, write configuration, and may download additional components. In an agent-execution context, omission of such warnings can lead to unsafe automatic changes on a user's machine or CI runner.

Rp1

Medium
Category
MCP Rug Pull
Confidence
82% confidence
Finding
The metadata recommends running `npx @dlazy/cli` without a pinned version, which allows whatever package version is current at execution time to be fetched and run. That creates a supply-chain risk: a compromised maintainer account, malicious newly-published version, or breaking change could result in unexpected code execution in the user's environment.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill tells users to pass an API key on the command line or via environment variable but gives no warning that command-line arguments may be exposed through shell history, process listings, CI logs, or agent transcripts. In an AI-orchestrated environment, those channels are especially likely to be captured, making accidental credential disclosure more likely.

Missing User Warnings

Low
Confidence
86% confidence
Finding
The documentation advertises `--save <path>` to download outputs directly to the local filesystem without warning that it creates directories and writes files. In an agent setting, this can cause unintended file writes or overwrites if paths are user-controlled or inferred unsafely.

Static analysis

No suspicious patterns detected.