@vaultcompass/conductor 0.8.0 → 0.9.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.
Files changed (44) hide show
  1. package/README.md +263 -77
  2. package/dist/cli.js +152 -30
  3. package/dist/envelope.d.ts +8 -0
  4. package/dist/exit-codes.d.ts +52 -2
  5. package/dist/exit-codes.js +64 -14
  6. package/dist/external-config.d.ts +2 -1
  7. package/dist/external-config.js +33 -18
  8. package/dist/gate-runner.d.ts +141 -17
  9. package/dist/gate-runner.js +537 -83
  10. package/dist/git.d.ts +95 -0
  11. package/dist/git.js +244 -0
  12. package/dist/init-policy.js +38 -2
  13. package/dist/init.js +40 -3
  14. package/dist/intent-base.d.ts +35 -1
  15. package/dist/intent-base.js +124 -64
  16. package/dist/intent-prepare.d.ts +33 -2
  17. package/dist/intent-prepare.js +443 -34
  18. package/dist/intent-spec.d.ts +28 -0
  19. package/dist/intent-spec.js +22 -5
  20. package/dist/normalize.d.ts +11 -0
  21. package/dist/normalize.js +60 -6
  22. package/dist/osv-baseline.d.ts +84 -0
  23. package/dist/osv-baseline.js +325 -0
  24. package/dist/osv-coverage.d.ts +80 -0
  25. package/dist/osv-coverage.js +223 -0
  26. package/dist/output-sarif.js +55 -15
  27. package/dist/output-text.d.ts +53 -2
  28. package/dist/output-text.js +287 -27
  29. package/dist/policy.d.ts +10 -0
  30. package/dist/policy.js +21 -7
  31. package/dist/products.d.ts +32 -10
  32. package/dist/products.js +73 -9
  33. package/dist/requirements-pin.d.ts +47 -0
  34. package/dist/requirements-pin.js +256 -0
  35. package/dist/resolve.d.ts +1 -0
  36. package/dist/resolve.js +1 -1
  37. package/dist/run.d.ts +21 -0
  38. package/dist/run.js +74 -15
  39. package/dist/trust-base.d.ts +101 -20
  40. package/dist/trust-base.js +219 -73
  41. package/dist/unread-manifests.d.ts +14 -0
  42. package/dist/unread-manifests.js +69 -0
  43. package/package.json +1 -1
  44. package/schema/guardrails.schema.json +4 -0
@@ -0,0 +1,69 @@
1
+ // Which tracked manifest-like files were NOT handed to the external scanner.
2
+ //
3
+ // This scans nothing and decides nothing, and it claims nothing about what
4
+ // any other gate reads: it measures one thing, the files this gate was not
5
+ // given. A repository whose only manifests are a pyproject.toml, a Dockerfile
6
+ // and a workflow gets a green vulnerabilities gate that looked at none of
7
+ // them, and "treated as clean" on its own reads as a statement about the code.
8
+ const EXACT_NAMES = new Set([
9
+ 'pyproject.toml',
10
+ 'Pipfile',
11
+ 'setup.py',
12
+ 'go.mod',
13
+ 'go.sum',
14
+ 'Cargo.toml',
15
+ 'Gemfile',
16
+ 'composer.json',
17
+ 'pom.xml',
18
+ 'build.gradle',
19
+ 'build.gradle.kts',
20
+ 'Package.swift',
21
+ 'Podfile',
22
+ 'compose.yml',
23
+ 'compose.yaml',
24
+ // Added 2026-10-13 (audit finding F3). Podfile.lock and deno.lock are
25
+ // lockfiles osv-scanner 2.4.0 rejects with --lockfile (exit 127,
26
+ // measured), so they are never handed over and must be named here; mix.exs
27
+ // and pubspec.yaml are the manifests beside two lockfiles it does read
28
+ // (mix.lock, pubspec.lock), named when no lockfile was committed.
29
+ 'Podfile.lock',
30
+ 'deno.lock',
31
+ 'mix.exs',
32
+ 'pubspec.yaml',
33
+ ]);
34
+ const MAX_LISTED = 12;
35
+ const SKIPPED_DIRS = new Set(['node_modules', 'vendor', 'testdata']);
36
+ function isManifest(file) {
37
+ const base = file.slice(file.lastIndexOf('/') + 1);
38
+ return (EXACT_NAMES.has(base) ||
39
+ /^requirements.*\.txt$/.test(base) ||
40
+ /^Dockerfile(\..+)?$/.test(base) ||
41
+ /^docker-compose.*\.ya?ml$/.test(base) ||
42
+ (file.startsWith('.github/workflows/') && /\.ya?ml$/.test(base)));
43
+ }
44
+ /**
45
+ * Tracked manifest-like files that were not handed to `product`, sorted, as
46
+ * one sentence fragment, or null when there are none.
47
+ *
48
+ * `handed` are the repository-relative paths the gate was actually handed,
49
+ * so a file it does read is never listed. By path rather than by base name,
50
+ * because the vulnerabilities gate hands a requirements file only when it
51
+ * passes the pin check (src/osv-coverage.ts): an unpinned requirements.txt
52
+ * is not read even when another requirements.txt is, and is listed. go.mod
53
+ * and a pinned requirements file are handed, so they leave this list.
54
+ * Vendored and testdata directories are skipped like node_modules: they are
55
+ * not this repository's own manifests.
56
+ */
57
+ export function unreadManifestsNote(tracked, handed, product) {
58
+ const unread = tracked
59
+ .filter((file) => !file.split('/').some((segment) => SKIPPED_DIRS.has(segment)))
60
+ .filter((file) => !handed.has(file))
61
+ .filter(isManifest)
62
+ .sort();
63
+ if (unread.length === 0) {
64
+ return null;
65
+ }
66
+ const listed = unread.slice(0, MAX_LISTED).join(', ');
67
+ const more = unread.length > MAX_LISTED ? `, and ${unread.length - MAX_LISTED} more` : '';
68
+ return `Tracked manifests not handed to ${product}: ${listed}${more}.`;
69
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaultcompass/conductor",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "description": "Umbrella installer and combined report over the independently installable guardrail gates.",
6
6
  "keywords": [
@@ -54,6 +54,10 @@
54
54
  "type": "boolean",
55
55
  "default": true
56
56
  },
57
+ "present-on-base": {
58
+ "description": "Only on the vulnerabilities gate. On a pull-request run osv-scanner also scans the base branch copies of the lockfiles that carry findings, and labels each finding introduced or present-on-base. block (the default when the key is absent) blocks on every finding; report reports present-on-base findings without blocking and blocks only on introduced ones. Read from the base branch policy on a pull request, so a pull request cannot set it for itself. Has no effect on a run without a base, where every finding blocks.",
59
+ "enum": ["block", "report"]
60
+ },
57
61
  "stage": {
58
62
  "description": "When this gate runs. Stages are cumulative in the order commit, push, ci: a gate runs at its own stage and at every later one, so a run at ci runs everything enabled. Defaults to commit for dependencies and secrets, and to ci for intent, secrets-history and vulnerabilities: the intent gate carries per-task ceremony, and a history scan or a registry lookup is pull-request work. A run with no --stage runs every enabled gate whatever its stage.",
59
63
  "enum": ["commit", "push", "ci"]