@nerviq/cli 1.29.0 → 1.30.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 (93) hide show
  1. package/CHANGELOG.md +1764 -1493
  2. package/README.md +568 -538
  3. package/SECURITY.md +78 -82
  4. package/bin/cli.js +2838 -2558
  5. package/docs/api-reference.md +356 -356
  6. package/docs/audit-fix.md +109 -0
  7. package/docs/autofix.md +3 -62
  8. package/docs/getting-started.md +1 -1
  9. package/docs/index.html +592 -592
  10. package/docs/integration-contracts.md +287 -287
  11. package/docs/maintenance.md +128 -128
  12. package/docs/new-platform-guide.md +202 -202
  13. package/docs/release-process.md +63 -0
  14. package/docs/shallow-risk.md +244 -244
  15. package/docs/why-nerviq.md +82 -82
  16. package/package.json +75 -67
  17. package/sdk/README.md +12 -3
  18. package/sdk/examples/langchain-integration.md +128 -0
  19. package/sdk/examples/self-governing-agent.js +135 -0
  20. package/sdk/index.d.ts +115 -0
  21. package/sdk/index.js +94 -0
  22. package/sdk/package.json +11 -0
  23. package/src/activity.js +13 -0
  24. package/src/aider/activity.js +226 -226
  25. package/src/aider/context.js +162 -162
  26. package/src/aider/freshness.js +123 -123
  27. package/src/aider/techniques.js +3465 -3465
  28. package/src/audit/layers.js +180 -180
  29. package/src/audit.js +1133 -1032
  30. package/src/auto-suggest.js +9 -2
  31. package/src/behavioral-drift.js +37 -2
  32. package/src/benchmark.js +299 -299
  33. package/src/codex/activity.js +324 -324
  34. package/src/codex/freshness.js +149 -142
  35. package/src/codex/techniques.js +4895 -4895
  36. package/src/context.js +326 -326
  37. package/src/continuous-ops.js +11 -1
  38. package/src/convert.js +340 -340
  39. package/src/copilot/config-parser.js +280 -280
  40. package/src/copilot/context.js +218 -218
  41. package/src/copilot/freshness.js +184 -177
  42. package/src/copilot/patch.js +238 -238
  43. package/src/copilot/techniques.js +3578 -3578
  44. package/src/cursor/freshness.js +194 -194
  45. package/src/cursor/patch.js +243 -243
  46. package/src/cursor/techniques.js +3735 -3735
  47. package/src/doctor.js +201 -201
  48. package/src/fix-engine.js +511 -8
  49. package/src/formatters/csv.js +86 -86
  50. package/src/formatters/junit.js +123 -123
  51. package/src/formatters/markdown.js +164 -164
  52. package/src/formatters/otel.js +151 -151
  53. package/src/freshness.js +163 -156
  54. package/src/gemini/activity.js +402 -402
  55. package/src/gemini/context.js +290 -290
  56. package/src/gemini/freshness.js +188 -188
  57. package/src/gemini/patch.js +229 -229
  58. package/src/gemini/techniques.js +3811 -3811
  59. package/src/governance.js +533 -533
  60. package/src/harmony/audit.js +306 -306
  61. package/src/i18n.js +63 -63
  62. package/src/insights.js +119 -119
  63. package/src/integrations.js +134 -134
  64. package/src/locales/en.json +33 -33
  65. package/src/locales/es.json +33 -33
  66. package/src/migrate.js +354 -354
  67. package/src/opencode/activity.js +286 -286
  68. package/src/opencode/freshness.js +137 -137
  69. package/src/opencode/techniques.js +3450 -3450
  70. package/src/safe-glyph.js +97 -0
  71. package/src/setup/analysis.js +12 -12
  72. package/src/setup.js +13 -6
  73. package/src/shallow-risk/index.js +113 -56
  74. package/src/shallow-risk/patterns/agent-config-cross-platform-drift.js +51 -50
  75. package/src/shallow-risk/patterns/agent-config-dangerous-autoapprove.js +47 -46
  76. package/src/shallow-risk/patterns/agent-config-deprecated-keys.js +47 -46
  77. package/src/shallow-risk/patterns/agent-config-framework-version-mismatch.js +138 -0
  78. package/src/shallow-risk/patterns/agent-config-missing-file.js +318 -317
  79. package/src/shallow-risk/patterns/agent-config-script-not-in-package-json.js +108 -0
  80. package/src/shallow-risk/patterns/agent-config-secret-literal.js +52 -49
  81. package/src/shallow-risk/patterns/agent-config-stack-contradiction.js +35 -34
  82. package/src/shallow-risk/patterns/hook-script-missing.js +71 -70
  83. package/src/shallow-risk/patterns/mcp-server-no-allowlist.js +53 -52
  84. package/src/shallow-risk/shared.js +653 -648
  85. package/src/source-urls.js +295 -295
  86. package/src/state-paths.js +85 -85
  87. package/src/supplemental-checks.js +805 -805
  88. package/src/telemetry.js +160 -160
  89. package/src/watch.js +46 -0
  90. package/src/windsurf/context.js +359 -359
  91. package/src/windsurf/freshness.js +194 -194
  92. package/src/windsurf/patch.js +231 -231
  93. package/src/windsurf/techniques.js +3779 -3779
