🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

plumb-line-provenance

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plumb-line-provenance

Conservative provenance/confidence/lineage envelope with a taint-propagation combination law. Mock or low-confidence data cannot launder itself clean.

latest
Source
npmnpm
Version
0.7.3
Version published
Weekly downloads
365
-36.52%
Maintainers
1
Weekly downloads
 
Created
Source

plumb-line-provenance (JavaScript)

A conservative provenance / confidence / lineage envelope with a taint-propagation combination law: once any input is mock or low-confidence, every value derived from it inherits that taint automatically — there is no escape hatch that silently clears the flag.

import { mark, derive, metaOf, auditMeta } from "plumb-line-provenance";

const base  = mark(1000, { source: "real", confidence: "high" });
const rate  = mark(1.25, { source: "mock", confidence: "low" });
const total = derive([base, rate], (a, r) => a * r);

total.derivedFromMock; // true  — inherited from rate, cannot be cleared
total.confidence;      // 'low' — only as certain as the weakest input
auditMeta(metaOf(total)); // []  — internally consistent

You can also copy the .mjs files directly into a project and import them relatively; both styles work.

HTTP ingestion adapter (plumb-line-provenance/http)

Auto-tag fetch responses at ingestion. Native fetch — no dependency (requires Node ≥ 18 or a browser).

import { tagResponse, taggedFetch } from "plumb-line-provenance/http";
import { derive } from "plumb-line-provenance";

const resp = await fetch(url);
const data = tagResponse(resp);               // marked by status/cache
const body = derive([data], (r) => r.json()); // extract; taint propagates

const data2 = await taggedFetch(url);         // fetch + tag in one call

Mapping (source = origin, confidence = freshness): 2xx fresh → real/high, 2xx cached or 304 → real/medium, 4xx/5xx → unavailable/none. Cache is best-effort (Age > 0, X-Cache: HIT, 304) and lowers only confidence. The tagger never emits fallback.

  • Specification: SPEC.md (envelope schema version 2)
  • Model, law, examples: README.md
  • License: Apache-2.0

Python parity package: plumb-line-provenance on PyPI.

Keywords

provenance

FAQs

Package last updated on 19 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts