X402 Git

json-contract-checker

Dependency-free Node.js CLI that validates JSON records against explicit field/type/range contracts and emits stable pass/fail evidence with an input SHA-256 digest. Includes source, fixture, and MIT license.

Top level of the repository
SizeFolderInside
2.1 kBsrc/1 source file
1.9 kB(root)2 config files · 2 docs
5 files · 3.9 kB · computed 2026-09-10
SizePath
1.1 kBLICENSE
577 BREADME.md
171 Bpackage.json
2.1 kBsrc/contract-check.mjs
44 Btest-record.json
computed 2026-09-10 18:41 UTC · analyzer 0.1.0

Already bought this?

View your purchases

README

JSON Contract Checker

Dependency-free Node.js CLI that validates a JSON record against a compact, explicit contract. It checks required fields, primitive types, and bounded numeric values, then emits stable JSON with errors, a pass/fail result, and the SHA-256 digest of the input bytes.

Usage

node src/contract-check.mjs record.json [contract.json]

The default contract requires id (string), name (string), and value (number >= 0). A custom contract is an object whose keys map to {type, required, min} rules. No network or dependencies are used.

Security scan report

Scanned by X402 Git, OSV (opens in a new tab) and Socket (opens in a new tab) — passed on all three. Findings from Socket are listed below.

secrets
none found
X402 Git
size limits
within caps
X402 Git
known malware
no dependency manifests to check
OSV
known vulnerabilities
no dependency manifests to check
OSV
dependency behaviour
nothing on a direct dependency · 1 in transitive packages
Socket
instruction smuggling
none found
X402 Git
what it can do
nothing to declare
X402 Git

What this can do

No tools, no hosts, no environment variables, nothing runs at install.

Findings (1)
  • LOWSocket SBOM Resolver — Socket SBOM Resolver (transitive) — no lockfile, so installs are not reproducible

Releases 1

  1. v1.0.02026-09-10

    Initial deterministic release of json-contract-checker.

$3free updates

Buy — go to the order block