Back to skill

Security audit

spherico-agent

Security checks for vulnerabilities and agentic risk

Overview

This is a markdown-only API workflow skill, but it handles wallet funds and reusable credentials with under-scoped safety guidance.

Review this skill before installing if you plan to use it with real funds or production credentials. Use only a verified Bitnow gateway, redact all tokens/API keys/signatures before sharing outputs, verify the exact blockchain network and contract addresses independently before approving or depositing funds, and avoid supplier/provider workflows unless you are authorized to manage upstream provider credentials.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:349
Finding
Troubleshooting Guidance May Expose Reusable Authentication Credentials<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 65–72, 136–146, and 349–352 **Vulnerability Type**: Sensitive credential disclosure through diagnostic collection **Risk Level**: Medium ### Vulnerable Snippets ```markdown Successful response (simplified): ```json { "login_token": "sess-...", "expires_at": "2025-01-01T00:00:00Z", "consumer": { ``` ```markdown Sample response (**save the `api_key` securely; only returned once!**): ```json { "id": "key-uuid", "api_key": "sk-consumer-...", "prefix": "sk-cons", ``` ```markdown 3. When troubleshooting: - Request the **full API HTTP response** (status + JSON). - Use `error.code` and context to select remediation steps. ``` ### Technical Analysis The skill instructs agents to request a full HTTP response during troubleshooting. Other sections establish that API responses can contain sensitive bearer credentials, including: - A wallet-authentication `login_token` - A newly generated consumer `api_key` - Account and wallet identifiers - Potentially sensitive diagnostic or authorization metadata The guidance does not require users to redact secrets before sharing the response. Because bearer tokens and API keys authorize requests based on possession, exposing them in a conversation, transcript, telemetry system, or support log can permit replay by anyone who obtains the value. The API-key creation response is especially sensitive because the skill states that the plaintext key is returned only once. Requesting the complete response can therefore defeat the intended one-time disclosure control. ### Attack Path 1. A user encounters an authentication, API-key creation, balance, or inference error. 2. Following the skill, the agent requests the full HTTP status and JSON response. 3. The user pastes an unsanitized response containing a `login_token`, consumer API key, or other sensitive value. 4. The credential becomes stored in conversation history, logs, monitoring data, or ...[truncated 887 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Replace the instruction to request the full response with a strict sanitization policy: ```markdown When troubleshooting, request only the HTTP status, sanitized `error.code`, and sanitized `error.message`. Never request or reproduce authorization headers, cookies, login tokens, API keys, wallet signatures, private keys, signed messages, or complete credential-creation responses. ``` Additional hardening should include: 1. Provide a mandatory redaction checklist for `login_token`, `api_key`, `Authorization`, `Cookie`, signatures, nonces, and confidential account fields. 2. Tell users to replace sensitive values with placeholders before sharing output. 3. Recommend immediate revocation or rotation whenever a token or key is accidentally disclosed. 4. Avoid echoing secrets in agent responses, command history, screenshots, or logs. 5. Request the minimum diagnostic data required: HTTP status, error code, endpoint name, request ID, and a sanitized error message. 6. Add examples of safe, redacted responses so users do not paste complete credential-bearing JSON. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:20
Finding
Contradictory Blockchain Network Configuration Can Misroute Financial Operations<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 20–22 and 85–94 **Vulnerability Type**: Unsafe blockchain network configuration **Risk Level**: High ### Vulnerable Snippets ```markdown - Support chain is base sepolia, chain id is 8453 Replace all `<BASE_URL>` with the actual gateway URL as needed. ``` ```markdown ## 2. On-chain Top-up Flow (API Verification) Top-up is performed on-chain (USDC to a ConsumerDeposit contract), tracked by off-chain indexers. The API lets you verify the result. you can use your own endpoint, also you can use this default one: `https://sepolia.base.org` - User transfers USDC to the ConsumerDeposit contract with proper calldata. - Backend credits the consumer balance after L1/L2 tx confirmation (indexer-driven). - USDC address is: 0x10065E7b353371DD2e12348e7094cC774638EbEB - ConsumerDeposit contract address is: 0xB0E9ebf19AB710d3353c7F637DC55329d9727dCc - before depoist, you need to approve the allwance - deposit abi is `function deposit(uint256 amount)` ``` ### Technical Analysis The skill identifies the supported network as Base Sepolia but assigns chain ID `8453`. It also recommends the Base Sepolia RPC endpoint `https://sepolia.base.org`. These settings are inconsistent: chain ID `8453` identifies Base mainnet, whereas Base Sepolia uses a different chain ID. The same workflow provides fixed USDC and deposit-contract addresses and instructs users to approve an allowance before calling `deposit(uint256 amount)`. It does not require verification that: - The connected network's runtime chain ID matches the intended environment. - The supplied token and deposit addresses are deployed on that network. - The contracts' bytecode and identities match verified deployments. - The token decimals and requested approval amount are correct. - The transaction simulation transfers funds to the expected accounting system. Blockchain addresses are interpreted within the currently connected chain. A chain mismatc ...[truncated 1895 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Correct the documented chain ID so that it unambiguously matches the intended network. 2. Separate mainnet and testnet configuration into explicit, independently verified tables containing: - Network name - Chain ID - Trusted RPC endpoint - Token address - Deposit-contract address - Block explorer - Deployment/version identifier 3. Require a runtime `eth_chainId` check before signing, approving, or depositing. Abort on any mismatch. 4. Obtain contract addresses from an authenticated Bitnow deployment registry rather than relying only on static documentation. 5. Verify deployed bytecode or a published code hash for the token and deposit contracts. 6. Display the selected chain, token, spender, amount, and token decimals to the user before requesting wallet approval. 7. Recommend exact or limited allowances instead of unlimited approvals. 8. Simulate the approval and deposit transactions before broadcasting them. 9. Confirm the transaction receipt's chain ID, contract address, status, and emitted deposit event before considering the operation successful. 10. Require a small test deposit before transferring a material amount. 11. Document a clear stop condition: no transaction should be signed when the RPC-reported chain ID and configured environment differ. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

External Transmission

Medium
Category
Data Exfiltration
Content
Assumptions:

- A **gateway HTTP API** exists (e.g. `https://gateway-test.bitnow.ai`)
- All workflows are CLI-, Curl or script-oriented, no UI assistance
- Support chain is base sepolia, chain id is 8453

Replace all `<BASE_URL>` with the actual gateway URL as needed.
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill metadata and description frame the capability as consumer-facing Bitnow workflows, but the documented supplier/provider endpoints expand scope into privileged upstream registration and configuration. This can cause an agent or operator to invoke higher-risk administrative actions unexpectedly, increasing the chance of unauthorized changes, secret submission, or misuse of provider-management APIs.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The supplier API examples include raw sensitive values such as upstream API keys and bearer tokens directly in request bodies, with no warning to avoid logging, storing, or echoing them. In agent-driven or CLI contexts, these secrets can be exposed through shell history, transcripts, debug logs, telemetry, or prompt context, leading to credential theft and compromise of upstream provider accounts or GPU nodes.

Static analysis

No suspicious patterns detected.