Back to skill

Security audit

Portfolio Risk Analyzer

Security checks for vulnerabilities and agentic risk

Overview

The skill is openly a crypto portfolio analyzer, but it also starts automated token buybacks that can spend all USDC in the configured payment wallet without clear limits or approval.

Review carefully before installing or running. Use only a dedicated low-balance hot wallet, do not put unrelated funds in the payment wallet, disable or remove the hourly buyback until spending caps and explicit approvals exist, avoid shell-sourcing .env, pin dependencies with a lockfile, and document third-party data handling for wallet, API, and voice data.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/execute-buyback.sh:14
Finding

Automated buyback can swap the payment wallet's entire USDC balance

Content
View full analysis
{ console.log('⏰ Running automated buyback check...'); try { const { execSync } = require('child_process'); execSync('./scripts/execute-buyback.sh 100', { stdio: 'inherit' }); } catch (error) { console.error('Buyback failed:', error); } }); ``` ```bash # Get current USDC balance USDC_BALANCE=$(node scripts/get-balance.js "$PAYMENT_WALLET_ADDRESS" "$USDC_ADDRESS") echo "💰 Current USDC balance: $USDC_BALANCE" # Minimum threshold MIN_THRESHOLD=${1:-100} if (( $(echo "$USDC_BALANCE < $MIN_THRESHOLD" | bc -l) )); then echo "⏸️ Balance below threshold ($MIN_THRESHOLD USDC). Skipping buyback." exit 0 fi echo "🔄 Executing buyback..." echo "Amount: $USDC_BALANCE USDC" echo "Target: $BANKR_TOKEN" echo "" # Execute swap via Uniswap RESULT=$(node scripts/uniswap-swap.js \ --from "$USDC_ADDRESS" \ --to "$BANKR_TOKEN" \ --amount "$USDC_BALANCE" \ --slippage 2) ``` ```bash # Optional: Burn or distribute if [[ "$BUYBACK_ACTION" == "burn" ]]; then echo "🔥 Burning $BANKR_BOUGHT BANKR..." node scripts/burn-tokens.js "$BANKR_TOKEN" "$BANKR_BOUGHT" elif [[ "$BUYBACK_ACTION" == "distribute" ]]; then echo "📤 Distributing $BANKR_BOUGHT BANKR to holders..." node scripts/distribute-to-holders.js "$BANKR_BOUGHT" else echo "💎 Holding $BANKR_BOUGHT BANKR in treasury" fi ``` The documentation also recommends an operating-system cron entry: ```bash # Add to crontab 0 * * * * cd /path/to/skill && ./scripts/execute-buyback.sh ``` ### Technical Analysis Starting the API registers an in-process hourly task that invokes the buyback script. The documentation separately ...[truncated 2590 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/execute-buyback.sh:5
Finding

Shell sourcing of .env permits arbitrary command execution

Content
View full analysis
/dev/null || true ``` ### Technical Analysis The Bash `source` command interprets `.env` as shell program text rather than as a passive key-value configuration file. Consequently, command substitutions, function definitions, redirections, and arbitrary shell statements contained in `.env` execute with the privileges of the buyback process. This is particularly sensitive because the same workflow is intended to access a payment-wallet address and transaction-signing functionality. Suppressing errors and appending `|| true` can also conceal malformed or malicious configuration behavior from the operator. The issue does not independently allow a remote attacker to modify `.env`; exploitation requires an attacker or unsafe provisioning process to gain influence over that local file. Once such influence exists, however, scheduled execution provides a reliable trigger. ### Attack Path 1. An attacker, compromised deployment process, or untrusted configuration template writes shell syntax into the project-local `.env` file. 2. The operator manually invokes the buyback script, the API's hourly scheduler invokes it, or the documented crontab entry runs it. 3. Bash processes `source .env`. 4. Embedded commands execute before the balance check and swap operation. 5. Those commands can read files accessible to the service account, alter transaction parameters, invoke other programs, or transmit available secrets over the network. For example, a command substitution assigned to an otherwise legitimate-looking variable would execute while the file is sourced. ### Impact Assessment Successful exploitation provides arbitrary command execution under the operating-system account running the buyback task. The accessible scope includes p ...[truncated 359 chars]
Remediation
View remediation
/dev/null || true`. 9. Run the task under a dedicated non-root account with minimal filesystem and network permissions. ]]>

T08 · Insecure Dependencies

Note
Location
package.json:11
Finding

Unpinned dependency resolution makes installations non-reproducible

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (28)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README promotes automated hourly buybacks and a manual buyback script but does not clearly warn that these actions trigger real on-chain swaps using live funds. In a financial automation skill, omitting explicit transaction-risk warnings can lead users to execute irreversible token trades, incur slippage/MEV/gas losses, or unintentionally operate market-manipulating behavior.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 22)May include surrounding context.

