@westbayberry/dg 2.2.0 → 2.3.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 (48) hide show
  1. package/dist/agents/claude-code.js +10 -0
  2. package/dist/agents/codex.js +1 -1
  3. package/dist/agents/cursor.js +6 -1
  4. package/dist/agents/gate-posture.js +21 -0
  5. package/dist/agents/persistence.js +68 -2
  6. package/dist/agents/registry.js +4 -3
  7. package/dist/agents/routing.js +118 -0
  8. package/dist/agents/windsurf.js +1 -1
  9. package/dist/audit/rules.js +6 -2
  10. package/dist/auth/store.js +9 -2
  11. package/dist/commands/agents.js +45 -1
  12. package/dist/commands/audit.js +6 -0
  13. package/dist/commands/setup.js +1 -2
  14. package/dist/commands/uninstall.js +2 -1
  15. package/dist/config/settings.js +35 -4
  16. package/dist/install-ui/LiveInstall.js +3 -2
  17. package/dist/install-ui/block-render.js +17 -13
  18. package/dist/launcher/agent-check.js +455 -25
  19. package/dist/launcher/agent-hook-exec.js +1 -1
  20. package/dist/launcher/agent-hook-io.js +12 -4
  21. package/dist/launcher/classify.js +27 -1
  22. package/dist/launcher/env.js +39 -7
  23. package/dist/launcher/install-preflight.js +15 -6
  24. package/dist/launcher/live-install.js +4 -3
  25. package/dist/launcher/manifest-screen.js +171 -0
  26. package/dist/launcher/output-redaction.js +4 -1
  27. package/dist/launcher/preflight-prompt.js +4 -3
  28. package/dist/launcher/run.js +90 -18
  29. package/dist/project/dgfile.js +2 -1
  30. package/dist/project/override-trust.js +0 -0
  31. package/dist/proxy/metadata-map.js +29 -13
  32. package/dist/proxy/server.js +130 -14
  33. package/dist/runtime/first-run.js +2 -1
  34. package/dist/sbom-ui/inventory.js +5 -1
  35. package/dist/scan/staged.js +31 -8
  36. package/dist/scan-ui/hooks/useScan.js +4 -1
  37. package/dist/security/sanitize.js +8 -4
  38. package/dist/service/state.js +1 -1
  39. package/dist/service/trust-store.js +5 -9
  40. package/dist/service/worker.js +3 -3
  41. package/dist/setup/plan.js +156 -12
  42. package/dist/setup/uninstall-standalone.js +25 -0
  43. package/dist/setup-ui/wizard.js +9 -1
  44. package/dist/standalone/uninstall.mjs +2123 -0
  45. package/dist/verify/local.js +2 -2
  46. package/dist/verify/package-check.js +3 -1
  47. package/npm-shrinkwrap.json +2 -2
  48. package/package.json +2 -1
@@ -105,7 +105,7 @@ function scanTarball(bytes, path) {
105
105
  let tarBytes = bytes;
106
106
  if (path.endsWith(".tgz") || path.endsWith(".tar.gz")) {
107
107
  try {
108
- tarBytes = gunzipSync(bytes);
108
+ tarBytes = gunzipSync(bytes, { maxOutputLength: MAX_UNPACKED_BYTES });
109
109
  }
110
110
  catch (error) {
111
111
  return archiveError(`could not decompress tarball: ${error instanceof Error ? error.message : "unknown gzip error"}`);
@@ -388,7 +388,7 @@ function readZipBody(data, method, name, errors) {
388
388
  }
389
389
  if (method === 8) {
390
390
  try {
391
- return inflateRawSync(data);
391
+ return inflateRawSync(data, { maxOutputLength: MAX_UNPACKED_BYTES });
392
392
  }
393
393
  catch (error) {
394
394
  errors.push(`${name}: could not inflate zip entry: ${error instanceof Error ? error.message : "unknown inflate error"}`);
@@ -211,7 +211,9 @@ export async function runPackageCheck(target, io = {}, options = {}) {
211
211
  if (!result) {
212
212
  return { exitCode: exitCodeFor("analysis_incomplete"), stdout: "", stderr: `dg verify: scanner returned no result for ${parsed.name}\n` };
213
213
  }
214
- const action = result.action ?? "pass";
214
+ // A missing per-package action means the scanner did not return a verdict;
215
+ // treat that as incomplete, never as a clean pass.
216
+ const action = result.action ?? "analysis_incomplete";
215
217
  const rendered = options.format === "json"
216
218
  ? `${JSON.stringify({
217
219
  target,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@westbayberry/dg",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@westbayberry/dg",
9
- "version": "2.2.0",
9
+ "version": "2.3.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "chalk": "4.1.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@westbayberry/dg",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Dependency Guardian supply-chain firewall CLI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,6 +30,7 @@
30
30
  "test": "vitest run",
31
31
  "test:unit": "vitest run test/unit",
32
32
  "test:integration": "vitest run test/integration",
33
+ "check:agents": "vitest run test/unit/agent-check.test.ts test/unit/agent-hook-io.test.ts test/unit/agent-hook-failclosed.test.ts test/unit/agent-registry.test.ts test/unit/agents-codex.test.ts test/unit/agents-cursor.test.ts test/unit/agents-gemini.test.ts test/unit/agents-copilot-cli.test.ts test/unit/agents-windsurf.test.ts test/integration/agent-hook-e2e.test.ts",
33
34
  "typecheck": "tsc --noEmit",
34
35
  "lint": "node scripts/lint.mjs",
35
36
  "format:check": "node scripts/format-check.mjs",