package/SECURITY.md CHANGED
@@ -1,82 +1,78 @@
1
- # Security Policy
2
-
3
- ## Reporting a Vulnerability
4
-
5
- If you discover a security vulnerability in Nerviq, please report it responsibly.
6
-
7
- **Email:** [business@nerviq.net](mailto:business@nerviq.net) (subject: SECURITY)
8
-
9
- Please include:
10
-
11
- - Description of the vulnerability
12
- - Steps to reproduce
13
- - Affected version(s)
14
- - Impact assessment (if known)
15
-
16
- **Do not** open a public GitHub issue for security vulnerabilities.
17
-
18
- ## Response SLA
19
-
20
- | Severity | Response Time | Fix Timeline |
21
- |----------|--------------|--------------|
22
- | **Critical** (RCE, data exfiltration) | < 24 hours | < 48 hours |
23
- | **High** (privilege escalation, auth bypass) | < 48 hours | < 7 days |
24
- | **Medium** (information disclosure, DoS) | < 7 days | < 30 days |
25
- | **Low** (minor issues, hardening) | < 14 days | Next release |
26
-
27
- ## Supported Versions
28
-
29
- | Version | Supported |
30
- |---------|-----------|
31
- | 1.29.x | Yes |
32
- | 1.28.x | Yes |
33
- | 1.27.x | Yes |
34
- | 1.26.x | Yes |
35
- | < 1.26 | No |
36
- | < 1.29 | No |
37
-
38
- Only the latest patch release of each supported major.minor line receives security updates.
39
-
40
- ## Dependency Policy
41
-
42
- - **Zero runtime dependencies.** Nerviq ships with no production `node_modules` only Node.js (>=18) is required.
43
- - **devDependencies audited monthly** using `npm audit` and reviewed for known CVEs.
44
- - **SBOM published** with every release (`sbom.cdx.json`) in CycloneDX format for full dependency transparency.
45
- - **Lockfile integrity** checked in CI to prevent supply-chain tampering.
46
- - **npm provenance attestation** — every release published via the GitHub Actions release workflow is signed with an npm provenance attestation (`npm publish --provenance`). This cryptographically links the published package to a specific GitHub Actions run, repository, and commit. Consumers can verify the attestation with `npm audit signatures @nerviq/cli`.
47
-
48
- ## Security Architecture
49
-
50
- - All operations run **locally** — no data is sent to external servers by default.
51
- - The `nerviq serve` command binds to **localhost only** (127.0.0.1), never to 0.0.0.0.
52
- - `deep-review` (opt-in) redacts secrets and credentials before sending config snippets to any AI provider.
53
- - No secrets, tokens, or API keys are stored by Nerviq.
54
-
55
- ## Reporting False Positives in Checks
56
-
57
- If a Nerviq audit check produces a false positive (flags something that is not actually a problem):
58
-
59
- 1. Run `nerviq audit --verbose` to identify the exact check key (e.g., `permissionDeny`).
60
- 2. Open a GitHub issue with:
61
- - The check key
62
- - Your project structure (relevant files only)
63
- - Why you believe it is a false positive
64
- 3. Alternatively, use `nerviq feedback --key <checkKey> --status rejected --effect neutral --notes "false positive: <reason>"` to record it locally.
65
-
66
- False positive reports help us improve check accuracy for all users.
67
-
68
- ## Acknowledgments
69
-
70
- We gratefully acknowledge security researchers who responsibly disclose vulnerabilities. With your permission, we will list you in our security acknowledgments.
71
-
72
- ## Internal Response Process
73
-
74
- When a vulnerability report arrives:
75
-
76
- 1. **Acknowledge** — Reply within the SLA above confirming receipt
77
- 2. **Triage** — Classify severity (Critical/High/Medium/Low), assign to founder
78
- 3. **Reproduce** — Verify the vulnerability exists in the latest supported version
79
- 4. **Fix** — Develop fix on a private branch, add regression test
80
- 5. **Release** — Publish patched version to npm, tag in GitHub
81
- 6. **Disclose** — Notify reporter, update CHANGELOG.md with security tag, credit reporter if permitted
82
- 7. **Post-mortem** — For Critical/High: document root cause and prevention measures in `research/`
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ If you discover a security vulnerability in Nerviq, please report it responsibly.
6
+
7
+ **Email:** [business@nerviq.net](mailto:business@nerviq.net) (subject: SECURITY)
8
+
9
+ Please include:
10
+
11
+ - Description of the vulnerability
12
+ - Steps to reproduce
13
+ - Affected version(s)
14
+ - Impact assessment (if known)
15
+
16
+ **Do not** open a public GitHub issue for security vulnerabilities.
17
+
18
+ ## Response SLA
19
+
20
+ | Severity | Response Time | Fix Timeline |
21
+ |----------|--------------|--------------|
22
+ | **Critical** (RCE, data exfiltration) | < 24 hours | < 48 hours |
23
+ | **High** (privilege escalation, auth bypass) | < 48 hours | < 7 days |
24
+ | **Medium** (information disclosure, DoS) | < 7 days | < 30 days |
25
+ | **Low** (minor issues, hardening) | < 14 days | Next release |
26
+
27
+ ## Supported Versions
28
+
29
+ | Version | Supported |
30
+ |---------|-----------|
31
+ | 1.30.x | Yes |
32
+ | < 1.30 | No |
33
+
34
+ Only the latest patch release of each supported major.minor line receives security updates. Older minors are out of scope — upgrade to a supported line for fixes.
35
+
36
+ ## Dependency Policy
37
+
38
+ - **Zero runtime dependencies.** Nerviq ships with no production `node_modules` only Node.js (>=18) is required.
39
+ - **devDependencies audited monthly** using `npm audit` and reviewed for known CVEs.
40
+ - **SBOM published** with every release (`sbom.cdx.json`) in CycloneDX format for full dependency transparency.
41
+ - **Lockfile integrity** checked in CI to prevent supply-chain tampering.
42
+ - **npm provenance attestation** every release published via the GitHub Actions release workflow is signed with an npm provenance attestation (`npm publish --provenance`). This cryptographically links the published package to a specific GitHub Actions run, repository, and commit. Consumers can verify the attestation with `npm audit signatures @nerviq/cli`.
43
+
44
+ ## Security Architecture
45
+
46
+ - All operations run **locally**no data is sent to external servers by default.
47
+ - The `nerviq serve` command binds to **localhost only** (127.0.0.1), never to 0.0.0.0.
48
+ - `deep-review` (opt-in) redacts secrets and credentials before sending config snippets to any AI provider.
49
+ - No secrets, tokens, or API keys are stored by Nerviq.
50
+
51
+ ## Reporting False Positives in Checks
52
+
53
+ If a Nerviq audit check produces a false positive (flags something that is not actually a problem):
54
+
55
+ 1. Run `nerviq audit --verbose` to identify the exact check key (e.g., `permissionDeny`).
56
+ 2. Open a GitHub issue with:
57
+ - The check key
58
+ - Your project structure (relevant files only)
59
+ - Why you believe it is a false positive
60
+ 3. Alternatively, use `nerviq feedback --key <checkKey> --status rejected --effect neutral --notes "false positive: <reason>"` to record it locally.
61
+
62
+ False positive reports help us improve check accuracy for all users.
63
+
64
+ ## Acknowledgments
65
+
66
+ We gratefully acknowledge security researchers who responsibly disclose vulnerabilities. With your permission, we will list you in our security acknowledgments.
67
+
68
+ ## Internal Response Process
69
+
70
+ When a vulnerability report arrives:
71
+
72
+ 1. **Acknowledge** Reply within the SLA above confirming receipt
73
+ 2. **Triage** — Classify severity (Critical/High/Medium/Low), assign to founder
74
+ 3. **Reproduce** — Verify the vulnerability exists in the latest supported version
75
+ 4. **Fix** — Develop fix on a private branch, add regression test
76
+ 5. **Release** — Publish patched version to npm, tag in GitHub
77
+ 6. **Disclose** — Notify reporter, update CHANGELOG.md with security tag, credit reporter if permitted
78
+ 7. **Post-mortem** — For Critical/High: document root cause and prevention measures in `research/`