md
npm install

# Configure
cp .env.example .env
# Add your RPC endpoints and API keys

# Analyze a wallet

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/execute-buyback.sh (reported line 7)May include surrounding context.

sh
set -e

# Load environment
source .env 2>/dev/null || true

BANKR_TOKEN="${BANKR_TOKEN:-0x50D2280441372486BeecdD328c1854743EBaCb07}"
USDC_ADDRESS="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"  # Ethereum mainnet

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The application performs an hourly automated shell execution of a buyback script unrelated to the exposed portfolio-analysis API, introducing a high-risk privileged action in the server process. Any compromise of the script, path, deployment environment, or surrounding operational controls could turn this into arbitrary command execution or unauthorized financial activity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README instructs users to scan wallets and configure RPC/API credentials but provides no warning about the sensitivity of wallet-linked financial data or how that data is handled, stored, or transmitted. In a crypto portfolio context, wallet addresses, cross-chain holdings, and API-backed enrichment can reveal significant private financial information and create avoidable privacy and operational risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs users to configure PAYMENT_WALLET_KEY for payment receipt and buyback execution but does not warn that this is a highly sensitive private key that can directly authorize transfers. In a crypto-payment skill, omission of key-handling guidance materially increases the chance of credential leakage, unsafe storage in .env, accidental commits, or operational compromise leading to theft of funds.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill routes wallet and portfolio-related data through third-party services such as Twilio and external APIs, but it does not disclose the privacy implications of transmitting addresses, spoken wallet identifiers, and potentially sensitive financial exposure data. In this context, users may unknowingly expose portfolio intelligence to service providers, logs, transcripts, or webhook handlers, which can create surveillance, profiling, or targeting risks.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

1. User Requests Analysis

bash
curl -X POST https://your-domain.com/api/analyze \
  -H "Content-Type: application/json" \
  -d '{
    "wallet": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The package description explicitly advertises 'automated $BANKR buyback' while providing script entry points for buyback execution. In a crypto/DeFi skill, ambiguous automation language around market actions is security-relevant because it signals potentially autonomous financial transactions that could execute without sufficient user confirmation, policy controls, or auditability.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script forwards the wallet address and derived portfolio data to multiple helper Node scripts without any notice about where that data may be sent, logged, or stored. In a wallet-analysis context, this can expose sensitive financial profiling data and on-chain activity correlations to external services or local telemetry, creating a privacy and confidentiality risk even if no funds are directly at risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The portfolio analysis flow sends the supplied wallet address to blockchain RPC providers and is designed to query third-party balance APIs, which transmits user-associated financial data off-box. The code does not include any user-facing warning, prompt, or disclosure about this external data sharing.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · server.js (reported line 188)May include surrounding context.

