vigilsutra 0.2.0 → 0.2.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/CHANGELOG.md +46 -37
- package/README.md +244 -244
- package/agents/codeguard/SKILL.md +22 -16
- package/agents/infraguard/SKILL.md +18 -15
- package/agents/privacylens/SKILL.md +19 -16
- package/agents/secretwatch/SKILL.md +19 -15
- package/agents/verify/SKILL.md +15 -15
- package/agents/vigilsutra-prime/SKILL.md +25 -17
- package/dist/cli.js +34 -34
- package/dist/engine.js +2 -1
- package/dist/git-index.js +282 -0
- package/dist/rules/secrets.js +3 -3
- package/dist/scope.js +8 -0
- package/docs/assurance/README.md +28 -28
- package/docs/assurance/TRUST-PLAN.md +31 -31
- package/docs/assurance/internal-review.md +41 -41
- package/docs/assurance/supply-chain.md +42 -42
- package/docs/compatibility.md +15 -14
- package/docs/gen-rules.mjs +6 -6
- package/docs/quickstart.md +50 -50
- package/docs/rules.md +4 -4
- package/docs/security-advisories.md +26 -26
- package/llms.txt +27 -27
- package/package.json +1 -1
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { closeSync, fstatSync, lstatSync, openSync, readSync } from "node:fs";
|
|
3
|
+
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
4
|
+
const MAX_INDEX_BYTES = 32 * 1024 * 1024;
|
|
5
|
+
const MAX_GITDIR_FILE = 4096;
|
|
6
|
+
export function createGitCache() {
|
|
7
|
+
return { dir: new Map(), index: new Map() };
|
|
8
|
+
}
|
|
9
|
+
/** `.env`, `.env.local`, `.env.production`, and similar. Example and template files are not secret files. */
|
|
10
|
+
export function isDotenvName(name) {
|
|
11
|
+
return /^\.env(\..+)?$/i.test(name) && !/\.(example|sample|template)$/i.test(name);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* True when `absFile` is listed in the git index that owns it.
|
|
15
|
+
* `null` means there is no usable index (no repository, or the index could not be parsed).
|
|
16
|
+
* Reads the index file only. Does not run git.
|
|
17
|
+
*/
|
|
18
|
+
export function gitTracks(absFile, cache) {
|
|
19
|
+
const info = gitFor(dirname(absFile), cache);
|
|
20
|
+
if (info === "none" || info.paths === null)
|
|
21
|
+
return null;
|
|
22
|
+
let rel = relative(info.workTree, absFile);
|
|
23
|
+
rel = rel.split("\\").join("/");
|
|
24
|
+
if (rel === "" || rel === ".." || rel.startsWith("../") || isAbsolute(rel))
|
|
25
|
+
return null;
|
|
26
|
+
if (info.ignoreCase)
|
|
27
|
+
rel = rel.toLowerCase();
|
|
28
|
+
return info.paths.has(rel);
|
|
29
|
+
}
|
|
30
|
+
/** Local environment files that git does not track are not part of the review. */
|
|
31
|
+
export function shouldSkipUntrackedDotenv(name, absFile, cache) {
|
|
32
|
+
return isDotenvName(name) && gitTracks(absFile, cache) === false;
|
|
33
|
+
}
|
|
34
|
+
function gitFor(dir, cache) {
|
|
35
|
+
const hit = cache.dir.get(dir);
|
|
36
|
+
if (hit)
|
|
37
|
+
return hit;
|
|
38
|
+
const found = readGitAt(dir, cache);
|
|
39
|
+
if (found) {
|
|
40
|
+
cache.dir.set(dir, found);
|
|
41
|
+
return found;
|
|
42
|
+
}
|
|
43
|
+
const parent = dirname(dir);
|
|
44
|
+
if (parent === dir) {
|
|
45
|
+
cache.dir.set(dir, "none");
|
|
46
|
+
return "none";
|
|
47
|
+
}
|
|
48
|
+
const up = gitFor(parent, cache);
|
|
49
|
+
cache.dir.set(dir, up);
|
|
50
|
+
return up;
|
|
51
|
+
}
|
|
52
|
+
function readGitAt(dir, cache) {
|
|
53
|
+
const gitPath = join(dir, ".git");
|
|
54
|
+
let st;
|
|
55
|
+
try {
|
|
56
|
+
st = lstatSync(gitPath);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
if (st.isSymbolicLink())
|
|
62
|
+
return null;
|
|
63
|
+
if (st.isDirectory()) {
|
|
64
|
+
if (!isRegularFile(join(gitPath, "HEAD")))
|
|
65
|
+
return null;
|
|
66
|
+
return { workTree: dir, ...loadIndex(join(gitPath, "index"), cache, gitPath) };
|
|
67
|
+
}
|
|
68
|
+
if (!st.isFile() || st.size > MAX_GITDIR_FILE || st.size === 0)
|
|
69
|
+
return null;
|
|
70
|
+
const raw = readRegular(gitPath, st);
|
|
71
|
+
if (!raw)
|
|
72
|
+
return null;
|
|
73
|
+
const m = /^gitdir:[ \t]*([^\r\n]+)$/m.exec(raw.toString("utf8"));
|
|
74
|
+
if (!m)
|
|
75
|
+
return null;
|
|
76
|
+
const gitdir = resolve(dir, m[1].trim());
|
|
77
|
+
let gst;
|
|
78
|
+
try {
|
|
79
|
+
gst = lstatSync(gitdir);
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return { workTree: dir, paths: null, ignoreCase: false };
|
|
83
|
+
}
|
|
84
|
+
if (!gst.isDirectory() || gst.isSymbolicLink())
|
|
85
|
+
return { workTree: dir, paths: null, ignoreCase: false };
|
|
86
|
+
if (!isRegularFile(join(gitdir, "HEAD")))
|
|
87
|
+
return { workTree: dir, paths: null, ignoreCase: false };
|
|
88
|
+
return { workTree: dir, ...loadIndex(join(gitdir, "index"), cache, gitdir) };
|
|
89
|
+
}
|
|
90
|
+
function loadIndex(indexPath, cache, gitDir) {
|
|
91
|
+
const cached = cache.index.get(gitDir);
|
|
92
|
+
if (cached)
|
|
93
|
+
return cached;
|
|
94
|
+
const ignoreCase = readIgnoreCase(gitDir);
|
|
95
|
+
const store = (paths) => {
|
|
96
|
+
const info = { paths: paths && ignoreCase ? new Set([...paths].map((p) => p.toLowerCase())) : paths, ignoreCase };
|
|
97
|
+
cache.index.set(gitDir, info);
|
|
98
|
+
return info;
|
|
99
|
+
};
|
|
100
|
+
let st;
|
|
101
|
+
try {
|
|
102
|
+
st = lstatSync(indexPath);
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
return store(new Set());
|
|
106
|
+
}
|
|
107
|
+
if (!st.isFile() || st.isSymbolicLink() || st.size === 0 || st.size > MAX_INDEX_BYTES)
|
|
108
|
+
return store(null);
|
|
109
|
+
const buf = readRegular(indexPath, st);
|
|
110
|
+
return store(buf ? parseGitIndex(buf) : null);
|
|
111
|
+
}
|
|
112
|
+
/** `core.ignorecase` when the config says so. Windows and macOS default to true; Linux defaults to false. */
|
|
113
|
+
function readIgnoreCase(gitDir) {
|
|
114
|
+
const fallback = process.platform === "win32" || process.platform === "darwin";
|
|
115
|
+
const cfgPath = join(gitDir, "config");
|
|
116
|
+
let st;
|
|
117
|
+
try {
|
|
118
|
+
st = lstatSync(cfgPath);
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
return fallback;
|
|
122
|
+
}
|
|
123
|
+
if (!st.isFile() || st.isSymbolicLink() || st.size > 1024 * 1024)
|
|
124
|
+
return fallback;
|
|
125
|
+
const buf = readRegular(cfgPath, st);
|
|
126
|
+
if (!buf)
|
|
127
|
+
return fallback;
|
|
128
|
+
const m = /^[ \t]*ignorecase[ \t]*=[ \t]*(true|false)[ \t]*$/im.exec(buf.toString("utf8"));
|
|
129
|
+
return m ? m[1].toLowerCase() === "true" : fallback;
|
|
130
|
+
}
|
|
131
|
+
function isRegularFile(abs) {
|
|
132
|
+
try {
|
|
133
|
+
const st = lstatSync(abs);
|
|
134
|
+
return st.isFile() && !st.isSymbolicLink();
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/** Read a regular file that is still the same inode we just stat'ed. Returns null if it was swapped or is not a file. */
|
|
141
|
+
function readRegular(abs, expected) {
|
|
142
|
+
let fd;
|
|
143
|
+
try {
|
|
144
|
+
fd = openSync(abs, "r");
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
try {
|
|
150
|
+
const now = fstatSync(fd);
|
|
151
|
+
if (!now.isFile() || now.size !== expected.size)
|
|
152
|
+
return null;
|
|
153
|
+
if (expected.ino !== 0 && (now.ino !== expected.ino || now.dev !== expected.dev))
|
|
154
|
+
return null;
|
|
155
|
+
const buf = Buffer.alloc(now.size);
|
|
156
|
+
let off = 0;
|
|
157
|
+
while (off < buf.length) {
|
|
158
|
+
const n = readSync(fd, buf, off, buf.length - off, off);
|
|
159
|
+
if (n === 0)
|
|
160
|
+
break;
|
|
161
|
+
off += n;
|
|
162
|
+
}
|
|
163
|
+
if (off !== buf.length)
|
|
164
|
+
return null;
|
|
165
|
+
return buf;
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
finally {
|
|
171
|
+
closeSync(fd);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
const FILE_MODES = new Set([0o100644, 0o100755, 0o100664, 0o120000, 0o160000]);
|
|
175
|
+
/** Parse a git index (versions 2, 3, and 4; SHA-1 or SHA-256). Returns null if the bytes are not a valid index. */
|
|
176
|
+
export function parseGitIndex(buf) {
|
|
177
|
+
return parseWithHash(buf, 20) ?? parseWithHash(buf, 32);
|
|
178
|
+
}
|
|
179
|
+
function parseWithHash(buf, hashLen) {
|
|
180
|
+
if (buf.length < 12 + hashLen)
|
|
181
|
+
return null;
|
|
182
|
+
if (buf.toString("latin1", 0, 4) !== "DIRC")
|
|
183
|
+
return null;
|
|
184
|
+
const version = buf.readUInt32BE(4);
|
|
185
|
+
if (version < 2 || version > 4)
|
|
186
|
+
return null;
|
|
187
|
+
const count = buf.readUInt32BE(8);
|
|
188
|
+
if (count > 5_000_000)
|
|
189
|
+
return null;
|
|
190
|
+
const end = buf.length - hashLen;
|
|
191
|
+
const algo = hashLen === 32 ? "sha256" : "sha1";
|
|
192
|
+
const sum = createHash(algo).update(buf.subarray(0, end)).digest();
|
|
193
|
+
if (!sum.equals(buf.subarray(end)))
|
|
194
|
+
return null;
|
|
195
|
+
const paths = new Set();
|
|
196
|
+
let pos = 12;
|
|
197
|
+
let prev = "";
|
|
198
|
+
const flagAt = 40 + hashLen;
|
|
199
|
+
for (let i = 0; i < count; i++) {
|
|
200
|
+
if (pos + flagAt + 2 > end)
|
|
201
|
+
return null;
|
|
202
|
+
const mode = buf.readUInt32BE(pos + 24);
|
|
203
|
+
if (!FILE_MODES.has(mode))
|
|
204
|
+
return null;
|
|
205
|
+
const flags = buf.readUInt16BE(pos + flagAt);
|
|
206
|
+
const extended = (flags & 0x4000) !== 0;
|
|
207
|
+
if (extended && version < 3)
|
|
208
|
+
return null;
|
|
209
|
+
let nameAt = pos + flagAt + 2;
|
|
210
|
+
if (extended)
|
|
211
|
+
nameAt += 2;
|
|
212
|
+
if (nameAt > end)
|
|
213
|
+
return null;
|
|
214
|
+
let name;
|
|
215
|
+
let next;
|
|
216
|
+
if (version === 4) {
|
|
217
|
+
const dec = decodeVarint(buf, nameAt, end);
|
|
218
|
+
if (!dec)
|
|
219
|
+
return null;
|
|
220
|
+
const nul = buf.indexOf(0, dec.pos);
|
|
221
|
+
if (nul < 0 || nul >= end)
|
|
222
|
+
return null;
|
|
223
|
+
if (dec.value > prev.length)
|
|
224
|
+
return null;
|
|
225
|
+
name = prev.slice(0, prev.length - dec.value) + buf.toString("utf8", dec.pos, nul);
|
|
226
|
+
prev = name;
|
|
227
|
+
next = nul + 1;
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
const declared = flags & 0xfff;
|
|
231
|
+
let nameEnd;
|
|
232
|
+
if (declared === 0xfff) {
|
|
233
|
+
nameEnd = buf.indexOf(0, nameAt);
|
|
234
|
+
if (nameEnd < 0 || nameEnd >= end)
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
nameEnd = nameAt + declared;
|
|
239
|
+
if (nameEnd >= end || buf[nameEnd] !== 0)
|
|
240
|
+
return null;
|
|
241
|
+
}
|
|
242
|
+
name = buf.toString("utf8", nameAt, nameEnd);
|
|
243
|
+
const raw = nameEnd + 1 - pos;
|
|
244
|
+
next = pos + ((raw + 7) & ~7);
|
|
245
|
+
}
|
|
246
|
+
if (!name || name.includes("\\") || name.startsWith("/") || name.split("/").includes(".."))
|
|
247
|
+
return null;
|
|
248
|
+
paths.add(name);
|
|
249
|
+
if (next <= pos || next > end)
|
|
250
|
+
return null;
|
|
251
|
+
pos = next;
|
|
252
|
+
}
|
|
253
|
+
while (pos + 8 <= end) {
|
|
254
|
+
const sig = buf.toString("latin1", pos, pos + 4);
|
|
255
|
+
const size = buf.readUInt32BE(pos + 4);
|
|
256
|
+
if (size > end || pos + 8 + size > end)
|
|
257
|
+
return null;
|
|
258
|
+
// A split index keeps the real entries elsewhere. Don't treat a partial list as complete.
|
|
259
|
+
if (sig === "link")
|
|
260
|
+
return null;
|
|
261
|
+
pos += 8 + size;
|
|
262
|
+
}
|
|
263
|
+
if (pos !== end)
|
|
264
|
+
return null;
|
|
265
|
+
return paths;
|
|
266
|
+
}
|
|
267
|
+
/** Git's offset varint: continuation bytes are biased by +1. See git's decode_varint. */
|
|
268
|
+
function decodeVarint(buf, pos, end) {
|
|
269
|
+
if (pos >= end)
|
|
270
|
+
return null;
|
|
271
|
+
let c = buf[pos++];
|
|
272
|
+
let val = c & 127;
|
|
273
|
+
let guard = 0;
|
|
274
|
+
while (c & 128) {
|
|
275
|
+
if (pos >= end || ++guard > 9)
|
|
276
|
+
return null;
|
|
277
|
+
val += 1;
|
|
278
|
+
c = buf[pos++];
|
|
279
|
+
val = val * 128 + (c & 127);
|
|
280
|
+
}
|
|
281
|
+
return { value: val, pos };
|
|
282
|
+
}
|
package/dist/rules/secrets.js
CHANGED
|
@@ -81,13 +81,13 @@ export const secretRules = [
|
|
|
81
81
|
{
|
|
82
82
|
...base,
|
|
83
83
|
id: "VS-SECRET-006",
|
|
84
|
-
title: "
|
|
84
|
+
title: "Tracked environment file with a secret value",
|
|
85
85
|
severity: "medium",
|
|
86
86
|
confidence: "medium",
|
|
87
87
|
status: "potential",
|
|
88
88
|
cwe: ["CWE-312", "CWE-798"],
|
|
89
|
-
description: "A `.env
|
|
90
|
-
falsePositives: "
|
|
89
|
+
description: "A `.env` file (not an example, sample, or template) contains a secret-named variable with a non-placeholder value. File contents are not echoed. When a git index is present, environment files that are not listed in it are not read. When there is no usable git index, the file is still reviewed.",
|
|
90
|
+
falsePositives: "Placeholder values and non-secret settings. `.env.example`, `.env.sample`, and `.env.template` are not reported. A local `.env` that git does not track is not a finding.",
|
|
91
91
|
applies: (f) => /^\.env(\..+)?$/.test(f.name) && !/\.(example|sample|template)$/.test(f.name),
|
|
92
92
|
check: (f) => {
|
|
93
93
|
const idx = f.lines.findIndex((l) => {
|
package/dist/scope.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { lstatSync, readdirSync, realpathSync, openSync, readSync, closeSync, fstatSync } from "node:fs";
|
|
2
2
|
import { join, basename, extname, relative, isAbsolute } from "node:path";
|
|
3
3
|
import { makeIgnoreMatcher } from "./policy.js";
|
|
4
|
+
import { createGitCache, shouldSkipUntrackedDotenv } from "./git-index.js";
|
|
4
5
|
/** True when `p` is `root` or lies beneath it (case-insensitive on Windows). */
|
|
5
6
|
export function isInside(root, p) {
|
|
6
7
|
const fix = (s) => (process.platform === "win32" ? s.toLowerCase() : s);
|
|
@@ -56,6 +57,7 @@ export function inventory(rootInput, policy) {
|
|
|
56
57
|
};
|
|
57
58
|
const files = [];
|
|
58
59
|
const allPaths = new Set();
|
|
60
|
+
const gitCache = createGitCache();
|
|
59
61
|
const deadline = Date.now() + policy.timeLimitMs;
|
|
60
62
|
const walk = (dirAbs, dirRel) => {
|
|
61
63
|
if (stats.truncated)
|
|
@@ -105,6 +107,12 @@ export function inventory(rootInput, policy) {
|
|
|
105
107
|
stats.skippedIgnored++;
|
|
106
108
|
continue;
|
|
107
109
|
}
|
|
110
|
+
// A local .env that git does not track is not a committed secret. Leave it unread.
|
|
111
|
+
// With no usable git index, the file is still reviewed.
|
|
112
|
+
if (shouldSkipUntrackedDotenv(e.name, abs, gitCache)) {
|
|
113
|
+
stats.skippedIgnored++;
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
108
116
|
allPaths.add(rel);
|
|
109
117
|
if (st.size > policy.maxFileSize) {
|
|
110
118
|
stats.skippedTooLarge++;
|
package/docs/assurance/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# Trust and verification
|
|
2
|
-
|
|
3
|
-
Everything on this page can be re-run. Where something has **not** been verified, it says so.
|
|
4
|
-
|
|
5
|
-
## Claim, evidence, how to check
|
|
6
|
-
|
|
7
|
-
| Claim | Evidence | Reproduce |
|
|
8
|
-
|---|---|---|
|
|
9
|
-
| Works offline, no network or subprocess use | Static test, runtime test with blocked network and subprocess APIs, Linux network-namespace test in CI: [offline-verification.md](offline-verification.md) | `npm test` |
|
|
10
|
-
| Does not crash, hang or leak on hostile input | Fuzz and ReDoS tests; two real quadratic regexes were found and fixed: [fuzzing.md](fuzzing.md) | `npm test` |
|
|
11
|
-
| Tests exercise the code | 98.4 % line, 89.6 % branch coverage: [coverage.md](coverage.md) | see file |
|
|
12
|
-
| Few false positives on real code | Benchmark on 18 public repositories with a labeled sample, a holdout sample and a regression check: [benchmark.md](benchmark.md) | `node benchmarks/run.mjs` |
|
|
13
|
-
| How it compares | Same commits scanned with Gitleaks and Semgrep: [benchmark.md](benchmark.md#comparison-with-other-open-source-scanners) | **benchmark** workflow |
|
|
14
|
-
| Small, auditable supply chain | Zero runtime dependencies, SBOMs, `npm audit` clean, pinned Actions: [supply-chain.md](supply-chain.md) | `npm sbom`, `npm audit` |
|
|
15
|
-
| Reviewed for security flaws | Internal review plus CodeQL, ten fixes with tests: [internal-review.md](internal-review.md). **Not independent.** | read the tests |
|
|
16
|
-
| Name conflicts | Preliminary search, **not clearance**: [trademark-search.md](trademark-search.md) | |
|
|
17
|
-
| How vulnerabilities are handled | [SECURITY.md](../../SECURITY.md) and the public ledger [security-advisories.md](../security-advisories.md) | |
|
|
18
|
-
|
|
19
|
-
## What is deliberately not claimed
|
|
20
|
-
|
|
21
|
-
- No claim of certification, compliance, or "secure".
|
|
22
|
-
- No recall figure: how many real problems VigilSutra misses is **not measured**.
|
|
23
|
-
- No independent review or independent labels yet; [REVIEW-REQUEST.md](REVIEW-REQUEST.md) explains how to provide them.
|
|
24
|
-
- No adoption claims. See [ADOPTERS.md](../../ADOPTERS.md).
|
|
25
|
-
|
|
26
|
-
## The plan behind this page
|
|
27
|
-
|
|
28
|
-
[TRUST-PLAN.md](TRUST-PLAN.md) lists every gap that was identified, what was done and what remains (some items need the owner or an outside party).
|
|
1
|
+
# Trust and verification
|
|
2
|
+
|
|
3
|
+
Everything on this page can be re-run. Where something has **not** been verified, it says so.
|
|
4
|
+
|
|
5
|
+
## Claim, evidence, how to check
|
|
6
|
+
|
|
7
|
+
| Claim | Evidence | Reproduce |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Works offline, no network or subprocess use | Static test, runtime test with blocked network and subprocess APIs, Linux network-namespace test in CI: [offline-verification.md](offline-verification.md) | `npm test` |
|
|
10
|
+
| Does not crash, hang or leak on hostile input | Fuzz and ReDoS tests; two real quadratic regexes were found and fixed: [fuzzing.md](fuzzing.md) | `npm test` |
|
|
11
|
+
| Tests exercise the code | 98.4 % line, 89.6 % branch coverage: [coverage.md](coverage.md) | see file |
|
|
12
|
+
| Few false positives on real code | Benchmark on 18 public repositories with a labeled sample, a holdout sample and a regression check: [benchmark.md](benchmark.md) | `node benchmarks/run.mjs` |
|
|
13
|
+
| How it compares | Same commits scanned with Gitleaks and Semgrep: [benchmark.md](benchmark.md#comparison-with-other-open-source-scanners) | **benchmark** workflow |
|
|
14
|
+
| Small, auditable supply chain | Zero runtime dependencies, SBOMs, `npm audit` clean, pinned Actions: [supply-chain.md](supply-chain.md) | `npm sbom`, `npm audit` |
|
|
15
|
+
| Reviewed for security flaws | Internal review plus CodeQL, ten fixes with tests: [internal-review.md](internal-review.md). **Not independent.** | read the tests |
|
|
16
|
+
| Name conflicts | Preliminary search, **not clearance**: [trademark-search.md](trademark-search.md) | |
|
|
17
|
+
| How vulnerabilities are handled | [SECURITY.md](../../SECURITY.md) and the public ledger [security-advisories.md](../security-advisories.md) | |
|
|
18
|
+
|
|
19
|
+
## What is deliberately not claimed
|
|
20
|
+
|
|
21
|
+
- No claim of certification, compliance, or "secure".
|
|
22
|
+
- No recall figure: how many real problems VigilSutra misses is **not measured**.
|
|
23
|
+
- No independent review or independent labels yet; [REVIEW-REQUEST.md](REVIEW-REQUEST.md) explains how to provide them.
|
|
24
|
+
- No adoption claims. See [ADOPTERS.md](../../ADOPTERS.md).
|
|
25
|
+
|
|
26
|
+
## The plan behind this page
|
|
27
|
+
|
|
28
|
+
[TRUST-PLAN.md](TRUST-PLAN.md) lists every gap that was identified, what was done and what remains (some items need the owner or an outside party).
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
# Trust plan: gaps, work done, what remains
|
|
2
|
-
|
|
3
|
-
Written 2026-11-01 after an independent-auditor style review of what a skeptical visitor would ask for. Status values: **Done**, **Done with caveat**, **Blocked** (needs the owner or an outside party), **Not possible by tooling**.
|
|
4
|
-
|
|
5
|
-
| # | Gap | Status | What was done | What remains |
|
|
6
|
-
|---|---|---|---|---|
|
|
7
|
-
| 1 | Real-world accuracy evidence (fixtures were written by the rule author) | **Done with caveat** | Ran 18 public repos; labeled a sample; found and fixed 20+ false-positive classes; measured a holdout sample; regression-checked that real findings survive: [benchmark.md](benchmark.md) | Labels are AI-assigned and the sample is not random. Independent human re-labeling would strengthen it |
|
|
8
|
-
| 2 | Comparison with other tools on a shared corpus | **Done with caveat** | Gitleaks 8.30.1 and Semgrep 1.183.0 on identical commits, on Linux CI; 7 deliberately vulnerable projects included | Trivy and CodeQL not run. Recall not measured |
|
|
9
|
-
| 3 | Independent verification | **Blocked / not possible by tooling** | Internal review with 10 fixes and tests; GitHub CodeQL (an independent static analyzer) now runs on every push and found 3 real-or-near-real issues that were fixed: [internal-review.md](internal-review.md); open request for reviewers: [REVIEW-REQUEST.md](REVIEW-REQUEST.md) | Someone outside the project has to review it. Owner: recruit a reviewer |
|
|
10
|
-
| 4 | npm provenance | **Blocked** | `release.yml` publishes with provenance via Trusted Publishing; Actions pinned; Dependabot on | Owner must add the Trusted Publisher on npmjs.com and run a release. Versions 0.1.0 and 0.1.1 on npm have no provenance |
|
|
11
|
-
| 5 | Verified offline claim | **Done** | Runtime test with blocked network/subprocess APIs; Linux network-namespace step in CI: [offline-verification.md](offline-verification.md) | |
|
|
12
|
-
| 6 | Visible CI status | **Done** | CI badge, 3 OS x Node 20/22 matrix, compatibility page; OpenSSF Scorecard published (5.5/10 at first run); CodeQL on every push | Scorecard weak spots: branch protection, required code review, repository age, OpenSSF best-practices badge (owner actions) |
|
|
13
|
-
| 7 | Fuzz and ReDoS testing | **Done** | Seeded fuzz and adversarial-timing tests; found 2 real quadratic regexes: [fuzzing.md](fuzzing.md) | No formal regex analysis |
|
|
14
|
-
| 8 | Coverage figure | **Done** | 98.4 % lines, 89.6 % branches: [coverage.md](coverage.md) | No enforced threshold or mutation testing |
|
|
15
|
-
| 9 | Dependency, license and SBOM report | **Done** | CycloneDX and SPDX SBOMs, license table, `npm audit`: [supply-chain.md](supply-chain.md) | Zero runtime dependencies, so little to report |
|
|
16
|
-
| 10 | Security response record | **Done with caveat** | Policy, targets, public ledger: [security-advisories.md](../security-advisories.md) | There is no external report history yet and none was invented |
|
|
17
|
-
| 11 | Real demo | **Done with caveat** | Terminal image generated from real output (`docs/assets/demo.svg`) | A public demo repository showing alerts in GitHub's code-scanning tab was **not created** (needs the owner's approval to create another public repository). No animated GIF |
|
|
18
|
-
| 12 | Stars, early adopters, answered issues | **Not possible by tooling** | `ADOPTERS.md`, issue templates, [launch-kit.md](../launch-kit.md) | Real users and their feedback |
|
|
19
|
-
| 13 | Launch write-up with real numbers | **Done with caveat** | Draft in [launch-kit.md](../launch-kit.md) using measured numbers | Owner to publish and promote |
|
|
20
|
-
| 14 | Public changelog and cadence | **Done with caveat** | CHANGELOG, tags, releases | Cadence depends on the maintainer |
|
|
21
|
-
| 15 | Rule precision claims in docs | **Done** | Each rule's false-positive text kept; benchmark per-rule table; confidence lowered for test and example paths | |
|
|
22
|
-
| H1 | Exposed GitHub token | **Blocked** | Never written to the repo | Owner must revoke it |
|
|
23
|
-
| H2 | npm package owned by a personal account, org exists | **Blocked** | | `npm owner add` / transfer to the `vigilsutra` org |
|
|
24
|
-
| H3 | Trademark clearance | **Blocked** | Preliminary search: [trademark-search.md](trademark-search.md) | Formal search by an attorney |
|
|
25
|
-
| H4 | Dependabot pull requests (5 open) | **Pending (owner decision)** | Recommendation: merge the three official-action bumps (`actions/checkout` 7, `actions/setup-node` 7, `codeql-action` 4) once CI is green on the PR; close TypeScript 7 (its CI run fails) and `@types/node` 26 (the package supports Node 20, so types for Node 26 would hide API misuse) | Merge or close each |
|
|
26
|
-
|
|
27
|
-
## Principles used
|
|
28
|
-
|
|
29
|
-
1. Publish measured results only, with method and limits next to the number.
|
|
30
|
-
2. Fix what the measurement finds, then measure again on data the fixes were not tuned on.
|
|
31
|
-
3. Never invent users, reviews, reports or endorsements.
|
|
1
|
+
# Trust plan: gaps, work done, what remains
|
|
2
|
+
|
|
3
|
+
Written 2026-11-01 after an independent-auditor style review of what a skeptical visitor would ask for. Status values: **Done**, **Done with caveat**, **Blocked** (needs the owner or an outside party), **Not possible by tooling**.
|
|
4
|
+
|
|
5
|
+
| # | Gap | Status | What was done | What remains |
|
|
6
|
+
|---|---|---|---|---|
|
|
7
|
+
| 1 | Real-world accuracy evidence (fixtures were written by the rule author) | **Done with caveat** | Ran 18 public repos; labeled a sample; found and fixed 20+ false-positive classes; measured a holdout sample; regression-checked that real findings survive: [benchmark.md](benchmark.md) | Labels are AI-assigned and the sample is not random. Independent human re-labeling would strengthen it |
|
|
8
|
+
| 2 | Comparison with other tools on a shared corpus | **Done with caveat** | Gitleaks 8.30.1 and Semgrep 1.183.0 on identical commits, on Linux CI; 7 deliberately vulnerable projects included | Trivy and CodeQL not run. Recall not measured |
|
|
9
|
+
| 3 | Independent verification | **Blocked / not possible by tooling** | Internal review with 10 fixes and tests; GitHub CodeQL (an independent static analyzer) now runs on every push and found 3 real-or-near-real issues that were fixed: [internal-review.md](internal-review.md); open request for reviewers: [REVIEW-REQUEST.md](REVIEW-REQUEST.md) | Someone outside the project has to review it. Owner: recruit a reviewer |
|
|
10
|
+
| 4 | npm provenance | **Blocked** | `release.yml` publishes with provenance via Trusted Publishing; Actions pinned; Dependabot on | Owner must add the Trusted Publisher on npmjs.com and run a release. Versions 0.1.0 and 0.1.1 on npm have no provenance |
|
|
11
|
+
| 5 | Verified offline claim | **Done** | Runtime test with blocked network/subprocess APIs; Linux network-namespace step in CI: [offline-verification.md](offline-verification.md) | |
|
|
12
|
+
| 6 | Visible CI status | **Done** | CI badge, 3 OS x Node 20/22 matrix, compatibility page; OpenSSF Scorecard published (5.5/10 at first run); CodeQL on every push | Scorecard weak spots: branch protection, required code review, repository age, OpenSSF best-practices badge (owner actions) |
|
|
13
|
+
| 7 | Fuzz and ReDoS testing | **Done** | Seeded fuzz and adversarial-timing tests; found 2 real quadratic regexes: [fuzzing.md](fuzzing.md) | No formal regex analysis |
|
|
14
|
+
| 8 | Coverage figure | **Done** | 98.4 % lines, 89.6 % branches: [coverage.md](coverage.md) | No enforced threshold or mutation testing |
|
|
15
|
+
| 9 | Dependency, license and SBOM report | **Done** | CycloneDX and SPDX SBOMs, license table, `npm audit`: [supply-chain.md](supply-chain.md) | Zero runtime dependencies, so little to report |
|
|
16
|
+
| 10 | Security response record | **Done with caveat** | Policy, targets, public ledger: [security-advisories.md](../security-advisories.md) | There is no external report history yet and none was invented |
|
|
17
|
+
| 11 | Real demo | **Done with caveat** | Terminal image generated from real output (`docs/assets/demo.svg`) | A public demo repository showing alerts in GitHub's code-scanning tab was **not created** (needs the owner's approval to create another public repository). No animated GIF |
|
|
18
|
+
| 12 | Stars, early adopters, answered issues | **Not possible by tooling** | `ADOPTERS.md`, issue templates, [launch-kit.md](../launch-kit.md) | Real users and their feedback |
|
|
19
|
+
| 13 | Launch write-up with real numbers | **Done with caveat** | Draft in [launch-kit.md](../launch-kit.md) using measured numbers | Owner to publish and promote |
|
|
20
|
+
| 14 | Public changelog and cadence | **Done with caveat** | CHANGELOG, tags, releases | Cadence depends on the maintainer |
|
|
21
|
+
| 15 | Rule precision claims in docs | **Done** | Each rule's false-positive text kept; benchmark per-rule table; confidence lowered for test and example paths | |
|
|
22
|
+
| H1 | Exposed GitHub token | **Blocked** | Never written to the repo | Owner must revoke it |
|
|
23
|
+
| H2 | npm package owned by a personal account, org exists | **Blocked** | | `npm owner add` / transfer to the `vigilsutra` org |
|
|
24
|
+
| H3 | Trademark clearance | **Blocked** | Preliminary search: [trademark-search.md](trademark-search.md) | Formal search by an attorney |
|
|
25
|
+
| H4 | Dependabot pull requests (5 open) | **Pending (owner decision)** | Recommendation: merge the three official-action bumps (`actions/checkout` 7, `actions/setup-node` 7, `codeql-action` 4) once CI is green on the PR; close TypeScript 7 (its CI run fails) and `@types/node` 26 (the package supports Node 20, so types for Node 26 would hide API misuse) | Merge or close each |
|
|
26
|
+
|
|
27
|
+
## Principles used
|
|
28
|
+
|
|
29
|
+
1. Publish measured results only, with method and limits next to the number.
|
|
30
|
+
2. Fix what the measurement finds, then measure again on data the fixes were not tuned on.
|
|
31
|
+
3. Never invent users, reviews, reports or endorsements.
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
# Internal security review
|
|
2
|
-
|
|
3
|
-
> **Warning:** this review was done by the project's maintainer working with an AI assistant. It is **not independent**. It exists so that known weaknesses are fixed and visible, and so an outside reviewer has a starting point. See [REVIEW-REQUEST.md](REVIEW-REQUEST.md) for how to ask for an independent review.
|
|
4
|
-
|
|
5
|
-
Date: 2026-11-01. Scope: all of `src/` (about 1,900 lines), the CLI contract, report writers, the Claude adapter, the GitHub workflows and the fuzz/benchmark data. Method: manual read-through against the threat model, adversarial tests, fuzzing, and a run over 18 public repositories.
|
|
6
|
-
|
|
7
|
-
## Findings and fixes
|
|
8
|
-
|
|
9
|
-
| ID | Severity | Finding | Fix | Test |
|
|
10
|
-
|---|---|---|---|---|
|
|
11
|
-
| IR-1 | medium | **Adapter uninstall trusted its manifest.** The check used a string prefix, so a manifest listing a sibling such as `.claude/skills-evil/x/SKILL.md` would pass and be deleted. The manifest lives in the project and can be edited by anyone with write access. | Entries must resolve to exactly `.claude/skills/<name>/SKILL.md` (path-relative check, no `..`, no absolute paths) | `review: adapter uninstall refuses manifest entries outside ...` |
|
|
12
|
-
| IR-2 | medium | **A hostile project can silence the scan.** The project's own `.vigilsutra.yml` can ignore every file or disable rules, so auditing someone else's repository could report "clean". | Reports now state when scope was narrowed by a policy (`scope.policy`, a limitation line). New `--policy <file>` uses a trusted policy and `--no-policy` ignores the project's | `review: a project policy that narrows scope is disclosed ...` |
|
|
13
|
-
| IR-3 | low | **Time-of-check/time-of-use symlink swap.** A path could be replaced by a symlink between `lstat` and the read, so the read would follow it out of the project. | Each file is opened once; the descriptor's device and inode must match the earlier `lstat`, otherwise the file is refused. Also halves file opens | `review: isInside ...`, junction test; a race itself is not simulated |
|
|
14
|
-
| IR-4 | medium | **Invalid SARIF for unusual paths.** File URIs were not percent-encoded, so paths with spaces, `#` or `%` produce invalid locations in code-scanning tools. | Each path segment is `encodeURIComponent`-encoded | `review: SARIF file locations are percent-encoded URIs` |
|
|
15
|
-
| IR-5 | low | **Markdown injection through file names.** A backtick in a file name closed the inline code span in the Markdown report. | Backticks and line breaks replaced in code spans | `review: Markdown report cannot be broken out ...` |
|
|
16
|
-
| IR-6 | low | **Terminal escape injection.** ANSI escapes or bidi controls in file names or excerpts reached the terminal. | Control characters neutralized in excerpts and in the text report | `review: terminal control characters ... are neutralized` |
|
|
17
|
-
| IR-7 | low | **Unbounded output.** One rule matching every line of a 1 MiB file could create hundreds of thousands of findings. | Cap of 200 findings per rule per file; the cut is disclosed in `limitations` and `scope.cappedFindings` | `review: one rule matching thousands of lines ... is capped` |
|
|
18
|
-
| IR-8 | medium | **Two quadratic regular expressions** (found by the fuzz tests): `^\s*-?\s*uses:` on whitespace-only lines and multi-line `\s*` that spans newlines in YAML detection. One crafted 2 MB file took 4 seconds. | Anchored patterns without overlapping quantifiers; `[ \t]*` for same-line whitespace | `ReDoS guard: each rule handles 1,000 adversarial 1,990-character lines quickly` |
|
|
19
|
-
| IR-9 | low | **Wrong line used by look-back filters.** Rules located the matched line with `indexOf(line)`, which returns the first identical line in the file, so a later egress block was judged by an earlier ingress block. Found by the holdout benchmark. | Filters receive the real line number | `IAC-001 uses the real line ...` |
|
|
20
|
-
|
|
21
|
-
| IR-10 | low | **Check-then-write races in `init` and the adapter** (reported by GitHub CodeQL, an independent static analyzer, after it was added to CI). `existsSync` followed by a write could overwrite a file created in between. | `init` creates with the exclusive `wx` flag; adapter installs use `COPYFILE_EXCL` for new files and treat "already exists" as skip | `init creates policy once and never overwrites`, `adapters: claude install is previewable, non-destructive ...` |
|
|
22
|
-
|
|
23
|
-
All ten were fixed and each has a test (IR-10 reuses existing no-overwrite tests). The test suite grew from 56 to 94 tests as a result of this work. CodeQL's other alerts were a regular expression it judged unanchored (rewritten), a documentation-generator escaping bug (fixed, it would have mis-rendered pipe characters in `docs/rules.md`) and a race in a test helper (dismissed: test code).
|
|
24
|
-
|
|
25
|
-
## Checked and found acceptable
|
|
26
|
-
|
|
27
|
-
- No `child_process`, network, `eval` or dynamic `import()` in `src/` (static test and runtime test with blocked network and subprocess APIs).
|
|
28
|
-
- `--out` writes where the user asks; nothing else is written by `audit`, `verify`, `explain`, `rules` or `doctor`.
|
|
29
|
-
- HTML report: every untrusted value passes through one escaper; strict CSP; tested with hostile names and code.
|
|
30
|
-
- Fingerprints never include secret values; secret spans from all rules on a line are removed from every finding that quotes the line.
|
|
31
|
-
- Policy and baseline parsers reject malformed and hostile input with exit code 2 (tested with 1 MB lines, 50,000 list items, NUL and lone surrogates).
|
|
32
|
-
|
|
33
|
-
## Residual risks (not fixed)
|
|
34
|
-
|
|
35
|
-
1. Pattern rules are evadable by obfuscation and produce false positives (measured in [benchmark.md](benchmark.md)).
|
|
36
|
-
2. The time limit is checked between files, so a stalled filesystem read is not interrupted.
|
|
37
|
-
3. Regular-expression safety is evidenced by fuzzing with 16 adversarial shapes, not by a formal proof.
|
|
38
|
-
4. The TOCTOU defence is not tested with a real race; it relies on the descriptor's device and inode, which some filesystems report as zero (the check is skipped there).
|
|
39
|
-
5. Windows long paths (over 260 characters) were not tested.
|
|
40
|
-
6. The Claude adapter copies skill text; a malicious or compromised copy of this package could ship hostile skill instructions. Install from the official npm package or repository and review `agents/*/SKILL.md`.
|
|
41
|
-
7. No third-party has reviewed any of this.
|
|
1
|
+
# Internal security review
|
|
2
|
+
|
|
3
|
+
> **Warning:** this review was done by the project's maintainer working with an AI assistant. It is **not independent**. It exists so that known weaknesses are fixed and visible, and so an outside reviewer has a starting point. See [REVIEW-REQUEST.md](REVIEW-REQUEST.md) for how to ask for an independent review.
|
|
4
|
+
|
|
5
|
+
Date: 2026-11-01. Scope: all of `src/` (about 1,900 lines), the CLI contract, report writers, the Claude adapter, the GitHub workflows and the fuzz/benchmark data. Method: manual read-through against the threat model, adversarial tests, fuzzing, and a run over 18 public repositories.
|
|
6
|
+
|
|
7
|
+
## Findings and fixes
|
|
8
|
+
|
|
9
|
+
| ID | Severity | Finding | Fix | Test |
|
|
10
|
+
|---|---|---|---|---|
|
|
11
|
+
| IR-1 | medium | **Adapter uninstall trusted its manifest.** The check used a string prefix, so a manifest listing a sibling such as `.claude/skills-evil/x/SKILL.md` would pass and be deleted. The manifest lives in the project and can be edited by anyone with write access. | Entries must resolve to exactly `.claude/skills/<name>/SKILL.md` (path-relative check, no `..`, no absolute paths) | `review: adapter uninstall refuses manifest entries outside ...` |
|
|
12
|
+
| IR-2 | medium | **A hostile project can silence the scan.** The project's own `.vigilsutra.yml` can ignore every file or disable rules, so auditing someone else's repository could report "clean". | Reports now state when scope was narrowed by a policy (`scope.policy`, a limitation line). New `--policy <file>` uses a trusted policy and `--no-policy` ignores the project's | `review: a project policy that narrows scope is disclosed ...` |
|
|
13
|
+
| IR-3 | low | **Time-of-check/time-of-use symlink swap.** A path could be replaced by a symlink between `lstat` and the read, so the read would follow it out of the project. | Each file is opened once; the descriptor's device and inode must match the earlier `lstat`, otherwise the file is refused. Also halves file opens | `review: isInside ...`, junction test; a race itself is not simulated |
|
|
14
|
+
| IR-4 | medium | **Invalid SARIF for unusual paths.** File URIs were not percent-encoded, so paths with spaces, `#` or `%` produce invalid locations in code-scanning tools. | Each path segment is `encodeURIComponent`-encoded | `review: SARIF file locations are percent-encoded URIs` |
|
|
15
|
+
| IR-5 | low | **Markdown injection through file names.** A backtick in a file name closed the inline code span in the Markdown report. | Backticks and line breaks replaced in code spans | `review: Markdown report cannot be broken out ...` |
|
|
16
|
+
| IR-6 | low | **Terminal escape injection.** ANSI escapes or bidi controls in file names or excerpts reached the terminal. | Control characters neutralized in excerpts and in the text report | `review: terminal control characters ... are neutralized` |
|
|
17
|
+
| IR-7 | low | **Unbounded output.** One rule matching every line of a 1 MiB file could create hundreds of thousands of findings. | Cap of 200 findings per rule per file; the cut is disclosed in `limitations` and `scope.cappedFindings` | `review: one rule matching thousands of lines ... is capped` |
|
|
18
|
+
| IR-8 | medium | **Two quadratic regular expressions** (found by the fuzz tests): `^\s*-?\s*uses:` on whitespace-only lines and multi-line `\s*` that spans newlines in YAML detection. One crafted 2 MB file took 4 seconds. | Anchored patterns without overlapping quantifiers; `[ \t]*` for same-line whitespace | `ReDoS guard: each rule handles 1,000 adversarial 1,990-character lines quickly` |
|
|
19
|
+
| IR-9 | low | **Wrong line used by look-back filters.** Rules located the matched line with `indexOf(line)`, which returns the first identical line in the file, so a later egress block was judged by an earlier ingress block. Found by the holdout benchmark. | Filters receive the real line number | `IAC-001 uses the real line ...` |
|
|
20
|
+
|
|
21
|
+
| IR-10 | low | **Check-then-write races in `init` and the adapter** (reported by GitHub CodeQL, an independent static analyzer, after it was added to CI). `existsSync` followed by a write could overwrite a file created in between. | `init` creates with the exclusive `wx` flag; adapter installs use `COPYFILE_EXCL` for new files and treat "already exists" as skip | `init creates policy once and never overwrites`, `adapters: claude install is previewable, non-destructive ...` |
|
|
22
|
+
|
|
23
|
+
All ten were fixed and each has a test (IR-10 reuses existing no-overwrite tests). The test suite grew from 56 to 94 tests as a result of this work. CodeQL's other alerts were a regular expression it judged unanchored (rewritten), a documentation-generator escaping bug (fixed, it would have mis-rendered pipe characters in `docs/rules.md`) and a race in a test helper (dismissed: test code).
|
|
24
|
+
|
|
25
|
+
## Checked and found acceptable
|
|
26
|
+
|
|
27
|
+
- No `child_process`, network, `eval` or dynamic `import()` in `src/` (static test and runtime test with blocked network and subprocess APIs).
|
|
28
|
+
- `--out` writes where the user asks; nothing else is written by `audit`, `verify`, `explain`, `rules` or `doctor`.
|
|
29
|
+
- HTML report: every untrusted value passes through one escaper; strict CSP; tested with hostile names and code.
|
|
30
|
+
- Fingerprints never include secret values; secret spans from all rules on a line are removed from every finding that quotes the line.
|
|
31
|
+
- Policy and baseline parsers reject malformed and hostile input with exit code 2 (tested with 1 MB lines, 50,000 list items, NUL and lone surrogates).
|
|
32
|
+
|
|
33
|
+
## Residual risks (not fixed)
|
|
34
|
+
|
|
35
|
+
1. Pattern rules are evadable by obfuscation and produce false positives (measured in [benchmark.md](benchmark.md)).
|
|
36
|
+
2. The time limit is checked between files, so a stalled filesystem read is not interrupted.
|
|
37
|
+
3. Regular-expression safety is evidenced by fuzzing with 16 adversarial shapes, not by a formal proof.
|
|
38
|
+
4. The TOCTOU defence is not tested with a real race; it relies on the descriptor's device and inode, which some filesystems report as zero (the check is skipped there).
|
|
39
|
+
5. Windows long paths (over 260 characters) were not tested.
|
|
40
|
+
6. The Claude adapter copies skill text; a malicious or compromised copy of this package could ship hostile skill instructions. Install from the official npm package or repository and review `agents/*/SKILL.md`.
|
|
41
|
+
7. No third-party has reviewed any of this.
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
# Supply chain: dependencies, licenses, SBOM
|
|
2
|
-
|
|
3
|
-
Date 2026-11-01. Package `vigilsutra@0.1.0`.
|
|
4
|
-
|
|
5
|
-
## Runtime dependencies: none
|
|
6
|
-
|
|
7
|
-
`package.json` has no `dependencies`. Installing `vigilsutra` from npm installs one package: itself. The CycloneDX 1.5 SBOM for production contains **0 components** ([sbom-production.cdx.json](sbom-production.cdx.json)); an SPDX version is in [sbom-production.spdx.json](sbom-production.spdx.json).
|
|
8
|
-
|
|
9
|
-
## Development dependencies (build and test only, never shipped)
|
|
10
|
-
|
|
11
|
-
| Package | Version | License |
|
|
12
|
-
|---|---|---|
|
|
13
|
-
| typescript | 7.0.2 (latest; native compiler, platform binary via `@typescript/typescript-<platform>`, Apache-2.0) | Apache-2.0 |
|
|
14
|
-
| @types/node | 22.20.5 (typed against Node 22 on purpose: Node 20 is end-of-life but still supported, so the types must not expose newer-only APIs) | MIT |
|
|
15
|
-
| undici-types (via @types/node) | 6.21.0 | MIT |
|
|
16
|
-
|
|
17
|
-
Full dev SBOM: [sbom-full-dev.cdx.json](sbom-full-dev.cdx.json). All licenses are compatible with Apache-2.0 distribution.
|
|
18
|
-
|
|
19
|
-
## Known vulnerabilities
|
|
20
|
-
|
|
21
|
-
`npm audit` on 2026-11-01 reported **0** vulnerabilities (info 0, low 0, moderate 0, high 0, critical 0) across 3 dev dependencies ([npm-audit.json](npm-audit.json)). An audit is a point-in-time check against the npm advisory database.
|
|
22
|
-
|
|
23
|
-
## Build and release integrity
|
|
24
|
-
|
|
25
|
-
| Control | State |
|
|
26
|
-
|---|---|
|
|
27
|
-
| Lockfile committed, `npm ci` in CI | yes |
|
|
28
|
-
| GitHub Actions pinned to commit SHAs | yes, all workflows |
|
|
29
|
-
| Dependabot for Actions and npm | enabled |
|
|
30
|
-
| Workflow permissions | `contents: read` by default; `id-token: write` and `security-events: write` only where needed |
|
|
31
|
-
| OpenSSF Scorecard workflow | added; first result pending |
|
|
32
|
-
| npm provenance (attestation linking the package to this repository and workflow) | **workflow written, not yet exercised.** Requires the owner to configure Trusted Publishing on npmjs.com; see [releasing.md](../releasing.md). Versions 0.1.0 and 0.1.1 were uploaded by hand and have no provenance |
|
|
33
|
-
| Reproducible builds | not verified |
|
|
34
|
-
| Package contents | 44 files in `dist`, `agents`, `adapters`, `policies`, `schemas`, `docs`, `templates` and top-level docs; no source maps, no tests |
|
|
35
|
-
|
|
36
|
-
## Reproduce
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npm ci && npm audit
|
|
40
|
-
npm sbom --sbom-format cyclonedx --omit dev
|
|
41
|
-
npm pack --dry-run
|
|
42
|
-
```
|
|
1
|
+
# Supply chain: dependencies, licenses, SBOM
|
|
2
|
+
|
|
3
|
+
Date 2026-11-01. Package `vigilsutra@0.1.0`.
|
|
4
|
+
|
|
5
|
+
## Runtime dependencies: none
|
|
6
|
+
|
|
7
|
+
`package.json` has no `dependencies`. Installing `vigilsutra` from npm installs one package: itself. The CycloneDX 1.5 SBOM for production contains **0 components** ([sbom-production.cdx.json](sbom-production.cdx.json)); an SPDX version is in [sbom-production.spdx.json](sbom-production.spdx.json).
|
|
8
|
+
|
|
9
|
+
## Development dependencies (build and test only, never shipped)
|
|
10
|
+
|
|
11
|
+
| Package | Version | License |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| typescript | 7.0.2 (latest; native compiler, platform binary via `@typescript/typescript-<platform>`, Apache-2.0) | Apache-2.0 |
|
|
14
|
+
| @types/node | 22.20.5 (typed against Node 22 on purpose: Node 20 is end-of-life but still supported, so the types must not expose newer-only APIs) | MIT |
|
|
15
|
+
| undici-types (via @types/node) | 6.21.0 | MIT |
|
|
16
|
+
|
|
17
|
+
Full dev SBOM: [sbom-full-dev.cdx.json](sbom-full-dev.cdx.json). All licenses are compatible with Apache-2.0 distribution.
|
|
18
|
+
|
|
19
|
+
## Known vulnerabilities
|
|
20
|
+
|
|
21
|
+
`npm audit` on 2026-11-01 reported **0** vulnerabilities (info 0, low 0, moderate 0, high 0, critical 0) across 3 dev dependencies ([npm-audit.json](npm-audit.json)). An audit is a point-in-time check against the npm advisory database.
|
|
22
|
+
|
|
23
|
+
## Build and release integrity
|
|
24
|
+
|
|
25
|
+
| Control | State |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Lockfile committed, `npm ci` in CI | yes |
|
|
28
|
+
| GitHub Actions pinned to commit SHAs | yes, all workflows |
|
|
29
|
+
| Dependabot for Actions and npm | enabled |
|
|
30
|
+
| Workflow permissions | `contents: read` by default; `id-token: write` and `security-events: write` only where needed |
|
|
31
|
+
| OpenSSF Scorecard workflow | added; first result pending |
|
|
32
|
+
| npm provenance (attestation linking the package to this repository and workflow) | **workflow written, not yet exercised.** Requires the owner to configure Trusted Publishing on npmjs.com; see [releasing.md](../releasing.md). Versions 0.1.0 and 0.1.1 were uploaded by hand and have no provenance |
|
|
33
|
+
| Reproducible builds | not verified |
|
|
34
|
+
| Package contents | 44 files in `dist`, `agents`, `adapters`, `policies`, `schemas`, `docs`, `templates` and top-level docs; no source maps, no tests |
|
|
35
|
+
|
|
36
|
+
## Reproduce
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm ci && npm audit
|
|
40
|
+
npm sbom --sbom-format cyclonedx --omit dev
|
|
41
|
+
npm pack --dry-run
|
|
42
|
+
```
|