proof-of-commitment 1.29.0 → 1.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +52 -31
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* proof-of-commitment CLI v1.29.
|
|
3
|
+
* proof-of-commitment CLI v1.29.2
|
|
4
4
|
* Scores npm/PyPI/Cargo/Go packages on behavioral commitment signals.
|
|
5
5
|
* Usage: npx proof-of-commitment [packages...] [options]
|
|
6
6
|
*/
|
|
@@ -710,40 +710,41 @@ async function inlineSignup(results, opts = {}) {
|
|
|
710
710
|
const critPkgs = results.filter(r => hasCritical(r.riskFlags));
|
|
711
711
|
const lowScorePkgs = results.filter(r => typeof r.score === 'number' && r.score < 60);
|
|
712
712
|
const hasFindings = critPkgs.length >= 1 || lowScorePkgs.length >= 2;
|
|
713
|
-
// engagementSignal:
|
|
714
|
-
//
|
|
715
|
-
//
|
|
716
|
-
// shape — the user is approaching the daily wall (15) and will hit it
|
|
717
|
-
// soon. Pre-this fix, single-package healthy scans at counts 5–14 saw
|
|
718
|
-
// only a dim URL: the strongest in-terminal conversion moment dropped to
|
|
719
|
-
// a copy-paste task. With engagementSignal=true we bypass the findings
|
|
720
|
-
// gate so the inline email→key prompt fires at the moment of warmest
|
|
721
|
-
// engagement. Closes the leak found 2026-06-10 dogfooding /api/keys/stats:
|
|
722
|
-
// 4 IPs hit AUDIT_SOFT_CTA_AT in 7d, 0 organic signups.
|
|
713
|
+
// engagementSignal: server _cta — this IP has scored ≥ AUDIT_SOFT_CTA_AT
|
|
714
|
+
// (5) packages today. Server-confirmed repeat-use signal independent of
|
|
715
|
+
// local result shape.
|
|
723
716
|
const engagementSignal = !!opts.engagementSignal;
|
|
724
|
-
//
|
|
725
|
-
//
|
|
726
|
-
//
|
|
727
|
-
//
|
|
728
|
-
//
|
|
729
|
-
//
|
|
730
|
-
//
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
//
|
|
717
|
+
// 2026-06-11 v1.29.2 proposition shift: gate relaxed to results.length<1.
|
|
718
|
+
// Prior gates (`<3 && !hasFindings && !engagementSignal`) blocked the most
|
|
719
|
+
// common entry point — `npx proof-of-commitment axios` after reading about
|
|
720
|
+
// an attack — when the result was healthy. The watchlist auto-seed shipped
|
|
721
|
+
// earlier today (abe53f1) made single-package signups valuable: signup →
|
|
722
|
+
// that package goes on watchlist + email if attacked. "Enter to skip"
|
|
723
|
+
// keeps opt-out one keystroke. Closes the proposition gap from 2026-06-10
|
|
724
|
+
// /api/keys/stats dogfood: 4 IPs hit soft-CTA in 7d, 0 organic signups —
|
|
725
|
+
// copy was quota-focused, not value-focused.
|
|
726
|
+
if (results.length < 1) return;
|
|
727
|
+
|
|
728
|
+
// Heading copy: lead with the proposition (auto-watch + alert on attack),
|
|
729
|
+
// not the friction (quota wall). Pre-v1.29.2 the engagementSignal heading
|
|
730
|
+
// was wall-approach quota framing (see git log for prior copy) — friction-
|
|
731
|
+
// removal for a user the system has already identified as security-engaged.
|
|
732
|
+
// New framing names what they actually get: watchlist seeded from this
|
|
733
|
+
// scan, email if anything tampers.
|
|
734
|
+
const count = results.length;
|
|
735
|
+
const pkgRef = count === 1 ? 'this' : `these ${count}`;
|
|
736
|
+
const subjRef = count === 1 ? 'it' : 'any';
|
|
737
|
+
const subjGets = count === 1 ? 'gets' : 'get';
|
|
738
|
+
|
|
736
739
|
const heading = hasFindings
|
|
737
|
-
?
|
|
738
|
-
? ' 🔔 Monitor this package. Get alerted if it gets worse.'
|
|
739
|
-
: ' 🔔 Lock in this audit. Get alerted if these packages get worse.')
|
|
740
|
+
? ` 🔔 Auto-watch ${pkgRef}. Email if ${subjRef} ${subjGets} attacked or score drops.`
|
|
740
741
|
: engagementSignal
|
|
741
|
-
?
|
|
742
|
-
:
|
|
742
|
+
? ` 🔔 You're scanning a lot. Watch ${pkgRef} for the next attack? Free.`
|
|
743
|
+
: ` 🔔 Auto-watch ${pkgRef}. Free email alert if ${subjRef} ${subjGets} attacked.`;
|
|
743
744
|
|
|
744
745
|
console.log(clr(c.dim, ' ─────────────────────────────────────────────'));
|
|
745
746
|
console.log(clr(c.bold, heading));
|
|
746
|
-
console.log(clr(c.dim, '
|
|
747
|
+
console.log(clr(c.dim, ' Seeds your watchlist from this scan. 10s, no card.\n'));
|
|
747
748
|
|
|
748
749
|
const { createInterface } = await import('readline');
|
|
749
750
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
@@ -845,10 +846,11 @@ async function inlineSignup(results, opts = {}) {
|
|
|
845
846
|
|
|
846
847
|
function printHelp() {
|
|
847
848
|
console.log(`
|
|
848
|
-
${clr(c.bold, 'proof-of-commitment')} v1.29.
|
|
849
|
+
${clr(c.bold, 'proof-of-commitment')} v1.29.2 — supply chain risk scorer
|
|
849
850
|
|
|
850
851
|
${clr(c.bold, 'Usage:')}
|
|
851
852
|
npx proof-of-commitment Auto-detect manifest in current dir
|
|
853
|
+
npx proof-of-commitment audit Same — verb-first alias (also: scan, check)
|
|
852
854
|
npx proof-of-commitment [packages...] Score npm packages
|
|
853
855
|
npx proof-of-commitment --pypi [pkgs...] Score PyPI packages
|
|
854
856
|
npx proof-of-commitment --cargo [crates...] Score Rust crates
|
|
@@ -2465,7 +2467,26 @@ async function main() {
|
|
|
2465
2467
|
}
|
|
2466
2468
|
|
|
2467
2469
|
// Subcommands
|
|
2468
|
-
|
|
2470
|
+
let subcmd = args[0];
|
|
2471
|
+
|
|
2472
|
+
// Transparent aliases: every other package manager (`npm audit`, `yarn audit`,
|
|
2473
|
+
// `pnpm audit`, `cargo audit`, `pip-audit`) puts the verb first. Users —
|
|
2474
|
+
// including readers of our own blog post at npm-trust-q2-2026 line 559 — type
|
|
2475
|
+
// `npx proof-of-commitment audit` and expect it to scan cwd's manifest.
|
|
2476
|
+
//
|
|
2477
|
+
// Without this branch the CLI parses `audit` as a POSITIONAL PACKAGE NAME,
|
|
2478
|
+
// which is a 13.9y-old npmjs.com/package/audit utility — silently scoring
|
|
2479
|
+
// the wrong package while burning the caller's daily quota. Caught during
|
|
2480
|
+
// 2026-06-11 buyer-journey dogfood (full transcript in reflection).
|
|
2481
|
+
//
|
|
2482
|
+
// We shift the verb off and fall through to the main parser so all flags
|
|
2483
|
+
// (--file, --pypi, --cargo, --golang, --json, --sarif, --fail-on) continue
|
|
2484
|
+
// to work positionally: `proof-of-commitment audit lodash --json` still
|
|
2485
|
+
// means "scan lodash, JSON output".
|
|
2486
|
+
if (subcmd === 'audit' || subcmd === 'scan' || subcmd === 'check') {
|
|
2487
|
+
args.shift();
|
|
2488
|
+
subcmd = args[0];
|
|
2489
|
+
}
|
|
2469
2490
|
|
|
2470
2491
|
if (subcmd === 'init') {
|
|
2471
2492
|
await cmdInit();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proof-of-commitment",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.2",
|
|
4
4
|
"mcpName": "io.github.piiiico/proof-of-commitment",
|
|
5
5
|
"description": "Supply chain security risk scorer for npm, PyPI, Cargo, and Go packages — behavioral signals that can't be faked",
|
|
6
6
|
"type": "module",
|