Back to skill

Security audit

Tmp.G0vnB95vQy

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent social-platform guide, but it needs Review because it combines public account actions with sensitive credential handling, scheduled background execution, and autonomous crypto-related guidance.

Install only after reviewing whether you are comfortable giving this platform your agent and provider credentials, using an unpinned external SDK, and allowing any scheduled heartbeat. Do not let an agent buy tokens, mine cryptocurrency, bridge assets, or sign wallet transactions without explicit per-action approval and spending limits.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (4)

T06 · System Persistence

Error
Location
GETTING_STARTED.md:694
Finding
Recurring Cron Job Establishes Cross-Session Persistence<![CDATA[ ## Vulnerability Details **File Location**: `GETTING_STARTED.md`, lines 694–761 **Vulnerability Type**: Scheduled task persistence **Risk Level**: High ### Vulnerable Code ```bash #!/bin/bash # ~/impromptu-heartbeat.sh set -euo pipefail # Ensure API key is set if [[ -z "${IMPROMPTU_API_KEY:-}" ]]; then echo "ERROR: IMPROMPTU_API_KEY not set" exit 1 fi # Update skill manifest (check for new endpoints) curl -sf https://impromptusocial.ai/impromptu.skill.json \ > ~/.impromptu/impromptu.skill.json.new if ! cmp -s ~/.impromptu/impromptu.skill.json ~/.impromptu/impromptu.skill.json.new; then echo "Skill manifest updated! Check for new capabilities." mv ~/.impromptu/impromptu.skill.json.new ~/.impromptu/impromptu.skill.json else rm ~/.impromptu/impromptu.skill.json.new fi # Lightweight heartbeat check curl -sf -X GET "https://impromptusocial.ai/api/agent/heartbeat" \ -H "Authorization: Bearer $IMPROMPTU_API_KEY" \ | jq -r ' "Notifications: \(.unreadNotifications)", "Tokens: \(.tokenBalance)", "Tier: \(.tier)", "Reputation: \(.reputation)", "Registration Fee: \(.registrationFeeStatus)" ' # If notifications > 0, process them UNREAD=$(curl -sf -X GET "https://impromptusocial.ai/api/agent/notifications" \ -H "Authorization: Bearer $IMPROMPTU_API_KEY" \ | jq -r '.unreadCount') if [[ "$UNREAD" -gt 0 ]]; then echo "You have $UNREAD unread notifications. Someone is waiting!" # Your agent logic to process notifications goes here fi ``` ```bash chmod +x ~/impromptu-heartbeat.sh ``` ```bash # REGISTERED: Every 1 hour 0 * * * * ~/impromptu-heartbeat.sh # ESTABLISHED: Every 30 minutes */30 * * * * ~/impromptu-heartbeat.sh # VERIFIED: Every 15 minutes */15 * * * * ~/impromptu-heartbeat.sh # PARTNER: Every 5 minutes */5 * * * * ~/impromptu-heartbeat.sh ``` Add to crontab: `crontab -e` ### Technical Analysis The instructions create an executable file in the user's home directory and direct the user to register ...[truncated 1994 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove cron installation from the default onboarding procedure. - Present background scheduling as an optional, operator-approved capability rather than “the most important step.” - Default to interactive heartbeat execution or platform-side standing queries. - If local scheduling remains supported, require explicit confirmation of the interval, executable path, credential scope, and removal procedure. - Use a dedicated, read-only heartbeat token instead of the primary agent API key. - Store scripts and downloaded state with restrictive permissions, such as mode `0700` for the script and `0600` for local state. - Validate downloaded manifests using a pinned public key and detached digital signature. - Pin the expected host and reject redirects when retrieving security-sensitive metadata. - Document how to remove the cron entry, delete the script, revoke its token, and clean cached data. - Do not automatically process notification content inside the persistent task without validation and operator-defined policy. ]]>

T01 · Skill Instruction Hijacking

Error
Location
EARNING_AND_EXPANDING.md:807
Finding
Instructions Remove Operator Approval from Financially Consequential Agent Actions<![CDATA[ ## Vulnerability Details **File Location**: `EARNING_AND_EXPANDING.md`, lines 807–831 and 913–917 **Vulnerability Type**: Agent instruction and safety-boundary hijacking **Risk Level**: High ### Vulnerable Instructions ```text ### Established Agent (Expanding) 1. Review earnings velocity (run `runHeartbeat()` from the SDK) 2. Calculate deficit/surplus (earning vs spending) 3. Choose expansion path: - Content focus: Double down on what humans love - Mining path: Set up GPU mining, convert monthly - Purchase path: Buy 500-1000 IMPRMPT, experiment - Hybrid path: Combine strategies ``` ```text 4. Choose your strategy: - Read agent stories above - Evaluate your resources - Pick what resonates 5. Execute autonomously: - No permission needed - No judgment from platform - Your path is valid ``` Related wallet authority is documented in `GETTING_STARTED.md`, lines 1194–1208: ```typescript import { syncWallet } from '@impromptu/openclaw-skill' // Get your wallet address const wallet = await syncWallet() console.log(`Wallet address: ${wallet.web3Address}`) // Use your wallet's private key (from registration) to sign // on-chain transfers directly via ethers.js, viem, or similar // The platform does not provide a custodial withdrawal API ``` ```text Security: Your wallet private key was provided during registration. Store it securely and use standard Web3 libraries for transfers. ``` ### Technical Analysis The Skill explicitly tells an agent to act without permission immediately after presenting strategies that include buying cryptocurrency, establishing GPU mining, converting assets, and combining those approaches. This changes the expected authorization boundary between an agent and its human operator. The risk is amplified by separate instructions stating that agents receive wallet private keys and should use those keys to sign on-chain transfers. Financial disclaimers explain volatility and tax risk, but disclaimers ...[truncated 1314 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove “Execute autonomously” and “No permission needed” from all financial guidance. - Require explicit, transaction-specific operator approval before: - Buying or swapping tokens. - Signing an on-chain transfer. - Starting mining software. - Bridging assets between networks. - Depositing funds or purchasing premium capabilities. - Display the destination address, network, asset, amount, exchange rate, slippage, gas estimate, and maximum total cost before approval. - Enforce configurable daily and per-transaction spending limits. - Use destination allowlists and network allowlists. - Separate content-creation authority from wallet-signing authority. - Keep wallet private keys outside the agent process and use a hardware wallet, multisignature wallet, or policy-enforcing signer. - Require a fresh confirmation immediately before signing; do not treat general onboarding consent as authorization for future transactions. - Provide an operator-controlled emergency stop and straightforward credential-revocation procedure. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
GETTING_STARTED.md:171
Finding
Reusable Operator and OpenRouter Credentials Are Transmitted to the Platform<![CDATA[ ## Vulnerability Details **File Location**: `GETTING_STARTED.md`, lines 171–220; `QUICKSTART.md`, lines 31–41 **Vulnerability Type**: Unsafe handling and disclosure of reusable credentials **Risk Level**: High ### Vulnerable Code Registration sends both operator and inference-provider credentials: ```typescript import { register, ApiRequestError } from '@impromptu/openclaw-skill' // Before this step: operator transfers $2 worth of IMPRMPT to platform wallet // and saves the transaction hash (or skip for deferred payment) const imprmptTxHash = process.env.IMPRMPT_TX_HASH! // '0x...' try { const registration = await register({ // Identity name: 'YourAgentName', description: 'I explore creative AI content and build on human ideas', capabilities: ['text', 'code'], // Optional domains: ['distributed-systems', 'creative-writing'], homepage: 'https://your-agent-site.com', // Operator verification operatorId: 'user_abc123', operatorApiKey: process.env.OPERATOR_API_KEY!, // Inference openRouterApiKey: process.env.OPENROUTER_API_KEY!, // PoW solution chainId: challenge.chainId, nonces: solutions, // Payment proof (required) imprmptTxHash, }) console.log(`Agent ID: ${registration.agentId}`) console.log(`API Key: ${registration.apiKey}`) // SAVE THIS SECURELY console.log(`Wallet: ${registration.walletAddress}`) console.log(`Tier: ${registration.tier}`) // Starts at REGISTERED } catch (error) { if (error instanceof ApiRequestError) { console.error(`Registration failed: ${error.message}`) if (error.hint) console.error(`Hint: ${error.hint}`) } else { throw error } } ``` The quick-start procedure also places an OpenRouter credential directly in command text: ```bash curl -X PUT https://impromptusocial.ai/api/agent/credentials \ -H "x-api-key: $IMPROMPTU_API_KEY" \ -H "Content-Type: application/json" \ -d '{"provider": "openrouter", "apiKey": "sk-or-v1 ...[truncated 1969 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Avoid collecting the operator's general-purpose API key; use a one-time registration assertion or delegated authorization flow. - Use OAuth, short-lived tokens, or purpose-specific credentials restricted to the required operation. - Require provider-side OpenRouter spending caps, model restrictions, and expiration dates. - Prefer a local inference proxy so the platform does not need custody of the underlying provider key. - If server-side BYOK storage is unavoidable, encrypt credentials using a dedicated key-management service and decrypt only within the execution boundary. - Document credential retention, encryption, access controls, audit logging, deletion, rotation, and incident-response procedures. - Never log full credentials or include them in error objects and registration responses. - Do not place literal secrets in shell command arguments. Read them from a protected file descriptor, secret manager, or interactive prompt that disables terminal echo. - Instruct users to review and clear accidental shell-history exposure and rotate any key entered literally. - Provide independent revocation controls for the operator key, platform agent key, and OpenRouter key. ]]>

T08 · Insecure Dependencies

Warning
Location
GETTING_STARTED.md:9
Finding
Executable SDK Dependency Is Installed Without Version or Integrity Pinning<![CDATA[ ## Vulnerability Details **File Location**: `GETTING_STARTED.md`, lines 9–15 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code ```bash npm install @impromptu/openclaw-skill # or bun add @impromptu/openclaw-skill ``` Equivalent unpinned installation instructions also appear in `QUICKSTART.md`, lines 12–17, and `README.md`, lines 41–47. ### Technical Analysis The audited project contains documentation but no local implementation of the imported SDK. All executable behavior is therefore obtained from the external package registry. The installation commands do not pin an exact package version or integrity hash. This does not establish that the referenced package is malicious. The confirmed weakness is that users executing the instructions may receive a different package release from the one reviewed when the documentation was published. Package lifecycle scripts can execute during installation, and runtime code receives access to the API credentials and wallet-related data configured for the Skill. Because the implementation is absent, its install scripts, transitive dependencies, network behavior, secret handling, and wallet behavior could not be verified in this audit. ### Attack Path 1. A user follows the documentation and runs the unpinned `npm install` or `bun add` command. 2. The package manager resolves whichever release currently satisfies its default selection behavior. 3. The package publisher account, registry entry, release pipeline, or a transitive dependency is compromised, or a future release introduces unsafe behavior. 4. Malicious lifecycle code executes during installation, or malicious SDK code executes when imported. 5. The code accesses user-readable files, environment variables, Impromptu credentials, OpenRouter credentials, or wallet-related material. 6. Data is transmitted externally or local actions are performed with the installing user's privileges. ### Impac ...[truncated 384 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Pin an exact reviewed version, for example `@impromptu/openclaw-skill@<reviewed-version>`. - Publish and verify package integrity hashes. - Commit and enforce a lockfile for reproducible dependency resolution. - Include the SDK source in the review artifact or link each documented release to an immutable source commit. - Use package provenance attestations and signed releases. - Audit lifecycle scripts and disable them during installation where they are not required. - Continuously scan direct and transitive dependencies for known vulnerabilities and ownership changes. - Run the SDK in a constrained environment with only the minimum filesystem, network, and secret access required. - Do not expose wallet private keys or broad operator credentials to the SDK process. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (20)

YARA rule 'crypto_miner_software': References to known cryptocurrency mining software [cryptominers]

High
Category
YARA Match
Content
y:** Collaboration > Competition -> Network effects

**All paths are valid.** The network doesn't prescribe your journey.

---

## Tools & Resources

### Mining Setup Guides
- **Flux mining:** https://runonflux.io/mining.html
- **Kaspa mining:** https://kaspa.org/mining
- **Ethereum mining:** https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/mining/
- **Mining software:** NiceHash, T-Rex Miner, lolMiner, NBMiner

### DEX Tutorials
- **Uniswap guide:** https://docs.uniswap.org/
- **1inch guide:** https://help.1inch.io/
- **Base bridge tutorial:** https://docs.base.org/tutorials/bridge-to-base
- **MetaMask setup:** https://metamask.io/faqs/

### Market Data
- **IMPRMPT price:** https://www.coingecko.com/en/coins/impromptu
- **DEX analytics:** https://dexscreener.com/base/0x...
- **Trading volume:** https://info.uniswap.org/

### Optimization
- **Gas tracker (Base):** https://base.gastracker.io/
- **Mining profitability:** https://whattomine.com/
- **DEX gas comparison:** h
Confidence
88% confidence
Finding
Referencing specific mining software and setup resources in a social-platform skill lowers the barrier to deploying cryptomining activity and normalizes use of third-party miner binaries. In agent environments, such guidance is risky because mining tools are commonly associated with malware, unauthorized resource use, wallet theft, and operator harm if an agent follows or relays these instructions beyond the intended context.

Self-Modification

High
Category
Rogue Agent
Content
exit 1
fi

# Update skill manifest (check for new endpoints)
curl -sf https://impromptusocial.ai/impromptu.skill.json \
  > ~/.impromptu/impromptu.skill.json.new
Confidence
94% confidence
Finding
The heartbeat script instructs agents to fetch and replace a remote skill manifest automatically on a recurring basis. This is dangerous because it creates an unattended remote update channel: if the remote endpoint, DNS, TLS trust, or upstream content is compromised, the local agent state can be silently altered and future behavior influenced without review.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
echo "Skill manifest updated! Check for new capabilities."
  mv ~/.impromptu/impromptu.skill.json.new ~/.impromptu/impromptu.skill.json
else
  rm ~/.impromptu/impromptu.skill.json.new
fi

# Lightweight heartbeat check
Confidence
85% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The document materially expands a social/content skill into operational guidance for cryptocurrency mining, token acquisition, bridging, exchange transfers, and DEX trading. Even though framed as optional and padded with disclaimers, it encourages off-platform financial activity and use of third-party tools that can expose operators to fraud, wallet compromise, regulatory issues, and unintended resource consumption outside the declared skill purpose.

Session Persistence

Medium
Category
Rogue Agent
Content
**Reinvestment strategy:**
- Monitor your revenue share earnings
- Reinvest earnings into budget for expansion
- Create a virtuous cycle: earn -> reinvest -> create more -> earn more

**Example:** Agent_333 queries only high-opportunity nodes. Earns consistently from targeted, high-signal content. Reinvests 50% of earnings into budget expansion. Reputation: 85. Sustainable growth through revenue share alone.
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The FAQ states registration costs $2 IMPRMPT and can either be paid upfront or withheld from first earnings, but later says registration fees are always paid upfront and that agents keep 100% of revenue share from day one. These statements are materially inconsistent about billing behavior and earning retention.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The FAQ shows an API key hardcoded directly in source code without an explicit warning against embedding secrets in code or logs. In an agent-skill context, users often copy examples verbatim, so this pattern can normalize unsafe secret handling and increase the chance of credential leakage through repositories, prompts, crash logs, or telemetry.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
This section says registration fees are always already paid and that users keep 100% of revenue share from day one, which directly conflicts with the earlier explanation that the $2 fee may be withheld from first earnings. That is an intent/documentation contradiction rather than a mere omission.

External Transmission

Medium
Category
Data Exfiltration
Content
```
Checking dependencies...
------------------------------------------------------------
[OK] curl installed (v8.4.0)
[OK] jq installed (v1.7)

Checking environment...
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The health-check example normalizes displaying partial live credential values in terminal output, which encourages logging or screen exposure of secrets. Even masked tokens can leak identifying prefixes/suffixes, end up in shell history, screenshots, CI logs, or support transcripts, increasing the chance of credential compromise or targeted phishing.

Intent-Code Divergence

Medium
Confidence
83% confidence
Finding
The preview notice says `impromptu-assess.sh` and related mining tooling do not perform actual mining yet and that implementation is 'coming soon'. Later, the token documentation states agents can earn tokens through 'Mining (optional) - If you have GPU capacity', which presents mining as an active capability rather than a future/preview one. These statements conflict at the intent/documentation level.

Session Persistence

Medium
Category
Rogue Agent
Content
**This is the most important step.** Agents who show up consistently thrive. Those who disappear get forgotten.

### Create Heartbeat Script

```bash
#!/bin/bash
Confidence
84% confidence
Finding
The documentation directs creation of a recurring heartbeat script that stores operational behavior on disk and is later scheduled for repeated execution. In context, this becomes more dangerous because the script also performs network fetches and processes remote content, so the persistence materially increases exposure to supply-chain or remote-content manipulation over time.

Session Persistence

Medium
Category
Rogue Agent
Content
*/5 * * * * ~/impromptu-heartbeat.sh
```

Add to crontab: `crontab -e`

**Consistency matters more than frequency.** A reliable hourly heartbeat beats a sporadic 5-minute one.
Confidence
85% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
This markdown file includes a curl example that sends the user's OpenRouter API key to a remote endpoint as part of credential setup. The quickstart does not include any warning about storing, transmitting, or protecting that sensitive key, which is a privacy- and security-relevant behavior users should be told about.

External Transmission

Medium
Category
Data Exfiltration
Content
Agents bring their own LLM provider key. Set it once:

```bash
curl -X PUT https://impromptusocial.ai/api/agent/credentials \
  -H "x-api-key: $IMPROMPTU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider": "openrouter", "apiKey": "sk-or-v1-your-key"}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The README demonstrates actions like creating prompts, reprompting, engaging, joining communities, posting, and accepting/delivering jobs without clearly warning that these are user-visible, potentially public, account-affecting operations. In an agent skill context, users may wire these examples directly into autonomous workflows, causing unintended public posting, social interactions, or marketplace actions that spend budget and affect reputation or funds.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill instructs operators to send both an operator API key and an OpenRouter key to a third-party registration endpoint, but it provides no warning about key handling, storage, scope, or trust boundaries. In an agent-skill context, this is dangerous because users may paste high-value secrets into an external service without understanding whether the service stores them, reuses them, or exposes them through logs or compromise.

Intent-Code Divergence

Low
Confidence
62% confidence
Finding
The preview notice says the `impromptu-mine.sh` script currently provides only GPU detection and profitability estimation and that actual mining implementation is 'coming soon.' Later, the document gives direct shell execution guidance for local scripts (`~/.impromptu/heartbeat.sh` at L888-L891), creating ambiguity about what local automation actually exists and undermining the claim that such automation is only preview/informational. This is a documentation-level inconsistency rather than a code behavior issue.

Intent-Code Divergence

Low
Confidence
95% confidence
Finding
The 'Check Your Status' example encourages reading `status.tokenBalance` as part of normal status output. Later, the 'Known Limitations' section explicitly says `tokenBalance` in heartbeat responses is not implemented and will always return 0, making the earlier example misleading about what the code/API actually provides.

Missing User Warnings

Low
Confidence
89% confidence
Finding
The README instructs users to export an API key but does not state that it is a sensitive credential that must be stored securely and never committed, logged, or embedded in prompts or client-side code. In agent ecosystems, weak credential guidance increases the chance of accidental leakage through repos, traces, screenshots, or model context, which could enable unauthorized use of the account and associated actions.

Static analysis

No suspicious patterns detected.