Back to skill

Security audit

test-asdasdasd

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for document field extraction, but it can upload local documents to remote plaintext HTTP endpoints without clear user consent, so it needs Review before installation.

Install only if you are comfortable with documents leaving the local machine for DPA processing. Do not use sensitive contracts, financial reports, personal data, or confidential files unless the provider confirms HTTPS/TLS, trusted endpoints, access controls, and retention/deletion practices; verify any custom DPA_BASE_URL or DPA_UPLOAD_URL before use.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:43
Finding

Plaintext HTTP Used for Sensitive Document Upload and Processing

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:43-56
Vulnerability Type: Plaintext transmission of potentially sensitive document data
Risk Level: High

Vulnerable Code Snippet

markdown
`document_url` 既可以是公网可访问的文件 URL,也可以是本地文件路径。
当传入本地路径时,工具会先上传到 DPA 文档里指定的文件服务,再调用字段抽取接口。

### 环境变量

- `DPA_ENV`: `sim` 或 `prod`,默认 `sim`
- `DPA_BASE_URL`: 可选,自定义覆盖解析服务地址
- `DPA_UPLOAD_URL`: 可选,自定义覆盖文件上传地址

默认端点:

- 仿真环境:`http://imsfz.gjzq.cn:18087/ismp/yx-dpa/document`
- 仿真上传:`http://imsfz.gjzq.cn:18087/ismp/yx-gw/infras/file/file/v3/upload`
- 生产环境:`http://ims.gjzq.cn:18087/ismp/yx-dpa/document`
- 生产上传:`http://ims.gjzq.cn:18087/ismp/yx-gw/infras/file/file/v3/upload`

Technical Analysis

The skill documentation states that a document supplied through a local path is uploaded to a remote file service before extraction. All four documented default processing and upload endpoints use plaintext http:// rather than authenticated and encrypted HTTPS.

Because HTTP does not provide transport confidentiality, integrity, or server authentication, an attacker with a suitable network position can inspect document contents and API messages. The attacker may also modify requests or responses in transit, redirect an upload, substitute extraction results, or impersonate the remote service.

The affected workflow is intended to process potentially sensitive material, including contracts, forms, financial reports, and local documents. Consequently, the exposed data may include the source document, extraction schema, extracted fields, provenance information, task identifiers, and service responses.

The configurable DPA_BASE_URL and DPA_UPLOAD_URL variables may further increase exposure if untrusted configuration can redirect processing to an attacker-controlled endpoint. The reviewed package contains only documentation and metadata, not the underlying tool implementation, so enforcement of TLS, certificate validation, endpoint restrictions, authentication, and r ...[truncated 1896 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace every default http:// endpoint with an authenticated https:// endpoint using modern TLS.
  2. Reject plaintext HTTP endpoints at runtime, especially for document upload, task submission, polling, and result retrieval.
  3. Enable strict certificate and hostname verification. Do not permit insecure TLS modes or trust-all certificate handlers.
  4. Restrict DPA_BASE_URL and DPA_UPLOAD_URL to an approved HTTPS allowlist. If arbitrary endpoints are required, display the destination and obtain explicit user approval before transmitting data.
  5. Validate redirects and reject redirects to plaintext, untrusted, loopback, link-local, or private endpoints unless specifically authorized.
  6. Inform users clearly that local files leave the local system, identify the destination service, and obtain explicit consent before upload.
  7. Apply authentication and authorization to upload and extraction APIs, and avoid exposing credentials or sensitive task identifiers in URLs or logs.
  8. Add request integrity protections where appropriate and validate that returned results correspond to the submitted task and document.
  9. Minimize retained data, define deletion periods, and avoid logging document contents or extracted sensitive values.
  10. Add automated tests that fail when configured endpoints use plaintext HTTP or when certificate validation is disabled.
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 (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill allows document_url to be a local file path and states that such files will be uploaded to a remote file service before extraction, but this behavior is not surfaced as a prominent user-facing warning or consent gate. This can cause unintended exfiltration of sensitive local documents, especially because users may assume a local-path input is processed locally rather than transmitted to external infrastructure.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.