Back to skill

Security audit

文本生成 Grok 4.2

Security checks for vulnerabilities and agentic risk

Overview

This skill is a cloud AI CLI wrapper, but its broad triggers and inconsistent text-versus-file/image documentation create a real chance of unintended prompt or file transfer to a third-party service.

Install only if you intentionally want prompts, parameters, and any explicitly supplied local media files handled by dLazy's hosted service. Prefer explicit Grok/dLazy invocation over generic chat triggers, avoid passing sensitive files, use the per-invocation API key option or rotate the saved key as needed, and review the npm package/source before choosing a global install.

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
SKILL.md:12
Finding
Unaudited Third-Party npm Package Is Installed and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:12-13` and equivalent declaration in `SKILL-cn.md:12-13` **Vulnerability Type**: Third-party supply-chain exposure **Risk Level**: Medium ### Complete Code Snippet ```yaml 'install': 'npm install -g @dlazy/cli@1.2.3', 'installAlternative': 'npx @dlazy/cli@1.2.3', ``` The package is also directly recommended for execution in `SKILL.md:60` and `SKILL-cn.md:60`: ```bash npx @dlazy/cli@1.2.3 <command> ``` ### Technical Analysis The Skill depends on the externally distributed npm package `@dlazy/cli@1.2.3`. The executable package and its dependency tree are not included in the audited project, so their behavior could not be inspected or verified against the linked source repository. Pinning the package to version `1.2.3` reduces version drift, but it does not independently establish package integrity or confirm that the npm artifact corresponds to the reviewed repository. No checksum, signed provenance record, or other integrity-verification mechanism is specified. Both installation methods introduce supply-chain exposure: - `npm install -g` installs the package globally and may execute npm lifecycle scripts with the invoking user's privileges. - `npx` retrieves and executes the external package on demand. - The CLI is expected to handle API credentials, user prompts, network requests, and explicitly supplied local files. - Transitive dependencies and lifecycle scripts are outside the reviewed project and therefore remain unaudited. This finding does not establish that the current package is malicious. It identifies the security boundary created by downloading and executing code that is absent from the submitted artifact. ### Attack Path A plausible exploitation path, contingent on compromise or malicious publication of the npm artifact, is: 1. An attacker compromises the npm publisher account, package release process, or one of the package's transitive dependencies. 2. Malicious code is in ...[truncated 1472 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Verify package provenance** - Publish npm provenance attestations from a controlled CI/CD workflow. - Document how users can confirm that the npm artifact corresponds to the linked source repository. - Sign release tags and retain reproducible release records. 2. **Add integrity controls** - Provide a verified integrity hash for the expected package artifact. - Lock and audit all transitive dependencies. - Use automated dependency and package-malware scanning in the release pipeline. 3. **Avoid global installation by default** - Prefer a project-local, isolated installation over `npm install -g`. - Run the CLI in a container, sandbox, or dedicated low-privilege account where practical. - If global installation remains supported, clearly explain that it persists an executable on the host. 4. **Restrict lifecycle-script exposure** - Confirm whether the package requires npm lifecycle scripts. - If it does not, recommend installation with lifecycle scripts disabled. - Audit any required lifecycle script and document its behavior. 5. **Vendor or include auditable implementation code** - Include the relevant CLI source and lockfile in the reviewed artifact, or provide a verifiable source-to-package build process. - Audit credential storage, file-upload behavior, command construction, and network destinations. 6. **Apply least privilege** - Run the CLI without administrative privileges. - Limit the API key's permissions and rotate it regularly. - Pass only files intentionally selected for upload. - Restrict outbound network access to documented endpoints where operationally feasible. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Ae1

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

Natural-Language Policy Violations

Medium
Confidence
72% confidence
Finding
该文件整体以中文提供操作说明,并以“中文”版本呈现,但没有说明语言由用户选择,也没有在正文中声明仅在用户选择中文时适用。根据规则,若技能强制特定语言而未提供用户选择,属于语言/地区策略风险。

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger keywords include very broad everyday terms such as '问答' and '聊天', which can cause the skill to activate unintentionally in many unrelated conversations. In an agent environment, accidental invocation can lead to unnecessary external API calls, transmission of user prompts to a third-party service, and unexpected use of stored credentials or paid quota.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The manifest and surrounding documentation consistently describe this skill as a text-generation, dialogue QA, and reasoning tool. However, the documented output example shows `outputs` containing an object with `type: "image"` and a PNG URL, which actively misrepresents what this command is supposed to return and could mislead an agent about the skill's actual behavior.

Whitespace Padding

Medium
Category
Prompt Injection
Content
## 错误处理

| Code | 错误类型                   | 示例信息                                                                                       |
| ---- | -------------------------- | ---------------------------------------------------------------------------------------------- |
| 401  | 未授权 (API Key缺失或无效) | `ok: false, code: "unauthorized", message: "API key is missing or invalid"`                    |
| 501  | 缺少必填参数               | `error: required option '--prompt <prompt>' not specified`                                     |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The documentation repeatedly labels the skill as a Grok 4.2 text model, yet the sample output shows image generation artifacts and hosted image URLs. This mismatch can mislead agents and users about what data types the tool handles and where outputs are stored, increasing the chance of unsafe invocation or accidental disclosure.

Vague Triggers

Medium
Confidence
96% confidence
Finding
Trigger keywords such as 'generate text', 'qa', and 'chat' are extremely broad and likely to match ordinary conversations. Over-broad triggers can cause unintended auto-invocation of a third-party networked skill, exposing prompts or context to an external API without sufficiently clear user intent.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill is presented as a text-generation tool, but the documentation says local file paths may be uploaded to remote storage and generated outputs may be hosted externally. This capability expansion increases data-exfiltration and privacy risk because users or invoking agents may assume text-only handling and inadvertently send sensitive local media or documents to third-party services.

Whitespace Padding

Medium
Category
Prompt Injection
Content
## Error Handling

| Code | Error Type                         | Example Message                                                                                                          |
| ---- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| 401  | Unauthorized (No API Key)          | `ok: false, code: "unauthorized", message: "API key is missing or invalid"`                                              |
| 501  | Missing required parameter         | `error: required option '--prompt <prompt>' not specified`                                                               |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| 401  | Unauthorized (No API Key)          | `ok: false, code: "unauthorized", message: "API key is missing or invalid"`                                              |
| 501  | Missing required parameter         | `error: required option '--prompt <prompt>' not specified`                                                               |
| 502  | Local file read error              | `Error: Image file/Video file not found: C:\path\to\your\file`                                                           |
| 503  | API request failed (no balance)    | `ok: false, code: "insufficient_balance"`                                                                                |
| 503  | API request failed (server error)  | `HTTP status code error (500 server crash)`                                                                              |
| 504  | Asynchronous task execution failed | `=== Generation Failed ===` / `{Specific error reason returned by backend, for example "Prompt violates safety policy"}` |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Static analysis

No suspicious patterns detected.