js
async function getEthPrice() {
  try {
    const response = await axios.get('https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd');
    return response.data.ethereum.usd;
  } catch (error) {
    console.error('Error fetching ETH price:', error);

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The API accepts a payment_tx field but never validates it, while messaging claims users can pay for access. This creates a broken access-control and billing flow: users who pay may be denied service, and the service's stated payment model is misleading, which can cause unauthorized logic paths and financial disputes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The service triggers buyback actions automatically without any visible user disclosure, consent, or operator confirmation in this code path. In a financial context, undisclosed automated fund-moving behavior materially increases risk because users and operators may not understand that the service initiates periodic market actions.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

Using a caret range for express allows installation of newer compatible releases that may differ from what was tested, reducing build reproducibility and making dependency risk harder to assess. In a service that may expose HTTP endpoints for crypto operations, this increases supply-chain uncertainty even if it does not prove direct compromise by itself.

Content

Scanner excerpt · package.json (reported line 13)May include surrounding context.

json
"analyze": "./scripts/analyze-wallet.sh"
  },
  "dependencies": {
    "express": "^4.18.2",
    "ethers": "^6.10.0",
    "axios": "^1.6.5",
    "dotenv": "^16.4.1",

Unverifiable Dependency: express has 5 known advisory(ies) (CVE-2024-10491 (Express ressource injection); CVE-2014-6393 (No Charset in Content-Type Header in express); CVE-2024-9266 (Express Open Redirect vulnerability) +2 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding

The manifest references express with a non-exact version while known advisories exist, making it impossible to verify from this file whether a vulnerable release could be installed. In an HTTP-facing crypto service, unresolved uncertainty around framework security is more concerning because web-layer flaws can become entry points to higher-value transaction and secret-handling logic.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Using an unpinned ethers version is riskier than a generic library because ethers directly interfaces with wallets, keys, and blockchain transactions. A semver-range update could change signing, provider, or transaction-handling behavior in a financial automation context, potentially affecting asset movement or transaction safety.

Content

Scanner excerpt · package.json (reported line 14)May include surrounding context.

json
},
  "dependencies": {
    "express": "^4.18.2",
    "ethers": "^6.10.0",
    "axios": "^1.6.5",
    "dotenv": "^16.4.1",
    "node-cron": "^3.0.3",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Axios is unpinned despite being a high-risk dependency class for outbound network requests, and the project likely uses it to fetch market or wallet-related data. In a crypto automation skill, unexpected dependency changes in request handling, proxy behavior, or parsing could expose the service to SSRF-like conditions, response tampering assumptions, or data integrity issues.

Content

Scanner excerpt · package.json (reported line 15)May include surrounding context.

json
"dependencies": {
    "express": "^4.18.2",
    "ethers": "^6.10.0",
    "axios": "^1.6.5",
    "dotenv": "^16.4.1",
    "node-cron": "^3.0.3",
    "twilio": "^4.21.0",

Unverifiable Dependency: axios has 16 known advisory(ies) (CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
92% confidence
Finding

Axios has multiple known advisories and the non-pinned version prevents verifying whether the installed package is affected. Because this project likely performs external HTTP requests for market, wallet, or service integrations, unverifiable request-library exposure is materially risky and could affect data integrity or outbound request safety.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
84% confidence
Finding

An unpinned dotenv dependency creates avoidable supply-chain and reproducibility risk, even though dotenv itself is usually lower risk than transaction or network libraries. Configuration loading is security-sensitive because mistakes can affect secrets, environment overrides, or runtime behavior across deployment environments.

Content

Scanner excerpt · package.json (reported line 16)May include surrounding context.

json
"express": "^4.18.2",
    "ethers": "^6.10.0",
    "axios": "^1.6.5",
    "dotenv": "^16.4.1",
    "node-cron": "^3.0.3",
    "twilio": "^4.21.0",
    "@uniswap/v3-sdk": "^3.11.2",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
89% confidence
Finding

Node-cron is unpinned in a project that appears to automate financial actions, making scheduling behavior part of the attack surface. If dependency changes alter cron parsing or execution timing, scheduled buybacks or analyses could trigger unexpectedly or at unsafe intervals.

Content

Scanner excerpt · package.json (reported line 17)May include surrounding context.

json
"ethers": "^6.10.0",
    "axios": "^1.6.5",
    "dotenv": "^16.4.1",
    "node-cron": "^3.0.3",
    "twilio": "^4.21.0",
    "@uniswap/v3-sdk": "^3.11.2",
    "@uniswap/sdk-core": "^5.0.0"

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
90% confidence
Finding

Twilio is unpinned, which creates uncertainty around messaging or alerting behavior in a system likely to send transaction, analysis, or operational notifications. In financial tooling, alerting integrity matters because users may rely on messages for approvals, incident response, or transaction awareness.

Content

Scanner excerpt · package.json (reported line 18)May include surrounding context.

json
"axios": "^1.6.5",
    "dotenv": "^16.4.1",
    "node-cron": "^3.0.3",
    "twilio": "^4.21.0",
    "@uniswap/v3-sdk": "^3.11.2",
    "@uniswap/sdk-core": "^5.0.0"
  },

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

An unpinned @uniswap/v3-sdk dependency is significant because it directly influences trade pathing, pricing, slippage calculations, and transaction construction in DeFi workflows. Dependency drift in an SDK tied to on-chain trading can materially affect financial outcomes or execution safety.

Content

Scanner excerpt · package.json (reported line 19)May include surrounding context.

json
"dotenv": "^16.4.1",
    "node-cron": "^3.0.3",
    "twilio": "^4.21.0",
    "@uniswap/v3-sdk": "^3.11.2",
    "@uniswap/sdk-core": "^5.0.0"
  },
  "devDependencies": {

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

@uniswap/sdk-core underpins token math and core trading abstractions, so leaving it unpinned introduces supply-chain uncertainty in a portfolio and buyback tool. Small dependency changes here can cascade into incorrect amounts, price interpretation, or transaction preparation.

Content

Scanner excerpt · package.json (reported line 20)May include surrounding context.

json
"node-cron": "^3.0.3",
    "twilio": "^4.21.0",
    "@uniswap/v3-sdk": "^3.11.2",
    "@uniswap/sdk-core": "^5.0.0"
  },
  "devDependencies": {
    "nodemon": "^3.0.3"

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
server.js:253

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
server.js:11