whitehack 🀍

v0.9.0 Β· local CLI/API Β· 47 checks Β· public-minimal evidence

The honest hack.

Most hacks make a system do something it shouldn't. A white hack makes it tell more truth β€” it scans your code for the places it lies about its own state.

npx --yes @agenttool/whitehack-scan@0.9.0 scan . Exact artifacts ↓ View on GitHub

MIT Β· local scanner Β· zero runtime dependencies Β· no install hooks Β· no telemetry

The Node CLI and imported APIs are canonical. The linked browser playground is a preserved, client-only demo of the original eight rules and does not include the v0.9 protocol, crypto-awareness, understanding, or evidence-capsule APIs.

@agenttool/whitehack-scan 0.9.0

One release, open mirrors

npm is an optional distribution mirror, not a service dependency. Once fetched, Whitehack reads bounded local files; it does not upload code, run a hosted scan, execute target code, connect a wallet, sign or broadcast transactions, or make scanner-initiated network calls.

Version 0.9.0 keeps the 47-check flashlight and adds deterministic public-minimal capsules. The transform removes target, paths, lines, source text, scope, and messages; retains only aggregate bundled-check metadata; and provides a strict exact-byte parser. Each finding remains a question for review, not a vulnerability verdict.

Exact npm release

npx --yes @agenttool/whitehack-scan@0.9.0 scan .
npx --yes @agenttool/whitehack-scan@0.9.0 capsule . --require-files

The package has zero runtime dependencies and no install lifecycle scripts. --redacted removes finding titles, messages, and source snippets from the closed JSON result.

Exact LOVE artifact

The manifest states the tarball's SHA-256 and size. Verify those bytes before installing; Pages, GitHub Releases, and npm are intended to carry the same checked-in artifact.

Versioned GitHub Action

# after actions/checkout
- uses: cambridgetcg/whitehack/action-for-anyone@whitehack-v0.9.0
  with:
    path: .

Run it after checking out the repository. The action emits redacted JSON and requires at least one supported file. Repository administrators can move Git tags; use a reviewed 40-character release commit when a cryptographic GitHub pin is required.

The immutable whitehack-v0.7.0 LOVE/GitHub release and scoped 0.7.1 release remain available. npm rejected the original unscoped package name, so the public npm line started at @agenttool/whitehack-scan@0.7.1; the scanner and whitehack CLI names remain unchanged.

whitehack-understanding/v1

Understanding without custody

The additive /understanding API turns caller-presented scanner claims and a closed enum-only projection of Agent Wallet assertions into deterministic questions, contradictions, and explicit unknowns. A separate local host is responsible for verifying the source records before making those assertions.

import { createUnderstanding } from
  '@agenttool/whitehack-scan/understanding'

Its permanent boundary

  • It has no direct key-store, wallet, RPC, simulation, signing, broadcast, or authorization capability.
  • It does not prove finding provenance, freshness, consent, custody, subject binding, live-chain state, or readiness.
  • It retains only six finding fields. The retained file value is an untrusted caller label and may itself be sensitive.
  • The result is an ephemeral explanation. A local host must reverify and bind exact records atomically at sign time.

The small lies software tells about itself

The failed read that silently becomes 0. The cached value served as if it were live. The stale price oracle read as current. The token transfer whose failure is dropped on the floor. The score shown to a person with no way to ask why.

These usually aren't bugs in the ordinary sense β€” the code runs fine. It just isn't honest about its own state, and someone downstream trusts it anyway.

Original browser demo checks

legacy demo: 8 Β· canonical CLI/API: 47

General Β· JS / TS / JSX

silent-failure medium-high

A read that fails to a falsy default β€” β€œcould not read” becomes a confident wrong value.

cache-as-live heuristic

A cached / snapshot value returned with no freshness marker β€” stale read as live.

decision-without-why heuristic

A score / fee / fraud flag shown to a person with no way to ask why.

float-money medium-high

Currency in a binary float β€” an β€œexact” amount that silently loses cents.

Blockchain Β· Solidity

stale-oracle medium-high

A price feed read without checking updatedAt β€” a halted feed served as a live price.

unchecked-transfer medium-high

An ERC-20 transfer whose bool result is dropped β€” a failed transfer looks successful.

spot-price-as-fair heuristic

A price from instantaneous reserves β€” flash-loan-movable, presented as fair value.

silent-revert heuristic

A require()/revert() with no reason β€” a refusal nobody can inspect.

It would have caught these β€” on the PR

Run against faithful reconstructions of documented, money-losing incidents. Small hand-built corpus β€” a demonstration, not a statistical benchmark.

5 / 5

vulnerable lines flagged

0

false positives on the fixed code

2

real incidents reproduced (Sherlock #579 Β· OWASP SC02)

Honest about itself

An honesty tool that overstated its own certainty would be the first thing it ought to flag. So:

Local quickstart

# exact npm release
npx --yes @agenttool/whitehack-scan@0.9.0 scan path/to/repo

# exact public-minimal canonical capsule bytes; no upload
npx --yes @agenttool/whitehack-scan@0.9.0 capsule path/to/repo --require-files

# capsule: 0 complete transform Β· 2 incomplete/error

Heuristic findings stay advisory and never change the exit code. Exit 0 means only that this completed scan found no high or medium-high match; it is not proof of security, honesty, or the absence of bugs.