T08 · Insecure Dependencies
- Location
SKILL.md:54- Finding
Mutable and Unverifiable External CLI Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:54-66
Vulnerability Type: Supply-chain risk caused by mutable, externally retrieved executable code
Risk Level: HighVulnerable Code Snippet
markdown ## Installation and execution **Installation (required):** `npm install -g @b-fun/bfun-ai@latest`. After install, run `bfun <command> [args]`; with local install only, use `npx bfun <command> [args]` from the project root. Run `bfun --help` for usage. This repository keeps the canonical production package identity in source. Release exports map `main` to `@b-fun/bfun-ai` and `dev` to `bfun-agent-dev`; the dev package name is injected only into generated export artifacts, not the source tree. Alternatively, clone and run locally without global install:git clone https://github.com/bfun-ai/bfun-ai.git cd bfun-ai npm install npx bfun [args]
text Technical Analysis
The Skill requires installation and execution of code that is not included in the audited artifact. The primary installation command uses the mutable npm tag
@latest, while the alternative clones the current, unpinned head of a remote Git repository. Thenpxexecution path may also resolve or install packages dynamically.The artifact contains only Markdown instructions and references; it does not contain the CLI source, a dependency lockfile, package integrity values, or a reviewed commit identifier. Therefore, the effective executable payload can change after this Skill has been audited.
This risk is especially significant because the external CLI is intentionally given access to sensitive and high-impact capabilities:
- A raw
PRIVATE_KEYfor signing BSC transactions. - Wallet funds and token allowances.
.envfiles loaded from the current working directory.- Local image files selected for token creation.
- Network access to RPC and B.Fun API services.
- Authority to buy, sell, transfer assets, create tokens, and register NFTs.
Although the doc ...[truncated 1702 chars]
- A raw
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an exact, reviewed package version. - Pin the package tarball integrity using a cryptographic hash and verify it before execution.
- Pin Git-based installation to a full reviewed commit hash rather than the repository’s mutable default branch.
- Include the complete executable source, package manifest, and lockfile in the auditable Skill artifact.
- Disable
npxpackage auto-installation and require execution only from a preverified local installation. - Use reproducible builds and publish signed provenance or attestations for release artifacts.
- Audit and lock all transitive dependencies; enforce dependency allowlists and automated integrity verification.
- Run the CLI in a sandbox with narrowly scoped filesystem and network access.
- Avoid exposing a raw private key to the CLI. Use a constrained wallet or signing interface that displays and authorizes exact transaction fields.
- Use a low-value dedicated wallet and restrict token allowances to exact amounts and known contracts.
- Verify chain ID, destination contract, calldata, asset amount, and value independently before signing.
- Explicitly disclose that token metadata and image files are uploaded to the B.Fun backend during creation.
- Replace
