T08 · Insecure Dependencies
- Location
scripts/package.json:11- Finding
Mutable Third-Party Dependencies Handle the Wallet Private Key
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is coherent for managing prediction markets, but it asks agents to run wallet-backed mainnet transaction scripts with unsafe financial defaults and mutable dependencies.
Review this carefully before installing. Use only a dedicated, low-balance wallet, avoid primary wallets, pin and audit dependencies with a lockfile, prefer exact or capped token approvals, revoke allowances after use, and set explicit nonzero slippage protection before trading. Treat the examples as live Base mainnet transactions that can spend funds and incur gas.
scripts/package.json:11Mutable Third-Party Dependencies Handle the Wallet Private Key
scripts/settle.ts:92Read-Only Settlement Status Requires Unnecessary Private-Key Access
scripts/trade.ts:93Trades Default to No Slippage Protection
SKILL.md:116Unlimited ERC20 Allowances Exceed the Required Spending Scope
The declared description claims broad lifecycle support for prediction markets: create, trade, and settle on Base with any ERC20 collateral. The supplied code only implements one narrow function: trading on an existing market (buy/sell YES/NO) plus fetching market info. It requires a wallet private key, checks market status, and submits buy/sell transactions through PNPClient. There is no code for creating markets, resolving/settling them, managing contests, crowdsourcing workflows, or explicit support for arbitrary ERC20 collateral selection. Because the primary advertised scope is materially broader than the code’s actual behavior, this is a description-behavior mismatch.
The skill instructs users to supply sensitive environment variables such as PRIVATE_KEY and RPC_URL, but it does not declare any explicit tool scope or permissions boundary. In an agent setting, missing scope declarations can lead to broader-than-expected access to secrets or runtime capabilities, especially when the skill is used alongside code execution or shell tooling.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Using 'npx ts-node' without pinning an exact package version introduces supply-chain risk because the resolved package version can change over time or be influenced by the environment. In a blockchain skill that handles private keys and transactions, unexpected dependency changes could lead to malicious code execution or altered transaction behavior.
Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
## Scripts
Run any script with `--help` first to see all options.
### Create Market
The skill explicitly normalizes infinite ERC20 approvals and frames them mainly as standard UX optimization without an equally explicit warning that this grants the spender ongoing access to the user's full token balance. In a DeFi context, if the spender contract, SDK path, or private key flow is compromised, users can lose substantially more than the intended trade amount.
The documentation describes a workflow where approvals are automatically sent and later transactions execute directly with no further approval step. In an agentic or automated setting, this reduces user friction but also reduces transaction-by-transaction oversight, making unintended or abusive token spending easier once approval has been granted.
1. **First interaction requires approval**: When you create a market or trade for the first time with a token, an approval transaction is sent
2. **Infinite approvals**: The SDK uses `type(uint256).max` approvals (standard EVM pattern) so you only approve once per token
3. **Subsequent interactions**: No approval needed—transactions execute directly
### Timing Considerations
The API reference instructs users to pass a raw wallet private key into the client configuration without any warning about credential sensitivity, secure storage, or the risks of embedding secrets in code. In an agent/tooling context, this increases the chance that operators hardcode keys, expose them in logs, prompts, repos, or runtime configs, leading to wallet compromise and unauthorized on-chain transactions.
The transactional examples show market creation and trading calls that can submit real on-chain transactions affecting funds, but they do not clearly warn that these operations spend assets, incur gas, and may execute against mainnet by default. In an agent skill for prediction-market infrastructure, this is especially risky because an automated consumer may treat examples as safe read-only usage and trigger unintended financial actions.
The examples instantiate a wallet-backed client from a private key and perform live market creation, trading, settlement, and redemption against Base mainnet. In documentation for an agent skill, users may copy-paste these examples verbatim, causing real on-chain transactions and potential loss of funds without any explicit warning, dry-run guidance, or testnet-only default.
The shebang #!/usr/bin/env npx ts-node causes execution to depend on whatever npx resolves at runtime rather than a pinned, trusted local binary. In a wallet-operating script that consumes PRIVATE_KEY and submits on-chain transactions, a malicious or substituted ts-node package could execute arbitrary code and exfiltrate secrets or alter transaction behavior.
The help text instructs users to run the script via npx ts-node, which encourages fetching or resolving an unpinned executable at runtime. Because this script requires a private key and interacts with markets on Base, compromise of that execution path could lead to key theft or unauthorized transactions.
This example command again normalizes executing the script through unpinned npx ts-node, creating a supply-chain risk in the user workflow. In context, the risk is elevated because the script processes sensitive wallet material from environment variables and can move funds on-chain.
The custom-token example also tells users to execute the script with unpinned npx ts-node, preserving the same dependency-resolution risk. If an attacker controls package resolution or a developer runs this in an untrusted environment, arbitrary code could run before market creation and access the configured private key.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
No suspicious patterns detected.