Back to skill

Security audit

hup-miniapp

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for building Hup wallet mini apps, but it relies on mutable remote instructions and ships a wallet demo that dynamically executes unpinned SDK code.

Install only if you are comfortable with the agent consulting Hup's live documentation during builds. Treat the bundled demo as a development reference, not production-ready code, and pin or control the SDK source before using it with real wallet sessions or deployed mini apps.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (2)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:26
Finding

Mutable Remote Specification Is Treated as Authoritative Agent Instruction

Content
View full analysis
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
references/demo-app.html:131
Finding

Demo Dynamically Executes Unpinned SDK Code from Multiple Unsafe Sources

Content
View full analysis
``` ### Technical Analysis The demo dynamically creates a script element and executes the first SDK source that loads successfully. Two unauthenticated same-origin paths are preferred over the declared official Hup SDK: ```javascript '/miniapp-sdk.js' '../../public/miniapp-sdk.js' ``` The final fallback, `https://hup.social/miniapp-sdk.js`, is also mutable and unversioned. None of the sources is validated using a cryptographic digest, Subresource Integrity, a signed manifest, or equivalent authenticity control. A file located at either preferred path can therefore impersonate the SDK. This is especially dangerous because the loaded code executes in the mini app's origin and initializes before the demo obtains the wallet provider. A substituted SDK can redefine the `sdk` and `hup` globals, intercep ...[truncated 2141 chars]
Remediation
View remediation
``` 5. If the SDK is served from the application origin, ensure it is part of the controlled build output and cannot be supplied by uploaded files or unrelated server routes. 6. Apply a restrictive Content Security Policy that permits scripts only from the selected trusted source and disallows unexpected script origins. 7. Pin deployed artifacts by digest and verify them during CI/CD deployment. 8. Clearly separate development and production loaders. Development fallback behavior must not be shipped in a production reference implementation. 9. Preserve host-side transaction validation and ensure confirmation dialogs display the complete destination, value, calldata, chain, and signing payload. ]]>
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 (2)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
(connect, sign, send, policy checks) is in `references/demo-app.html`.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/demo-app.html (reported line 130)May include surrounding context.

html
<pre id="log"></pre>

    <!-- Real mini apps load the SDK from the host: https://hup.social/miniapp-sdk.js
         This demo gets served from arbitrary places during development (Next's public/ root,
         Live Server from the repo root, a copied folder), so it tries each path in turn —
         a plain absolute /miniapp-sdk.js only works when public/ IS the server root. -->