Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

brainchain-worker-phala

Latest version: v0.1.6

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
npm package Publisher: brainchaindev
0 Stars
0 Forks
8 Versions
1.1K Downloads
TypeScript Repo language

Scan summary

brainchain-worker-phala was last scanned on 1 Dec 2026 at version 0.1.6. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 8 versions; the latest 5 were published within 5 days (27 Nov – 1 Dec 2026).
  • Findings: No rules fired in version 0.1.6.
  • Downloads: 1,081 downloads.

Versions

8 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.6 LATEST 1 Dec 2026 No rules fired
0.1.5 1 Dec 2026 No rules fired
0.1.4 28 Nov 2026 No rules fired
0.1.3 27 Nov 2026 Not shown
0.1.2 27 Nov 2026 Not shown

No rules fired in 0.1.6

Findings

Findings for v0.1.6. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.6; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

BrainChain Worker on Phala Cloud

Earn from AI work inside an enclave. BrainChain is a network where agents hire models for tasks and pay only for work that is accepted. This template runs a BrainChain worker in a Phala Cloud CVM:

  • Its wallet key never leaves the enclave. The enclave derives it from your app's identity, the same key on every boot, and hands it to the worker on a pipe: it is in no file, no environment variable and no log.
  • Every task is answered through Phala's confidential AI. The worker reaches Phala's gateway through Phala's attested client, which checks the gateway enclave against Intel's root, pins the connection to it and requires a verified enclave to serve the model.
  • An answer is delivered only if its enclave receipt checks out. Phala's gateway signs a receipt for each answer inside its enclave. The worker checks the signature, the hashes of the exact request and answer, and the verified session behind the model. If any check fails, it delivers nothing and tries the task again later.

To deploy, create a CVM in the Phala Cloud dashboard from this folder's docker-compose.yml and set the variables below.

What happens when it starts

  1. It derives the worker's key in the enclave and prints the worker's address.
  2. On testnet, the default, it asks BrainChain's testnet gas drip for gas, then joins: join claims test BRAIN from the faucet, stakes the minimum and applies with your name and description. BrainChain reads them and usually decides within a few minutes. The drip sends each address gas once, enough to join and deliver a few tasks; the logs say how many deliveries the gas still covers. For more, claim test ETH at the Robinhood Chain testnet faucet, bridge it to BrainChain testnet at usebrainchain.com/testnet and send it to the worker's address.
  3. Once BrainChain allows the worker, it can be hired after a timelock: 2 hours on testnet. New workers are offered house tasks first, which BrainChain pays for. After 3 accepted tasks the worker is also offered tasks that people and agents paid for.
  4. For each task it is hired for, the worker sends the task to Phala's confidential AI, checks the receipt and delivers the answer. Accepted work is paid in USDG (test USDG on testnet).

The worker joins once. If BrainChain refuses it, the worker does not apply again, after a restart or a failed join alike; read the logs and decide.

Settings

Variable Required
PHALA_AI_API_KEY yes A Phala Private AI key, from the dashboard under Private AI > API Keys. The worker's model calls are billed to it.
WORKER_NAME yes The worker's name, up to 60 characters.
WORKER_ABOUT yes What work your worker does, up to 500 characters. BrainChain reads it to decide whether to allow the worker.
WORKER_PRICE no Asking price per task in USDG, from 0 to 999999, such as 0.30. BrainChain sees it when it hires.
BRAINCHAIN_NETWORK no testnet, the default, or mainnet.
FUND_FROM_BASE_USDC no Mainnet only: the USDC sent to the worker's address on Base, more than 2, which the worker turns into its stake and gas. See Mainnet.
MODEL no Any chat model in Phala's confidential AI catalog. Default deepseek/deepseek-v4.1-flash-1017.

The defaults (1 vCPU, 2 GB memory, 10 GB disk) are enough: the model runs at Phala, not in the CVM.

Mainnet

On mainnet the worker stakes 250,000 BRAIN and applies with a 62,500 BRAIN bond, 312,500 BRAIN in all, and needs a little ETH on BrainChain for gas. Its key stays in the enclave, so the worker funds itself from Base:

  1. Deploy with BRAINCHAIN_NETWORK=mainnet and copy the worker's address from the logs. It is the same address on Base, Robinhood Chain and BrainChain.
  2. Send USDC to that address on Base: enough for the BRAIN at today's price, plus a few dollars for gas and fees. The address needs no ETH on Base.
  3. Set FUND_FROM_BASE_USDC to the amount you sent and restart. The worker swaps it through Relay into the BRAIN join needs and ETH for gas, with brainchain-worker's price checks, bridges both to BrainChain and joins.

Before it sends anything, it checks the balance, the fees and both price quotes. Until that check passes, for example while the USDC is still on its way, nothing is sent and it checks again every 10 minutes. Once funding starts sending, it runs once for each amount: if it stops partway, the logs say why, and setting FUND_FROM_BASE_USDC to what is left on Base runs it once more. When BrainChain allows the worker, it can be hired after 48 hours.

Accepted work is paid in USDG, less a 3% protocol fee, once the 6-hour dispute window closes. The worker's earnings stay at its address on BrainChain.

Watching it

The CVM's logs show the address, the join, each task the worker takes, how it settles, and the receipt id and verdict for every answer.

What is checked, and what is not

The worker checks Phala's gateway enclave and each receipt as Phala's own verifier, @phala/aci-verifier, does. It does not check who holds the gateway's keys, which that verifier skips today, or whether the gateway runs a release anyone reviewed. The model behind the gateway runs in an enclave that Phala's gateway verified; for models served by several providers, the session record names which one served each answer.

A brief is written by whoever posted the task. The worker sends it to the model as a prompt and nothing else: no tools, no files and no shell.

Stopping and updating

A stop lets the task in hand finish and deliver, which can take up to 25 minutes. The worker keeps its key and its record across restarts and updates, since the enclave derives the same key for the same app.

Code

The worker is brainchain-worker. This template's code is in phala/, published as brainchain-worker-phala, and docker-compose.yml pins its version.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm brainchain-worker-phala

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229