@exploitlens/verify 0.0.0-stage → 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Solution
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,84 @@
1
- # Temporary Holding Version
1
+ # @exploitlens/verify
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Verify an [ExploitLens](https://github.com/solutiono1/exploitlens) Fix Receipt
4
+ offline. It reads the bundle, re-hashes every file, and re-derives the verdict
5
+ from the evidence. It runs nothing.
6
+
7
+ ## Why this is its own package
8
+
9
+ A Fix Receipt is only worth anything if a third party can check it without
10
+ trusting the person who produced it. This package is the thing that third
11
+ party installs. It is the read-only half of ExploitLens, bundled to a single
12
+ file with one dependency (`zod`), so the tool you use to check a proof cannot
13
+ itself run code, check out a repository, or open a network connection.
14
+
15
+ That is not a promise, it is a property of the shipped bytes. The build pulls
16
+ in only what verification actually reaches, and a test greps the published
17
+ bundle for every process-spawning and network API and fails if one is present.
18
+ The only Node builtins the bundle can import are `crypto`, `fs`, `path` and
19
+ `url`.
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ npm install -g @exploitlens/verify
25
+ ```
26
+
27
+ Or run it once, without installing:
28
+
29
+ ```bash
30
+ npx @exploitlens/verify ./path-to-bundle
31
+ ```
32
+
33
+ ## Use it as a command
34
+
35
+ ```bash
36
+ exploitlens-verify ./path-to-bundle
37
+ ```
38
+
39
+ Exit code 0 means the bundle verifies. Exit code 1 means it does not, and the
40
+ reason is printed. That maps straight onto a shell `&&` or a CI step.
41
+
42
+ ```
43
+ Bundle valid: ./path-to-bundle
44
+ ```
45
+
46
+ ```
47
+ Bundle invalid: ./path-to-bundle
48
+ - [hash] receipt.json: "receipt.json" hash mismatch: artifact-index.json
49
+ records 0x7ab1..., computed 0x13f4... from the file on disk
50
+ ```
51
+
52
+ `--json` prints the full report instead of lines, for a script to read.
53
+
54
+ ## Use it as a library
55
+
56
+ ```ts
57
+ import { verifyBundle, formatReport } from "@exploitlens/verify";
58
+
59
+ const report = await verifyBundle("./path-to-bundle");
60
+ if (!report.ok) {
61
+ for (const line of formatReport(report)) console.error(line);
62
+ process.exit(1);
63
+ }
64
+ ```
65
+
66
+ `verifyBundle` resolves to `{ bundleDir, ok, issues }`. It lists every
67
+ inconsistency it finds, not just the first, so a tampered or incomplete bundle
68
+ shows its whole picture. It rejects only for an I/O error it cannot attribute
69
+ to the bundle's contents; a bundle that is merely invalid comes back as a
70
+ report with `ok: false`.
71
+
72
+ ## What it checks
73
+
74
+ - Every file's hash against `artifact-index.json`, and that index against the
75
+ receipt's `bundleDigest`, so nothing in the bundle can be swapped silently.
76
+ - That the receipt's gate results are what the deterministic gate engine
77
+ re-derives from the bundle's own effects and control record. A receipt that
78
+ claims a verdict its evidence does not support fails.
79
+ - That every reference inside the bundle resolves, and that a causal or variant
80
+ claim is backed by the artifacts it requires.
81
+
82
+ ## License
83
+
84
+ MIT