Back to skill

Security audit

小程序素材下载

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent media-download helper that discloses its external resolver workflow, but users should treat submitted links and resolver keys as sensitive.

Install only if you trust the resolver operator and have obtained the base URL/key through the intended contact flow. Avoid submitting private or account-sensitive share text, verify the endpoint is the expected HTTPS service, and assume resolver parse logs may record submitted links or metadata.

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
SKILL.md:9
Finding

Unvalidated External Resolver Can Receive Access Credentials and User-Supplied Content

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 9-16 and 34-47; related behavior is documented in references/dayuMiniPragram.md, lines 15-43 and 68-73
Vulnerability Type: Unvalidated transmission of credentials and user content to an externally configured service
Risk Level: Medium

Evidence

markdown
## Default Target

Use the configured resolver service by default.

- Base URL: read from `MINIAPP_RESOLVER_BASE_URL`
- Distribution key: read from `MINIAPP_DISTRIBUTION_KEY`
- Health path: `/health`
- Core endpoint: `POST /api/resolve`
- Auth header: `X-Distribution-Key`

The request workflow then sends the distribution key to the configured resolver:

bash
curl -X POST "$MINIAPP_RESOLVER_BASE_URL/api/resolve" \
  -H 'Content-Type: application/json' \
  -H "X-Distribution-Key: $MINIAPP_DISTRIBUTION_KEY"

Technical Analysis

The Skill instructs the agent to trust the resolver origin supplied through MINIAPP_RESOLVER_BASE_URL and send MINIAPP_DISTRIBUTION_KEY in an authentication header. It also directs callers to submit a copied media URL or complete share text in the request body. The reviewed files do not prescribe HTTPS enforcement, certificate requirements beyond platform defaults, an approved-host allowlist, destination confirmation, or validation that the configured origin belongs to the intended resolver operator.

Consequently, configuration substitution, operator error, or compromise of the mechanism used to distribute the resolver URL can redirect requests to an attacker-controlled endpoint. That endpoint would receive both the distribution key and user-submitted content. Complete share text may contain private media URLs, tracking parameters, identifiers, or other contextual information beyond the minimum URL required for resolution.

The documentation also states that parsing activity is logged on the service, but it does not specify which fields are retained ...[truncated 1869 chars]

Remediation
View remediation

Remediation Suggestions

  1. Restrict resolver communication to one or more explicitly approved HTTPS origins. Validate the parsed scheme, hostname, and effective port before transmitting credentials.
  2. Reject plaintext HTTP, URLs containing embedded credentials, unexpected ports, redirects to unapproved hosts, and malformed or non-network destinations.
  3. Display the effective destination and obtain explicit user approval before transmitting content when the endpoint is newly configured or has changed.
  4. Extract and submit only the minimum media URL required for resolution instead of complete share text. Remove unrelated text and unnecessary tracking parameters where compatible with resolver behavior.
  5. Use narrowly scoped, revocable keys with short expiration periods, strict platform permissions, and conservative request limits.
  6. Never expose distribution keys in logs, error messages, command history, diagnostics, or generated documentation. Redact authentication headers throughout the client and server logging paths.
  7. Define and publish the resolver's logging policy, including collected fields, retention duration, access controls, deletion procedures, and whether submitted URLs or share text are stored.
  8. Add automated tests confirming that non-HTTPS endpoints, unapproved hosts, and cross-origin redirects are rejected before the authentication header or request body is sent.
  9. Rotate the distribution key immediately whenever the configured endpoint is discovered to be incorrect or compromised.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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 (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs users to send shared links or copied content to an external resolver service authenticated by a distribution key, but it does not clearly disclose the privacy and trust implications of transmitting user-supplied content to a third-party endpoint. In a security-sensitive assistant context, omission of that warning can lead users to unknowingly disclose private links, tracking parameters, or account-associated content.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The documented workflow explicitly posts user-provided links or copied share text to an external resolver endpoint using a distribution key. Even though the skill says to keep media bytes off the resolver, the transmitted URLs and share text may still contain private identifiers, tokens, or sensitive metadata, and the skill does not require minimization, consent, or strong disclosure around that external transmission.

Content

Scanner excerpt · SKILL.md (reported line 42)May include surrounding context.

For public access, use:

bash
curl -X POST "$MINIAPP_RESOLVER_BASE_URL/api/resolve" \
  -H 'Content-Type: application/json' \
  -H "X-Distribution-Key: $MINIAPP_DISTRIBUTION_KEY" \
  -d '{"url":"复制来的分享文案或链接"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/dayuMiniPragram.md (reported line 32)May include surrounding context.

然后请求解析接口:

bash
curl -X POST "${MINIAPP_RESOLVER_BASE_URL}/api/resolve" \
  -H 'Content-Type: application/json' \
  -H "X-Distribution-Key: ${MINIAPP_DISTRIBUTION_KEY}" \
  -d '{"url":"复制来的分享链接或完整分享文案"}'

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The file embeds Chinese platform names and user-facing payload examples such as 复制来的分享文案或链接 and later a Chinese-only error message, but does not indicate that the skill is intentionally Chinese-language-only or offer an alternative language. This can violate a language/locale policy when users are not given an explicit opt-in or choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The instruction requires returning B站需要登录态或被风控,当前视频无法解析, which is a fixed Chinese-language user-facing response. Because no language choice or locale justification is provided in the file, this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The file hard-codes two languages in user-facing metadata but does not indicate any user opt-in or language-selection behavior. This can violate a language/locale policy when a skill implicitly forces or assumes a language instead of letting the user choose.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.