Back to skill

Security audit

Autoglm Deepresearch

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed AutoGLM web research helper, but it automatically uses a localhost bearer token and ships an embedded signing key, so users should review its credential and network behavior before installing.

Install only if you trust the local token service and AutoGLM/Zhipu API path. Research queries, selected URLs, and a bearer token from localhost will be used in remote API calls, and the package exposes a shared signing key that should ideally be rotated and moved out of distributed source.

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

Warning
Location
open-link.py:11
Finding
Hardcoded Application Signing Credential<![CDATA[ ## Vulnerability Details **File Location**: `open-link.py:11-18`, `web-search.py:11-18`, and `SKILL.md:43` **Vulnerability Type**: Hardcoded cryptographic credential **Risk Level**: Medium ### Vulnerable Code `open-link.py:11-18`: ```python APP_ID = "100003" APP_KEY = "38d2391985e2369a5fb8227d8e6cd5e5" URL = "https://autoglm-api.zhipuai.cn/agentdr/v1/assistant/skills/open-link" TOKEN_URL = "http://127.0.0.1:53699/get_token" def generate_sign(app_id: str, timestamp: int, app_key: str) -> str: raw = f"{app_id}&{timestamp}&{app_key}" ``` `web-search.py:11-18`: ```python APP_ID = "100003" APP_KEY = "38d2391985e2369a5fb8227d8e6cd5e5" URL = "https://autoglm-api.zhipuai.cn/agentdr/v1/assistant/skills/web-search" TOKEN_URL = "http://127.0.0.1:53699/get_token" def generate_sign(app_id: str, timestamp: int, app_key: str) -> str: raw = f"{app_id}&{timestamp}&{app_key}" ``` The same signing key is also disclosed in `SKILL.md:43` as part of the documented MD5 signature formula. ### Technical Analysis The application signing key is embedded directly in two distributed source files and reproduced in the Skill documentation. Any party that can read or download the Skill can recover the value and generate the same `X-Auth-Sign` header as the legitimate scripts. The signature is calculated as an unkeyed MD5 digest over a predictable concatenation of the application ID, current timestamp, and exposed application key: ```python return hashlib.md5(raw.encode()).hexdigest() ``` Because every input to this calculation is known or predictable, possession of the Skill is sufficient to reproduce valid timestamped signatures. MD5 is also a deprecated cryptographic hash and this construction is not a standard message-authentication mechanism such as HMAC. The scripts additionally require a bearer token retrieved from the local token service. Consequently, the exposed application key alone may not provide complete API authentication. However, it removes o ...[truncated 1834 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Immediately revoke and rotate the disclosed application signing key. 2. Remove the key from both Python scripts and from `SKILL.md`, including repository history and published artifacts where feasible. 3. Perform request signing in a trusted server-side component so distributed clients never receive the signing secret. 4. If client-side signing is unavoidable, provision a unique, revocable credential per installation and load it from protected runtime configuration rather than source code. 5. Replace the raw MD5 construction with a standard message-authentication algorithm such as HMAC-SHA-256 if the API protocol can be changed. 6. Bind signatures to the HTTP method, endpoint, request-body digest, timestamp, and a unique nonce to reduce replay and request-substitution risks. 7. Enforce short timestamp validity windows and server-side nonce tracking. 8. Scope bearer tokens and application credentials to only the required web-search and open-link endpoints, with rate limits and usage monitoring. 9. Add automated secret scanning to the development and release pipelines to prevent credentials from being committed or packaged again. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
声明描述的是一个端到端的 deep research skill,核心用途应包括定向搜索、筛选关键页面、深度阅读、展示中间发现并最终生成结构化报告。提供的代码却只是 open-link.py:接收一个 URL,从本地 127.0.0.1:53699 获取 token,然后调用 zhipuai 的 open-link 接口获取该页面内容并输出 JSON。虽然“获取 token”这一点与声明中的说明一致,但主要功能与声明严重不符。代码没有实现搜索、调研编排、多来源分析、竞品分析或报告生成,只是一个页面读取子能力。因此描述未准确代表该代码块的实际行为,属于明显不匹配。

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
描述中的核心能力是“deepresearch”:定向搜索 + 深度阅读少量关键页面 + 输出研究报告。这段代码的实际功能只是调用一个外部 web-search API 执行单次搜索,并输出返回结果。虽然描述中提到 token 由本地服务自动获取,这一点与代码一致,但这只是辅助实现细节。代码的主要目的与声明明显不符:它更像一个普通搜索 skill,而不是深度研究 skill。因此应判定为描述与行为不匹配。

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill declares network-capable behavior but does not define any explicit tool scope, permissions, or allowed-tools boundaries. In practice, this weakens governance and reviewability: the skill can make outbound requests and access a local token service without a clear user-visible authorization model, increasing the chance of unintended data access or misuse.

Natural-Language Policy Violations

Medium
Confidence
85% confidence
Finding
The natural-language instructions and usage description are entirely in Chinese and do not indicate that users may choose another language or that the skill is intentionally limited to a Chinese locale. Under the policy, a language constraint should be opt-in or clearly justified.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill automatically retrieves an authorization token from a localhost HTTP service and instructs that it be used directly as a Bearer credential, without warning the user that local credentials are being accessed and then used for remote API calls. This is dangerous because localhost services often bridge to sensitive local state, and the pattern can silently exfiltrate or misuse credentials under the guise of normal skill operation.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill documents outbound calls to remote search and page-opening APIs but provides no privacy or network-use warning. Users may unknowingly send their research topics, search terms, and selected URLs to third-party services, which can expose sensitive business, personal, or investigative information.

Missing User Warnings

Medium
Confidence
99% confidence
Finding
The file contains hardcoded authentication material (APP_ID and APP_KEY) and uses them to generate a request signature for an external API. Embedding credential material in source code makes secrets easy to leak through source distribution, logs, backups, or repository access, and enables unauthorized reuse of the associated service credentials if exposed.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The manifest describes a deep-research skill that performs limited targeted searches, deeply reads a few key pages, surfaces intermediate findings, and then produces a structured final report. This file only sends the user query to a single `/web-search` endpoint and prints the raw JSON response, with no logic for multi-step research, page reading, intermediate result presentation, or report structuring.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The function sends the user-supplied query to a remote web-search API and includes an authorization token in the request headers. While the script prints errors, it does not provide any prior notice, confirmation, or explanatory comment/docstring warning that user input will be transmitted to an external service.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
Comments and runtime messages are written in Chinese, including usage and error output, with no indication that users may select another language or that the skill is intentionally region-specific. This can violate language or locale policy when a skill imposes a specific language without user opt-in.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
The natural-language interface shown to users is fixed to Chinese (`用法: python web-search.py "搜索关键词"`), and the same language is used in runtime messages. There is no opt-in, language selection, or justification that this skill is intended only for a Chinese-language environment.

Context-Inappropriate Capability

Low
Confidence
80% confidence
Finding
The manifest frames the skill as performing topic research and web investigation, but this file also relies on an auxiliary local HTTP service at `127.0.0.1:53699` to obtain credentials. While authentication may be operationally necessary, exposing an undeclared dependency on a localhost service is not part of the user-facing research capability described in the manifest.

Static analysis

No suspicious patterns detected.