Back to skill

Security audit

Release Package

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent workspace browser, but it exposes workspace files through an unauthenticated network service and can send code to DeepSeek for AI explanations.

Review before installing. Use only in a trusted, isolated environment, bind it to localhost, add authentication, remove wildcard CORS, fix path containment, sanitize rendered explanations, and avoid AI explanations for sensitive files unless you are comfortable sending their contents to DeepSeek.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
app.py:581
Finding

Unauthenticated Remote Access to Workspace Files

Content
View full analysis
') def get_file(req_path): abs_path, rel_path = normalize_and_validate_path(req_path) ... with open(abs_path, 'r', encoding='utf-8') as f: content = f.read() ... return jsonify(response) @app.route('/api/download/') def download_file(req_path): abs_path, rel_path = normalize_and_validate_path(req_path) ... return send_file( abs_path, as_attachment=True, download_name=os.path.basename(abs_path), mimetype='application/octet-stream' ) ``` ```python app.run( host='0.0.0.0', port=5001, debug=False, use_reloader=False, threaded=True ) ``` ```bash python3 app.py > app.log 2>&1 & echo "Workspace browser 3.0 started" echo "Access address: http://175.178.154.173:5001" ``` ### Technical Analysis The application exposes workspace enumeration, search, file reading, file downloading, explanation retrieval, and explanation-writing routes without any authentication or authorization. Binding Flask to `0.0.0.0` makes the service reachable through every available network interface rather than limiting it to the local host. The configured workspace is `/root/.openclaw/workspace`, which may contain source code, configuration files, credentials, tokens, and operational data belonging to a privileged user. The API does not enforce user identity, route-level permissions, or per-file access rules. ### Attack Path 1. An attacker reaches TCP port 5001 over the local network or public interface. 2. The attacker calls `/api/tree/` or `/api/search?q=...` t ...[truncated 732 chars]
Remediation
View remediation

other

Error
Location
app.py:446
Finding

Workspace Source Code Sent to an External AI Service

