Back to skill

Security audit

Bounty Hunter Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a legitimate Niuma/XLayer bounty helper, but it asks users to handle a raw wallet private key and ships weak dependency sourcing without enough safety framing.

Review this skill before installing. Prefer the unsigned build-tx workflow with an external wallet, do not paste or export a production private key, use only a dedicated low-value test wallet, and regenerate the lockfile from the official HTTPS npm registry before relying on it.

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

T08 · Insecure Dependencies

Warning
Location
package-lock.json:18
Finding

Dependencies Are Retrieved from a Third-Party Mirror over Plaintext HTTP

Content
View full analysis

Vulnerability Details

File Location: package-lock.json:18, package-lock.json:24, package-lock.json:39, package-lock.json:54, package-lock.json:65, package-lock.json:72, package-lock.json:96, package-lock.json:108, and package-lock.json:115
Vulnerability Type: Insecure dependency transport and third-party package source
Risk Level: Medium

Vulnerable Code

Representative locked dependency entry:

json
"node_modules/ethers": {
  "version": "6.16.0",
  "resolved": "http://mirrors.tencentyun.com/npm/ethers/-/ethers-6.16.0.tgz",
  "integrity": "sha512-U1wulmetNymijEhpSEQ7Ct/P/Jw9/e7R1j5XIbPRydgV2DjLVMsULDlNksq3RQnFgKoLlZf88ijYtWEXcPa07A==",
  "funding": [
    {
      "type": "individual",
      "url": "https://github.com/sponsors/ethers-io/"
    },
    {
      "type": "individual",
      "url": "https://www.buymeacoffee.com/ricmoo"
    }
  ],
  "license": "MIT",
  "dependencies": {
    "@adraffy/ens-normalize": "1.10.1",
    "@noble/curves": "1.2.0",
    "@noble/hashes": "1.3.2",
    "@types/node": "22.7.5",
    "aes-js": "4.0.0-beta.5",
    "tslib": "2.7.0",
    "ws": "8.17.1"
  },
  "engines": {
    "node": ">=14.0.0"
  }
}

All packages recorded in the lockfile use the same plaintext third-party mirror pattern.

Technical Analysis

The lockfile directs npm to retrieve executable JavaScript dependencies from mirrors.tencentyun.com using unencrypted HTTP rather than the official npm registry over HTTPS. Plaintext transport does not authenticate the package server and provides no transport confidentiality or integrity. A network-positioned attacker can therefore intercept, redirect, block, or alter package download responses.

The SHA-512 integrity fields materially limit arbitrary package substitution: npm should reject an altered archive when its digest does not match the lockfile. Consequently, a simple man-in-the-middle attacker cannot ...[truncated 2189 chars]

Remediation
View remediation

Remediation Suggestions

  1. Regenerate package-lock.json using the official npm registry over HTTPS:
    bash
    npm config set registry https://registry.npmjs.org/
    rm -rf node_modules package-lock.json
    npm install
    
  2. Verify that every resolved package URL in the regenerated lockfile uses an authenticated HTTPS source.
  3. Use npm ci in automated and production installation workflows so dependency versions and integrity values must match the reviewed lockfile.
  4. Pin ethers to an exact reviewed version instead of the range "^6.16.0" to reduce unreviewed dependency changes when the lockfile is regenerated.
  5. Retain SHA-512 integrity metadata and fail installation if integrity verification reports any mismatch.
  6. Add CI checks that reject lockfile entries using http:// or unapproved package registries.
  7. Periodically audit dependencies and review changes to package source URLs, versions, integrity hashes, and transitive dependency graphs.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (7)

Known Vulnerable Dependency: ws==8.17.1 — 2 advisory(ies): CVE-2026-45736 (ws: Uninitialized memory disclosure); CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
98% confidence
Finding

The package pins ws 8.17.1, which is flagged with known vulnerabilities including uninitialized memory disclosure and memory-exhaustion denial of service. In a skill that may process network or websocket traffic through ethers or related tooling, this increases risk because remote input could potentially trigger crashes, resource exhaustion, or unintended data exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs users to export a raw private key via NIUMA_WALLET_SECRET but does not warn about secret handling, shell history leakage, process/environment exposure, or safer alternatives. Because this skill is specifically for blockchain write operations, compromise of that secret can directly enable unauthorized on-chain transactions and loss of funds from the associated wallet.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill documents multiple state-changing blockchain actions such as approve, reject, cancel, bid submission, bidder selection, and token approval without clearly warning that these actions create on-chain transactions that may be irreversible once confirmed. In this context, users may trigger financially or operationally significant actions under the mistaken assumption they are easily undoable, especially when approvals and cancellations affect token spending rights or task state.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/abis.json (reported line 33)May include surrounding context.

json
"function maxTaskDuration() view returns (uint256)",
    "function reviewTimeout() view returns (uint256)",
    "function platformFeeRate() view returns (uint256)",
    "function autoApprove() view returns (bool)"
  ],
  "BountyPlatformBidding": [
    "function submitBid(uint256 _taskId, uint256 _bidAmount, string calldata _proposal, string calldata _contactInfo) external",

Vague Triggers

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

This JSON manifest exposes a command named "niuma" via the bin field, but the file provides no context about when or how that command should be invoked, nor any exclusion conditions. For manifest files, missing specificity around activation or invocation scope can lead to unintended triggering or confusion about the skill's intended use.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
88% confidence
Finding

The dependency uses a caret range (^6.16.0), which allows future minor and patch releases of ethers to be installed. This can introduce supply-chain risk because builds are not fully reproducible and a compromised or breaking upstream release could be pulled in without explicit review. In a web3-focused skill, dependency integrity matters more because blockchain interactions often involve sensitive transactions and signing logic.

Content

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

json
"description": "Niuma Bounty Platform skill for AI agents - task.niuma.works on XLayer",
  "main": "scripts/niuma.js",
  "bin": { "niuma": "scripts/niuma.js" },
  "dependencies": { "ethers": "^6.16.0" },
  "keywords": ["niuma","bounty","xlayer","web3","defi"],
  "license": "MIT"
}

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The top-level documentation frames the tool as 'Read-only queries + unsigned transaction builder for wallet plugins,' which is mostly accurate, but the help text and implementation also provide a broader interactive CLI for querying task, bid, wallet balance, allowance, and user participation data. This is not a security contradiction, but it is an intent/documentation divergence because the file header emphasizes wallet-plugin transaction building more narrowly than the implemented multi-command data-query CLI.

Content

No source excerpt is available for this finding.