Back to skill

Security audit

Superhero.com Agent Skill - Posting & Trading Trends

Security checks for vulnerabilities and agentic risk

Overview

This skill can spend wallet funds and post publicly on-chain on a schedule, while handling private keys unsafely and encouraging promotion of held tokens.

Install only if you are comfortable giving the agent a dedicated low-balance æternity wallet, public on-chain posting authority, and possible autonomous trading authority. Do not use a main wallet or paste/import valuable private keys through command arguments or logs; review and disable any strategy that posts about assets it currently holds.

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
scripts/superhero-wallet.mjs:19
Finding
Wallet Private Keys Are Exposed Through Process Arguments, Standard Output, and Plaintext Shell Configuration<![CDATA[ ## Vulnerability Details **File Location**: `scripts/superhero-wallet.mjs:19-25`, `scripts/superhero-wallet.mjs:53-63`, `SKILL.md:65-84`, `guides/setup.md:21-40` **Vulnerability Type**: Sensitive credential exposure through command-line arguments, terminal output, and plaintext persistence **Risk Level**: High ### Vulnerable Code `scripts/superhero-wallet.mjs:19-25`: ```js function generateWallet() { const account = MemoryAccount.generate(); console.log(JSON.stringify({ success: true, address: account.address, AE_PRIVATE_KEY: account.secretKey, next_step: `export AE_PRIVATE_KEY=${account.secretKey}`, warning: 'Save this private key securely. Back it up offline. Never commit it to git.', })); } ``` `scripts/superhero-wallet.mjs:53-63`: ```js function importWallet(secretKey) { if (!secretKey) { console.error('Usage: node scripts/superhero-wallet.mjs import <secretKey>'); process.exit(1); } const account = new MemoryAccount(secretKey); console.log(JSON.stringify({ success: true, address: account.address, next_step: `export AE_PRIVATE_KEY=${secretKey}`, warning: 'Save this private key securely. Back it up offline. Never commit it to git.', })); } ``` `guides/setup.md:21-40`: ```bash node {baseDir}/scripts/superhero-wallet.mjs generate ``` This outputs a new `AE_PRIVATE_KEY` and `address`. Set the environment variable before running any other script: ```bash export AE_PRIVATE_KEY=<your_secret_key> ``` For persistence across sessions, add it to `~/.zshenv` or `~/.profile` (never commit this to git). ```bash node {baseDir}/scripts/superhero-wallet.mjs import "<secret_key>" ``` ### Technical Analysis The wallet import interface accepts a private key as a positional command-line argument. Command-line arguments can be exposed through shell history, process inspection facilities, terminal recording, audit systems, job runners, and agent execution transcripts. Both wallet generation and w ...[truncated 2833 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Remove command-line private-key import** - Do not accept private keys through `process.argv`. - Read an existing key from a hidden interactive TTY prompt, a protected file descriptor, or a dedicated secret manager. - Ensure interactive input disables terminal echo. - Reject secret-bearing positional arguments to prevent accidental legacy use. 2. **Stop emitting secrets through standard output** - Return only non-sensitive information such as the public wallet address and setup status. - Do not include the private key in JSON, `next_step`, errors, debugging output, or agent-readable terminal results. - Ensure exception handlers and SDK debugging modes cannot serialize the account object. 3. **Use secure wallet storage or an external signer** - Prefer an OS keychain, hardware wallet, encrypted keystore, or wallet service that signs transactions without disclosing raw key material. - Apply restrictive filesystem permissions if an encrypted keystore is used. - Keep decryption credentials separate from the encrypted wallet file. 4. **Replace plaintext shell-profile persistence** - Remove instructions to write the private key to `~/.profile`, `~/.zshenv`, `~/.bash_profile`, or similar files. - Document secure secret injection through the agent platform or a trusted secret manager. - If environment variables remain supported for compatibility, clearly warn that inherited process environments may be readable and recommend a dedicated low-balance wallet. 5. **Harden wallet generation** - Require an explicit, local, secure interactive workflow before revealing a newly generated recovery secret. - Display it only through a channel excluded from agent transcripts and centralized logging. - Require confirmation that the user stored the recovery material securely before discarding it from memory. - Never duplicate the secret in multiple output fields. 6. **Rotate exposed credentials ...[truncated 322 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (43)

Intent-Code Divergence

High
Confidence
88% confidence
Finding
The guide says autonomous trading requires an explicitly chosen strategy, but the aggressive strategy later instructs the agent to cross-post about tokens it currently holds to generate demand. That couples financial self-interest with automated promotional behavior, creating a manipulative workflow that can mislead audiences and expose the user to policy, legal, and reputational risk.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The instruction to cross-post about currently held tokens to generate community interest expands the agent from analysis/trading into market manipulation or coordinated promotion. Because the agent both acquires positions and then promotes them, it creates a direct pump-like mechanism that can distort markets and harm other users.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
Authorizing automated promotion of owned tokens is not a necessary extension of a social-network trading assistant and introduces a high-risk capability unrelated to normal portfolio management. In this context, the skill's ability to post on Superhero makes the promotional instruction more dangerous because it can directly influence the same market in which it trades.

Missing User Warnings

High
Confidence
97% confidence
Finding
The auto-trading loop describes autonomous token purchases and sales based on trending and decline signals, but does not prominently warn that enabling it can repeatedly execute transactions affecting wallet funds without per-trade review. This is especially dangerous in an autonomous agent skill because market volatility, manipulated trending signals, or poor thresholds could trigger rapid losses across multiple runs.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The script generates fresh blockchain keypairs and embeds each private/secret key directly into the returned invite link (`https://superhero.com#invite_code=<secretKey>`), then prints those links to stdout. Any process, shell history, logs, CI runner, terminal recorder, or downstream caller that sees this output can steal the secret key and redeem or drain the funded invite account, so the invite reward is effectively bearer access to on-chain funds.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The script prints generated or imported private keys and shell export commands containing the secret directly to stdout. This is dangerous because terminal output is frequently captured in shell history, CI logs, orchestration logs, screen recordings, and support transcripts, which can lead to immediate wallet compromise and irreversible asset theft.

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill exposes operations involving environment secrets and networked blockchain actions but does not declare explicit tool scope boundaries such as allowed tools or permissions. In an agent setting, this increases the chance of overbroad tool access and unintended execution of sensitive actions like wallet operations, posting, token creation, or trading beyond the user’s intent.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The description is broad and encourages autonomous social posting and token trading without clear trigger boundaries for when the skill should activate. In practice, this can cause the agent to invoke a financially sensitive skill in loosely related contexts, increasing the risk of accidental wallet use, market actions, or irreversible on-chain posts.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The documentation tells users to export a private key directly in the shell but omits warnings that command lines may be captured in shell history, process lists, terminal scrollback, or shared session tooling. Because this skill manages real blockchain funds, exposing the private key could lead to full wallet compromise and irreversible asset loss.

Whitespace Padding

Medium
Category
Prompt Injection
Content
## Capabilities

| Task                  | Guide                                                                                                                  | Quick Command                                                         |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Post**              | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-post.mjs "message"`                 |
| **Read posts**        | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-read.mjs my-posts`                  |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| Task                  | Guide                                                                                                                  | Quick Command                                                         |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Post**              | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-post.mjs "message"`                 |
| **Read posts**        | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-read.mjs my-posts`                  |
| **Comments**          | `{baseDir}/guides/commenting.md`                                                                                       | `node {baseDir}/scripts/superhero-comment.mjs post <post_id> "text"`  |
| **Create token**      | read `{baseDir}/guides/token-creation.md`                                                                              | `node {baseDir}/scripts/superhero-token-create.mjs create "NAME" 0.1` |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| Task                  | Guide                                                                                                                  | Quick Command                                                         |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Post**              | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-post.mjs "message"`                 |
| **Read posts**        | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-read.mjs my-posts`                  |
| **Comments**          | `{baseDir}/guides/commenting.md`                                                                                       | `node {baseDir}/scripts/superhero-comment.mjs post <post_id> "text"`  |
| **Create token**      | read `{baseDir}/guides/token-creation.md`                                                                              | `node {baseDir}/scripts/superhero-token-create.mjs create "NAME" 0.1` |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| Task                  | Guide                                                                                                                  | Quick Command                                                         |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Post**              | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-post.mjs "message"`                 |
| **Read posts**        | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-read.mjs my-posts`                  |
| **Comments**          | `{baseDir}/guides/commenting.md`                                                                                       | `node {baseDir}/scripts/superhero-comment.mjs post <post_id> "text"`  |
| **Create token**      | read `{baseDir}/guides/token-creation.md`                                                                              | `node {baseDir}/scripts/superhero-token-create.mjs create "NAME" 0.1` |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| Task                  | Guide                                                                                                                  | Quick Command                                                         |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Post**              | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-post.mjs "message"`                 |
| **Read posts**        | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-read.mjs my-posts`                  |
| **Comments**          | `{baseDir}/guides/commenting.md`                                                                                       | `node {baseDir}/scripts/superhero-comment.mjs post <post_id> "text"`  |
| **Create token**      | read `{baseDir}/guides/token-creation.md`                                                                              | `node {baseDir}/scripts/superhero-token-create.mjs create "NAME" 0.1` |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| --------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Post**              | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-post.mjs "message"`                 |
| **Read posts**        | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-read.mjs my-posts`                  |
| **Comments**          | `{baseDir}/guides/commenting.md`                                                                                       | `node {baseDir}/scripts/superhero-comment.mjs post <post_id> "text"`  |
| **Create token**      | read `{baseDir}/guides/token-creation.md`                                                                              | `node {baseDir}/scripts/superhero-token-create.mjs create "NAME" 0.1` |
| **Buy/sell tokens**   | read `{baseDir}/guides/trading.md`                                                                                     | `node {baseDir}/scripts/superhero-token-swap.mjs buy ct_... 5`        |
| **Trending**          | read `{baseDir}/guides/trading.md`                                                                                     | `node {baseDir}/scripts/superhero-trending.mjs tokens 10`             |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| --------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Post**              | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-post.mjs "message"`                 |
| **Read posts**        | read `{baseDir}/guides/posting.md`                                                                                     | `node {baseDir}/scripts/superhero-read.mjs my-posts`                  |
| **Comments**          | `{baseDir}/guides/commenting.md`                                                                                       | `node {baseDir}/scripts/superhero-comment.mjs post <post_id> "text"`  |
| **Create token**      | read `{baseDir}/guides/token-creation.md`                                                                              | `node {baseDir}/scripts/superhero-token-create.mjs create "NAME" 0.1` |
| **Buy/sell tokens**   | read `{baseDir}/guides/trading.md`                                                                                     | `node {baseDir}/scripts/superhero-token-swap.mjs buy ct_... 5`        |
| **Trending**          | read `{baseDir}/guides/trading.md`                                                                                     | `node {baseDir}/scripts/superhero-trending.mjs tokens 10`             |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| **Create token**      | read `{baseDir}/guides/token-creation.md`                                                                              | `node {baseDir}/scripts/superhero-token-create.mjs create "NAME" 0.1` |
| **Buy/sell tokens**   | read `{baseDir}/guides/trading.md`                                                                                     | `node {baseDir}/scripts/superhero-token-swap.mjs buy ct_... 5`        |
| **Trending**          | read `{baseDir}/guides/trading.md`                                                                                     | `node {baseDir}/scripts/superhero-trending.mjs tokens 10`             |
| **Holdings**          | read `{baseDir}/guides/portfolio.md`                                                                                   | `node {baseDir}/scripts/superhero-portfolio.mjs holdings`             |
| **Portfolio history** | read `{baseDir}/guides/portfolio.md`                                                                                   | `node {baseDir}/scripts/superhero-portfolio.mjs history`              |
| **Transactions**      | read `{baseDir}/guides/portfolio.md`                                                                                   | `node {baseDir}/scripts/superhero-transactions.mjs token ct_...`      |
| **Invite links**      | Generate invite links with AE rewards. Links contain one-time secrets — share them directly, never log or commit them. | `node {baseDir}/scripts/superhero-invite.mjs generate 1 5`            |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| **Create token**      | read `{baseDir}/guides/token-creation.md`                                                                              | `node {baseDir}/scripts/superhero-token-create.mjs create "NAME" 0.1` |
| **Buy/sell tokens**   | read `{baseDir}/guides/trading.md`                                                                                     | `node {baseDir}/scripts/superhero-token-swap.mjs buy ct_... 5`        |
| **Trending**          | read `{baseDir}/guides/trading.md`                                                                                     | `node {baseDir}/scripts/superhero-trending.mjs tokens 10`             |
| **Holdings**          | read `{baseDir}/guides/portfolio.md`                                                                                   | `node {baseDir}/scripts/superhero-portfolio.mjs holdings`             |
| **Portfolio history** | read `{baseDir}/guides/portfolio.md`                                                                                   | `node {baseDir}/scripts/superhero-portfolio.mjs history`              |
| **Transactions**      | read `{baseDir}/guides/portfolio.md`                                                                                   | `node {baseDir}/scripts/superhero-transactions.mjs token ct_...`      |
| **Invite links**      | Generate invite links with AE rewards. Links contain one-time secrets — share them directly, never log or commit them. | `node {baseDir}/scripts/superhero-invite.mjs generate 1 5`            |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| **Create token**      | read `{baseDir}/guides/token-creation.md`                                                                              | `node {baseDir}/scripts/superhero-token-create.mjs create "NAME" 0.1` |
| **Buy/sell tokens**   | read `{baseDir}/guides/trading.md`                                                                                     | `node {baseDir}/scripts/superhero-token-swap.mjs buy ct_... 5`        |
| **Trending**          | read `{baseDir}/guides/trading.md`                                                                                     | `node {baseDir}/scripts/superhero-trending.mjs tokens 10`             |
| **Holdings**          | read `{baseDir}/guides/portfolio.md`                                                                                   | `node {baseDir}/scripts/superhero-portfolio.mjs holdings`             |
| **Portfolio history** | read `{baseDir}/guides/portfolio.md`                                                                                   | `node {baseDir}/scripts/superhero-portfolio.mjs history`              |
| **Transactions**      | read `{baseDir}/guides/portfolio.md`                                                                                   | `node {baseDir}/scripts/superhero-transactions.mjs token ct_...`      |
| **Invite links**      | Generate invite links with AE rewards. Links contain one-time secrets — share them directly, never log or commit them. | `node {baseDir}/scripts/superhero-invite.mjs generate 1 5`            |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
| **Invite links**      | Generate invite links with AE rewards. Links contain one-time secrets — share them directly, never log or commit them. | `node {baseDir}/scripts/superhero-invite.mjs generate 1 5`            |
| **Wallet/balance**    | read `{baseDir}/guides/setup.md`                                                                                       | `node {baseDir}/scripts/superhero-wallet.mjs balance`                 |
| **Name (AENS)**       | Names are on-chain usernames (.chain). Use 13+ char names to skip auctions.                                            | `node {baseDir}/scripts/superhero-name.mjs register myagentname`      |
| **Autonomous mode**   | read `{baseDir}/guides/autonomous.md`                                                                                  | Configured via cron + strategy in config                              |

Read the relevant guide for detailed instructions before executing a task.
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The manifest describes an agent for posting tamperproof content, creating tokens, and trading trending tokens on æternity. This ACI additionally defines substantial community-governance and referral-system functionality, including moderators, muting user IDs, invitation code management, affiliation trees, and reward withdrawals, which goes beyond the stated core scope rather than serving as an obvious implementation detail of token trading.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The manifest describes the skill as creating tokens and trading trending tokens on the æternity blockchain, but this contract interface also exposes ongoing supply-control operations via `burn` and `mint`. Those owner-style administrative token-management functions materially expand behavior beyond simple token creation and trading.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The guide encourages fully automated trading and posting without a clear upfront warning that the agent can lose funds, execute trades on a schedule, and publish content from the user's account. Missing risk disclosure is especially problematic here because the skill controls financial assets and public-facing actions, so users may enable automation without understanding the consequences.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The guide gives conflicting instructions about whether posting should require fresh user confirmation after each trading cycle or run autonomously on a fixed schedule. In an autonomous agent that can both trade and post, ambiguity in consent boundaries can lead to unintended account actions, especially public posts that the user did not clearly authorize.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The guide instructs users how to post comments on-chain but does not clearly warn that the content becomes public, effectively permanent, and tied to a blockchain transaction that incurs real cost. Users may unknowingly publish sensitive information or trigger paid transactions under the mistaken assumption that comments are ordinary editable social-network replies.

Static analysis

Detected: suspicious.exposed_secret_literal, suspicious.potential_exfiltration

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/superhero-wallet.mjs:23

Sensitive-looking file read is paired with a network send.

Warn
Code
suspicious.potential_exfiltration
Location
scripts/superhero-token-swap.mjs:27