Content
View full analysis
`. 4. The backend reads the complete file and constructs an external AI request containing its contents. 5. The data is transmitted under the operator's configured API account. ### Impact Assessment Confidential source code and s ...[truncated 220 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
app.py:248
Finding

Workspace Path Validation Bypass Through Prefix Confusion and Symbolic Links

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
static/js/app.js:1234
Finding

Persistent Cross-Site Scripting Through Stored Explanations

Content
View full analysis
${prefixHtml}
${marked.parse(explanation.content)}
`; } ``` ```javascript function renderContent() { ... contentArea.innerHTML = contentHtml; } ``` ```python data = request.get_json() if not data or 'content' not in data: return jsonify({"error": "Missing explanation content"}), 400 explanation_content = data['content'].strip() ... save_success = save_explanation_to_db( rel_path, file_hash, 'manual', explanation_content ) ``` ### Technical Analysis Manual and model-generated explanation content is treated as Markdown, converted into HTML with `marked.parse()`, and assigned to `innerHTML`. No HTML sanitizer or restrictive Markdown configuration is used. The manual explanation endpoint stores attacker-controlled content in SQLite. Consequently, a payload can remain in the database and execute whenever another user opens the affected explanation. The lack of authentication on the write endpoint allows a remote attacker to plant the payload. AI-generated content is another untrusted source. A manipulated source file or compromised model response could produce unsafe HTML that reaches the same sink. ### Attack Path 1. The attacker identifies a valid workspace file. 2. The attacker sends malicious Markdown or raw HTML to `/api/save_manual_explanation/`. 3. The server stores the content in `explanations.db`. 4. A victim opens the file and selects the explanation tab. 5. The frontend retrieves the explanation and passes it to `mark ...[truncated 506 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
static/js/app.js:197
Finding

DOM Injection Through Search Terms, Filenames, and Error Messages

Content
View full analysis
Search term: "${searchTerm}"

No file or folder matched "${searchTerm}"

`; searchOverlay.innerHTML = html; ``` ```javascript childrenContainer.innerHTML = `
Load failed: ${error.message}
`; ``` ```javascript

Analyzing: ${state.currentFile?.name || 'current file'}

``` ### Technical Analysis Search values, filesystem-controlled names, and error strings are interpolated directly into HTML template strings. Those templates are subsequently assigned to `innerHTML`. Although the application defines an `escapeHtml()` helper, it is not consistently applied to these values. An attacker can control the search query directly. Filenames may also be attacker-controlled in collaborative, extracted, or externally synchronized workspaces. HTML inserted through `innerHTML` can activate executable attributes and other unsafe browser behaviors. ### Attack Path 1. The attacker supplies a search term containing an HTML payload, or creates a crafted filename in the workspace. 2. The frontend interpolates that value into an HTML template without escaping. 3. The template is assigned to `innerHTML`. 4. Browser-interpreted markup or an executable attribute is activated in the application origin. ### Impact Assessment Successful exploitation can execute browser-side actions in the application's origin. This may allow access to workspace APIs, theft of displayed content, unauthoriz ...[truncated 76 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
app.py:19
Finding

Wildcard CORS Exposes Sensitive Workspace APIs to Arbitrary Origins

Content
View full analysis
` from the workspace browser. 4. The server responds with `Access-Control-Allow-Origin: *`. 5. The attacker's page reads the response and transmits the data externally. ### Impact Assessment A malicious website can act as a cross-origin client for the unauthenticated service. Depending on network reachability, it may enumerate and disclose workspace files or initiate other API actions without requiring direct access through the application's user interface. ]]>
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned and Incomplete Python Dependency Declaration

Content
View full analysis
=2.3.0 ``` ```python import requests ``` ### Technical Analysis Flask is specified with an open-ended lower bound and no integrity hash, allowing future releases to be installed without review. The application also directly imports `requests`, but `requests` is absent from `requirements.txt`. This makes deployment dependent on ambient packages and prevents reproducible review of the effective runtime dependency set. Different environments can silently use different package versions, and installation instructions do not establish a complete reviewed dependency graph. ### Attack Path 1. An operator installs dependencies from the open-ended requirement. 2. Package resolution selects a future or otherwise unreviewed release. 3. The application imports an environment-provided version of `requests`, if available. 4. Runtime behavior differs from the audited dependency set or the installation fails. 5. A compromised or incompatible dependency can affect the service under the application's privileges. ### Impact Assessment The issue increases supply-chain, compatibility, and deployment-integrity risk. A compromised effective dependency could access workspace files, API credentials, network connections, and all privileges granted to the Flask process. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
start.sh:3
Finding

Startup Script Can Terminate Unrelated Python Applications

Content
View full analysis
/dev/null ``` ### Technical Analysis The startup script terminates every process whose full command line matches `python3.*app.py`. The match is not restricted to this project directory, a known process identifier, or a uniquely named service. Starting the Skill therefore performs a system-wide process-management action that exceeds the minimum privilege required to launch the workspace browser. ### Attack Path 1. Another legitimate Python service is running with `app.py` in its command line. 2. A user executes this project's `start.sh`. 3. `pkill -f` matches the unrelated process. 4. The unrelated application is terminated before this application starts. ### Impact Assessment The command can cause denial of service, interrupted tasks, lost in-memory state, and operational disruption to unrelated Python applications running under the same user or under any broader privilege available to the script. ]]>
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
templates/index.html:9
Finding

Third-Party Frontend Scripts Loaded Without Integrity Protection

Content
View full analysis
``` ### Technical Analysis Executable JavaScript is fetched at page-load time from third-party CDNs without Subresource Integrity attributes. The Marked dependency also lacks an exact version in its URL, making the resolved code mutable over time. These scripts run in the workspace browser's origin. If a CDN, upstream package, or mutable package reference is compromised, the delivered code can invoke the application's same-origin APIs. ### Attack Path 1. A CDN account, upstream package, or mutable package target is compromised. 2. The victim opens the workspace browser. 3. The browser downloads the modified script. 4. The script executes in the application's origin. 5. It calls workspace APIs and transmits filenames or file contents to an attacker. ### Impact Assessment A compromised frontend dependency can obtain the same browser-visible access as the legitimate UI, including file enumeration, file reading, explanation access, and state-changing API requests. This creates a high-impact supply-chain path even though the current CDN URLs are legitimate. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (27)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README advertises 'AI代码解释(自动保存)' as a feature without any notice about what data is retained, how long it is stored, or whether source code may contain sensitive information. In a workspace/code browser context, automatic persistence can silently capture proprietary code, secrets, or sensitive analysis artifacts, creating a real privacy and data-governance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The statement that '所有解释自动保存' and '永久保存' normalizes indefinite storage of generated explanations without warning users about privacy, confidentiality, or data-management implications. Because this skill operates on workspace files, the saved explanations may embed sensitive code details and create long-lived exposure beyond the user's expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documentation states that AI-generated code explanations are automatically saved to a SQLite database, but it does not clearly warn users about the persistence, retention, or sensitivity implications of storing potentially confidential source-code-derived content. In a workspace browser, this can expose proprietary code context, secrets present in viewed files, or other sensitive development information to unintended later access on the local system.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring describes the app as "基础架构和文件浏览" and the startup banner repeats only file browsing capabilities, which suggests a limited browser/viewer role. However, the code also sends file contents to an external DeepSeek API for explanation generation and stores explanation content in a local SQLite database, which is a materially broader behavior than the stated documentation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The file's title and many user-visible strings are in Chinese, suggesting the application is tailored to a single language/locale. There is no visible indication in this file that users can choose another language or explicitly opt into Chinese-only behavior.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

The application sets Access-Control-Allow-Origin: * while also allowing Authorization headers and Access-Control-Allow-Credentials: true, creating an unsafe cross-origin posture. Combined with unauthenticated file-browsing and explanation endpoints, this makes it easier for arbitrary websites to script access to the service from a victim's browser and read workspace contents or trigger external data transmission.

Content

Scanner excerpt · app.py (reported line 21)May include surrounding context.

python
app = Flask(__name__)

# CORS支持 - 允许前端跨域访问
@app.after_request
def add_cors_headers(response):
    response.headers['Access-Control-Allow-Origin'] = '*'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The test endpoint makes a credential-backed outbound request to the external AI provider but does not clearly disclose that the service is contacting a third party. Although this specific call uses test content rather than workspace data, it still creates undisclosed external communication and can reveal service usage patterns or enable unintended network egress.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

This outbound HTTP request sends data to an external API endpoint, creating network egress from the application. In context, the specific payload is a connection test rather than sensitive workspace content, so the risk is lower than the explain path, but it still expands the attack surface and may violate least surprise if exposed to untrusted users.

Content

Scanner excerpt · app.py (reported line 306)May include surrounding context.

python
}
        
        start_time = time.time()
        response = requests.post(DEEPSEEK_API_URL, headers=headers, json=payload, timeout=30)
        elapsed = time.time() - start_time
        
        if response.status_code == 200:

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This request transmits file content from the workspace to an external AI API for processing. In a file-browsing skill, that context makes the issue more dangerous because users may browse repositories containing source code, secrets, or internal documents, all of which can be disclosed to a third party through this call.

