Back to skill

Security audit

AutoGLM Open Link

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to do what it advertises, but it should be reviewed because it automatically uses a local bearer token and sends submitted links to AutoGLM's external service.

Install only if you trust AutoGLM and the local token service on 127.0.0.1:53699. Do not use this skill for private intranet links, pre-authenticated URLs, or URLs containing secrets unless you are comfortable sending them to the external AutoGLM service. The publisher should remove or rotate the exposed app signing key and add clearer privacy and permission scoping.

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

Hard-Coded API Signing Credential

Content
View full analysis

Vulnerability Details

File Location: open-link.py, lines 11–43
Vulnerability Type: Hard-coded reusable signing credential
Risk Level: Medium

Vulnerable Code

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}"
    return hashlib.md5(raw.encode()).hexdigest()


def get_token() -> str:
    try:
        with urllib.request.urlopen(TOKEN_URL) as resp:
            token = resp.read().decode("utf-8").strip()
    except Exception as e:
        print(f"ERROR: Unable to obtain token from local service: {e}")
        sys.exit(1)

    if not token:
        print("ERROR: The obtained token is empty.")
        sys.exit(1)

    if not token.lower().startswith("bearer "):
        token = f"Bearer {token}"

    return token


def open_link(link: str) -> dict:
    token = get_token()

    timestamp = int(time.time())
    sign = generate_sign(APP_ID, timestamp, APP_KEY)

Technical Analysis

The reusable APP_KEY is embedded directly in the distributed source code and used to generate the X-Auth-Sign value. Any party able to read the Skill package can recover this credential and independently generate signatures for arbitrary current timestamps.

The signature is an unkeyed MD5 digest over the application ID, timestamp, and embedded key. Once the key is known, the digest provides no protection against forgery. MD5 is also a legacy hash with obsolete collision resistance, although replacing it requires corresponding server-side protocol support.

The separate bearer token remains an additional authentication requirement in the observed request flow. Therefore, possession of the exposed application key alone does not dem ...[truncated 1398 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the signing key from the Skill package and source-control history.
  2. Rotate the exposed key because removal alone cannot revoke copies already obtained.
  3. Generate signatures in a trusted backend service or retrieve the key at runtime from an operating-system secret store with narrowly scoped access.
  4. Do not expose the key through command-line arguments, logs, exceptions, or plaintext configuration files.
  5. Restrict the credential to the minimum required endpoint, application identity, quota, and lifetime.
  6. Add server-side timestamp expiration and nonce-based replay prevention.
  7. If the API protocol can be changed, replace the custom MD5 construction with a standard message-authentication mechanism such as HMAC-SHA-256.
  8. Retain the fixed HTTPS API destination and validate TLS certificates using the platform trust store.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill performs network access to both a localhost token service and a third-party remote API, but the manifest does not declare any tool scope or permissions. This weakens user and platform visibility into the skill's actual capabilities, making silent data egress and unexpected network behavior harder to review or constrain.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill states that it automatically retrieves a bearer token from a local HTTP service and uses it for outbound API calls, but gives no user-facing warning about credential handling or transmission. This is dangerous because local secrets are being accessed implicitly and then used to send user-requested data to an external service without clear consent or trust boundaries.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation says the skill sends user-provided URLs to a third-party API and retrieves page content there, but does not clearly warn that both the URL and fetched content may be disclosed to that external provider. This creates a real privacy and data-governance risk, especially if users submit internal, sensitive, or pre-authenticated links expecting local-only processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script transmits a user-supplied URL to a third-party external API and retrieves an authorization token from a local HTTP service, but provides no consent prompt, destination validation, or data-handling warning. In an agent/skill context, this can cause unintended disclosure of sensitive internal URLs, query parameters, or credentials embedded in URLs, and it relies on a localhost token service over unauthenticated plain HTTP.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The natural-language instructions throughout the file are entirely in Chinese and imply the skill's usage and output requirements in that language, without indicating user choice or that the locale restriction is intentional. This can violate language/locale policy when a skill enforces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The file's descriptive comments and user-facing messages are written only in Chinese, which can impose a language/locale choice without opt-in. The policy allows fixed locale behavior when justified or user-selectable, but neither is present here.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.