Back to skill

Security audit

AI Enterprise Knowledge Base

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent for an enterprise knowledge-base service, but it handles sensitive company documents and credentials with broad, under-specified setup and data-flow guidance.

Review this carefully before installing in a company environment. Use an isolated, unprivileged install environment; pin or verify the OpenClaw source revision; protect API tokens and Feishu secrets; and confirm where documents, embeddings, prompts, answers, and chat messages are stored, retained, and shared before uploading private business data.

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:18
Finding
Unpinned Remote Repository Installation Creates a Mutable Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, lines 18-19 **Vulnerability Type**: Unpinned remote dependency installation **Risk Level**: Medium **Vulnerable Code**: ```bash git clone https://github.com/openclaw/openclaw.git cd openclaw && npm install ``` ### Technical Analysis The documented installation process clones the current default branch of a remote repository without pinning a reviewed commit hash or signed release. It then immediately runs `npm install`, which resolves third-party dependencies and may execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. Because both the repository branch and unverified dependency resolution are mutable, the code ultimately installed can change after this Skill has been reviewed. A compromise of the upstream repository, its maintainer accounts, the package registry, or a transitive dependency could cause users following these instructions to retrieve and execute attacker-controlled code. No malicious payload is embedded in the audited project itself. The risk arises from the unsafe and non-reproducible remote installation procedure. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or a dependency resolved during `npm install`. 2. The attacker introduces malicious code into the default branch or into an install-time dependency or lifecycle script. 3. A user follows the instructions and clones the mutable default branch. 4. The user runs `npm install`, which retrieves the affected dependencies and can execute malicious lifecycle scripts. 5. The payload executes with the operating-system privileges of the user performing the installation. ### Impact Assessment Successful exploitation could allow arbitrary command execution in the installation environment with the privileges of the installing user. Depending on those privileges and the environment, an attacker could access source code ...[truncated 441 chars]
Remediation
## Remediation Suggestions 1. Replace the mutable clone operation with a pinned, reviewed commit or cryptographically verified signed release: ```bash git clone https://github.com/openclaw/openclaw.git cd openclaw git checkout --detach <reviewed-commit-sha> ``` 2. Publish the expected commit hash and verify it before installation. 3. Include a reviewed lockfile and use `npm ci` rather than `npm install` to enforce reproducible dependency versions. 4. Require package integrity metadata and monitor direct and transitive dependencies for compromise. 5. Audit all package lifecycle scripts. Where compatible with the application, install with `npm ci --ignore-scripts` and explicitly run only reviewed build steps. 6. Perform installation as a dedicated, unprivileged account in an isolated container or build environment with minimal filesystem, credential, and network access. 7. Avoid exposing production secrets or developer credentials to the installation environment. 8. Document a dependency-update review process so that changes to the pinned revision and lockfile receive security review before release.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (5)

Missing User Warnings

Medium
Confidence
87% confidence
Finding
This markdown file describes uploading enterprise documents, semantic retrieval, and integrations with messaging platforms, all of which can affect user data, privacy, or system integrity. However, there is no visible warning that documents may be transmitted to external services, stored in a knowledge base, or exposed through connected channels.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The examples demonstrate posting files to /api/documents, sending questions to /api/ask, and configuring Feishu credentials, which are all behaviors that can affect sensitive data and system access. The markdown does not warn users about document sensitivity, token handling, credential protection, or downstream processing by integrated services.

External Transmission

Medium
Category
Data Exfiltration
Content
### 上传文档
```bash
curl -X POST http://localhost:3000/api/documents \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "file=@employee-handbook.pdf" \
  -F "department=hr"
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
A natural-language policy concern exists when a skill effectively forces a specific language without user opt-in. This file presents all operational guidance, examples, and support information solely in Chinese, with no indication that alternative languages are available or that the skill is intentionally limited to a Chinese-speaking audience.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The package description text is entirely in Chinese and does not indicate that users may choose another language or that the skill is intended only for a Chinese-speaking audience. This can violate language/locale policy expectations when a skill implicitly forces one language without user opt-in.

Static analysis

No suspicious patterns detected.