Content

Scanner excerpt · app.py (reported line 485)May include surrounding context.

python
}
        
        print(f"[AI解释] 发送请求到DeepSeek API,超时: {EXPLANATION_TIMEOUT}秒")
        response = requests.post(
            DEEPSEEK_API_URL,
            headers=headers,
            json=payload,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The explain endpoint reads arbitrary workspace files and sends their contents to an external AI service using a credential-backed API without any user consent, warning, or file-classification guard. In a workspace browser context, this can exfiltrate proprietary code, secrets, credentials, or sensitive documents to a third party simply by invoking the endpoint.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

Lines L11-L14 and L31-L35 frame the feature as code explanation configuration, while L47-L49 defines a remote API URL for DeepSeek chat completions. This is an intent-level contradiction because the documentation suggests explanation behavior without disclosing that source code may be transmitted to an external service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The system message and prompt template explicitly require the assistant to explain code in Chinese. This is a natural-language policy issue because the file hard-codes a specific language choice rather than offering the user a language or locale option.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The configuration hardcodes an external API endpoint for code explanation, implying workspace code may be transmitted to a third-party service. In the context of a workspace browser handling potentially sensitive local code, this creates a real confidentiality risk if users are unaware or if secrets, proprietary code, or credentials are included in files sent for explanation.

Content

Scanner excerpt · config.py (reported line 48)May include surrounding context.

python
EXPLANATION_PROMPT_TEMPLATE = "请简要解释以下{language}代码的核心功能、实现逻辑和算法:\n\n{code}"

# DeepSeek API配置
DEEPSEEK_API_URL = "https://api.deepseek.com/v1/chat/completions"
DEEPSEEK_API_KEY = ""  # 需要用户自己配置

# 显示配置

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script uses a broad pkill -f "python3.*app.py" before startup, which can terminate unrelated Python processes whose command lines happen to match the pattern. This creates a denial-of-service risk on shared systems and does so without user confirmation, process ownership checks, or PID tracking.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

All user-facing strings in this file are presented in Chinese, and there is no visible mechanism for user language selection or opt-in. That creates a natural-language locale constraint that may violate organizational policy when language choice is required.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The UI triggers AI explanation generation via /api/explain/... and presents it as a convenience feature, but the user-facing flow does not clearly warn that file contents may be sent to an external AI provider. In a workspace/file-browser context, users may open sensitive source code, secrets, or proprietary files, so silent or weak disclosure can cause unintended data exfiltration to a third party.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

All user-facing documentation in this file is presented in Chinese, with no indication that other languages are supported or that the Chinese-only presentation is intentional for a region-specific use case. Under the language/locale policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The docstring for generate_explanation_for_file says the fallback behavior is to return simulated data when DeepSeek fails. In practice, the caller later persists that mock fallback text to the database and may relabel the source as database-backed, which goes beyond a transient mock response and can misrepresent the nature of the stored explanation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest description is written entirely in Chinese, which may imply a fixed language experience without any stated opt-in, choice, or region-specific justification. This can conflict with language/locale policy requirements when a skill is not clearly limited to Chinese-speaking users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description is written only in Chinese ("Workspace文件浏览器"), which can impose a language choice on users without offering an alternative or explaining a locale-specific constraint. This is a natural-language policy concern because the file provides no indication that the skill is intended only for Chinese-speaking or region-specific use.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified as flask>=2.3.0, which allows installation of any future Flask release and prevents reproducible builds. Unpinned dependencies increase supply-chain risk because a later vulnerable or malicious upstream release could be pulled without review, and they also make it impossible to verify exactly which version is deployed.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
flask>=2.3.0

Unverifiable Dependency: flask has 10 known advisory(ies) (CVE-2025-47278 (Flask uses fallback key instead of current signing key); CVE-2018-1000656 (Flask is vulnerable to Denial of Service via incorrect encoding of JSON data); CVE-2019-1010083 (Pallets Project Flask is vulnerable to Denial of Service via Unexpected memory u) +7 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The manifest references flask without pinning to a specific version, while the package has multiple known advisories across its release history. Because the actual installed version is unconstrained above 2.3.0, you cannot determine from this file alone whether deployment will select a fixed release or one affected by known Flask vulnerabilities, creating avoidable exposure and weak auditability.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The comments and echoed status messages are presented in Chinese only, which imposes a specific language on users without opt-in or alternative locale support. This can violate language or locale policy when the skill is not clearly documented as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This file contains natural-language comments and apparent product-facing terminology in Chinese, but there is no surrounding indication that the skill is intentionally region-specific or that users can opt into this locale. Under the language/locale policy, forcing a specific language without documented justification or choice can be a policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

At L1139 the comment says the explanation tab content is a 'placeholder' (占位符), which implies non-functional or stub behavior. In reality, nearby code supports full functionality including live AI analysis messaging, and elsewhere this module calls real endpoints to generate, load, and save explanations, so the comment materially misrepresents implemented behavior.

Content

No source excerpt is available for this finding.