nexus-agents 2.170.0 → 2.171.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 (128) hide show
  1. package/dist/{child-mcp-config-3RYBPZNE.js → child-mcp-config-NW4JZFWC.js} +2 -2
  2. package/dist/{chunk-LYWNKEGM.js → chunk-25CWEJ2M.js} +4 -4
  3. package/dist/{chunk-JOYOOEPJ.js → chunk-4KVAHGMB.js} +2 -2
  4. package/dist/{chunk-SCHD7NZD.js → chunk-5UDKUPZB.js} +7 -7
  5. package/dist/{chunk-Z4AWOPXA.js → chunk-76Q63KJM.js} +2 -2
  6. package/dist/{chunk-NXSY4G4Y.js → chunk-7AJWIOMT.js} +2 -2
  7. package/dist/{chunk-OFVUBY6Z.js → chunk-AJIDYCQG.js} +3 -3
  8. package/dist/{chunk-JYDXHV4L.js → chunk-B4XT3B2E.js} +2 -2
  9. package/dist/{chunk-OYBAKU7N.js → chunk-BTH745HU.js} +2 -2
  10. package/dist/{chunk-DEE2UTYV.js → chunk-CEDSYAAI.js} +2 -2
  11. package/dist/{chunk-OIT75IRK.js → chunk-DLVDFJXU.js} +4 -4
  12. package/dist/{chunk-6TN2Z2AQ.js → chunk-DYFF72HX.js} +3 -3
  13. package/dist/{chunk-BGV3IF3G.js → chunk-E53VLN73.js} +8 -8
  14. package/dist/{chunk-LDZEYJP3.js → chunk-FU2FRL46.js} +2 -2
  15. package/dist/{chunk-75AUSQL4.js → chunk-GJRLIANS.js} +7 -7
  16. package/dist/{chunk-DCXCVEZP.js → chunk-IC3NZHPT.js} +2 -2
  17. package/dist/{chunk-57RYP435.js → chunk-IK7POCXO.js} +3 -3
  18. package/dist/{chunk-DDQXPARJ.js → chunk-KP4ZXW3B.js} +3 -3
  19. package/dist/{chunk-MG4JBADQ.js → chunk-LFKCJQ7G.js} +4 -4
  20. package/dist/{chunk-PIODB4SW.js → chunk-O4J34GZT.js} +2 -2
  21. package/dist/{chunk-P4PLZZCR.js → chunk-PP5QL4EJ.js} +5 -5
  22. package/dist/{chunk-GVTXP6F6.js → chunk-QBCWORAK.js} +3 -3
  23. package/dist/{chunk-URRNWRI4.js → chunk-QBOTSJ7S.js} +6 -5
  24. package/dist/{chunk-URRNWRI4.js.map → chunk-QBOTSJ7S.js.map} +1 -1
  25. package/dist/{chunk-JLG5AUZB.js → chunk-QFS5VOB6.js} +2 -2
  26. package/dist/{chunk-C6IAXFNC.js → chunk-RAK6PTNM.js} +2 -2
  27. package/dist/{chunk-WKW5SEP7.js → chunk-RQGORCFM.js} +5 -5
  28. package/dist/{chunk-HTM32H2E.js → chunk-S66XOAMZ.js} +2 -2
  29. package/dist/{chunk-ZW7544DX.js → chunk-SCHMBRK4.js} +3 -3
  30. package/dist/{chunk-UXXNNT5D.js → chunk-SUWN54CK.js} +2 -2
  31. package/dist/{chunk-LOKT6EW7.js → chunk-SZ3CRNPI.js} +8 -8
  32. package/dist/{chunk-5N5XURKV.js → chunk-Y7JDXVJA.js} +2 -2
  33. package/dist/{chunk-QMOJJ6A2.js → chunk-YIQ5Z7LV.js} +39 -34
  34. package/dist/chunk-YIQ5Z7LV.js.map +1 -0
  35. package/dist/{chunk-RJDJMOX6.js → chunk-Z5GJ4FXW.js} +4 -4
  36. package/dist/{chunk-RZJQZ5P3.js → chunk-ZSWXEDI6.js} +2 -2
  37. package/dist/{cli-circuit-breaker-4GJA2IXC.js → cli-circuit-breaker-UWJNXHLC.js} +4 -4
  38. package/dist/cli.js +40 -40
  39. package/dist/{composite-router-UBZO4YR7.js → composite-router-ULDZRQGO.js} +2 -2
  40. package/dist/{consensus-vote-USZFJO2K.js → consensus-vote-KF6M7NZJ.js} +15 -15
  41. package/dist/{context-retriever-C5C7RFQE.js → context-retriever-73PNAWES.js} +8 -8
  42. package/dist/{doctor-deep-2N3F7EV6.js → doctor-deep-LURSTTF7.js} +3 -3
  43. package/dist/{expert-bridge-B3EFTAID.js → expert-bridge-VWS3NBL3.js} +4 -4
  44. package/dist/{factory-SURRFPSV.js → factory-KPJ2EG63.js} +5 -5
  45. package/dist/{factory-LKQKU3SD.js → factory-MYJYONBQ.js} +8 -8
  46. package/dist/{improvement-review-75OCZ5K7.js → improvement-review-APOK4U3Z.js} +5 -5
  47. package/dist/index.d.ts +151 -1
  48. package/dist/index.js +389 -155
  49. package/dist/index.js.map +1 -1
  50. package/dist/{init-opencode-LDI5E5LW.js → init-opencode-Y7WPFCY7.js} +5 -5
  51. package/dist/{issue-triage-WWQEY7PL.js → issue-triage-4P3TDIJQ.js} +6 -6
  52. package/dist/{pr-reviewer-helpers-HDP24LGZ.js → pr-reviewer-helpers-4JX2LEVZ.js} +4 -4
  53. package/dist/{registry-command-PZY7HWKO.js → registry-command-CTYTYRXF.js} +2 -2
  54. package/dist/{repo-security-plan-IYKDY5PW.js → repo-security-plan-4CXBXLAY.js} +3 -3
  55. package/dist/{research-helpers-synthesize-XSOFXRFK.js → research-helpers-synthesize-23OXMV47.js} +4 -4
  56. package/dist/{routing-memory-JTNH2BXS.js → routing-memory-AWCOIW27.js} +2 -2
  57. package/dist/security/ast-rules/command-exec-go.yml +15 -0
  58. package/dist/security/ast-rules/dangerous-eval-python.yml +8 -0
  59. package/dist/security/ast-rules/shell-injection-python.yml +13 -0
  60. package/dist/{session-memory-RJZ447UX.js → session-memory-P53QXKGV.js} +3 -3
  61. package/dist/{setup-command-35MCRS33.js → setup-command-IRW76CNQ.js} +13 -13
  62. package/dist/{setup-config-JV23ZYPO.js → setup-config-B7WLUMUU.js} +3 -3
  63. package/dist/{setup-custom-api-LMA445OB.js → setup-custom-api-B6QGKSEY.js} +3 -3
  64. package/dist/{tool-memory-K6EYH3FQ.js → tool-memory-QUFVINHN.js} +5 -5
  65. package/dist/{unified-registry-MJA6IBDD.js → unified-registry-4NOWT2MU.js} +9 -9
  66. package/dist/{weather-report-ID4ZNUAF.js → weather-report-MCLS5MFZ.js} +2 -2
  67. package/package.json +4 -1
  68. package/src/security/ast-rules/command-exec-go.yml +15 -0
  69. package/src/security/ast-rules/dangerous-eval-python.yml +8 -0
  70. package/src/security/ast-rules/fixtures/sample.go +33 -0
  71. package/src/security/ast-rules/fixtures/sample.py +41 -0
  72. package/src/security/ast-rules/shell-injection-python.yml +13 -0
  73. package/dist/chunk-QMOJJ6A2.js.map +0 -1
  74. /package/dist/{child-mcp-config-3RYBPZNE.js.map → child-mcp-config-NW4JZFWC.js.map} +0 -0
  75. /package/dist/{chunk-LYWNKEGM.js.map → chunk-25CWEJ2M.js.map} +0 -0
  76. /package/dist/{chunk-JOYOOEPJ.js.map → chunk-4KVAHGMB.js.map} +0 -0
  77. /package/dist/{chunk-SCHD7NZD.js.map → chunk-5UDKUPZB.js.map} +0 -0
  78. /package/dist/{chunk-Z4AWOPXA.js.map → chunk-76Q63KJM.js.map} +0 -0
  79. /package/dist/{chunk-NXSY4G4Y.js.map → chunk-7AJWIOMT.js.map} +0 -0
  80. /package/dist/{chunk-OFVUBY6Z.js.map → chunk-AJIDYCQG.js.map} +0 -0
  81. /package/dist/{chunk-JYDXHV4L.js.map → chunk-B4XT3B2E.js.map} +0 -0
  82. /package/dist/{chunk-OYBAKU7N.js.map → chunk-BTH745HU.js.map} +0 -0
  83. /package/dist/{chunk-DEE2UTYV.js.map → chunk-CEDSYAAI.js.map} +0 -0
  84. /package/dist/{chunk-OIT75IRK.js.map → chunk-DLVDFJXU.js.map} +0 -0
  85. /package/dist/{chunk-6TN2Z2AQ.js.map → chunk-DYFF72HX.js.map} +0 -0
  86. /package/dist/{chunk-BGV3IF3G.js.map → chunk-E53VLN73.js.map} +0 -0
  87. /package/dist/{chunk-LDZEYJP3.js.map → chunk-FU2FRL46.js.map} +0 -0
  88. /package/dist/{chunk-75AUSQL4.js.map → chunk-GJRLIANS.js.map} +0 -0
  89. /package/dist/{chunk-DCXCVEZP.js.map → chunk-IC3NZHPT.js.map} +0 -0
  90. /package/dist/{chunk-57RYP435.js.map → chunk-IK7POCXO.js.map} +0 -0
  91. /package/dist/{chunk-DDQXPARJ.js.map → chunk-KP4ZXW3B.js.map} +0 -0
  92. /package/dist/{chunk-MG4JBADQ.js.map → chunk-LFKCJQ7G.js.map} +0 -0
  93. /package/dist/{chunk-PIODB4SW.js.map → chunk-O4J34GZT.js.map} +0 -0
  94. /package/dist/{chunk-P4PLZZCR.js.map → chunk-PP5QL4EJ.js.map} +0 -0
  95. /package/dist/{chunk-GVTXP6F6.js.map → chunk-QBCWORAK.js.map} +0 -0
  96. /package/dist/{chunk-JLG5AUZB.js.map → chunk-QFS5VOB6.js.map} +0 -0
  97. /package/dist/{chunk-C6IAXFNC.js.map → chunk-RAK6PTNM.js.map} +0 -0
  98. /package/dist/{chunk-WKW5SEP7.js.map → chunk-RQGORCFM.js.map} +0 -0
  99. /package/dist/{chunk-HTM32H2E.js.map → chunk-S66XOAMZ.js.map} +0 -0
  100. /package/dist/{chunk-ZW7544DX.js.map → chunk-SCHMBRK4.js.map} +0 -0
  101. /package/dist/{chunk-UXXNNT5D.js.map → chunk-SUWN54CK.js.map} +0 -0
  102. /package/dist/{chunk-LOKT6EW7.js.map → chunk-SZ3CRNPI.js.map} +0 -0
  103. /package/dist/{chunk-5N5XURKV.js.map → chunk-Y7JDXVJA.js.map} +0 -0
  104. /package/dist/{chunk-RJDJMOX6.js.map → chunk-Z5GJ4FXW.js.map} +0 -0
  105. /package/dist/{chunk-RZJQZ5P3.js.map → chunk-ZSWXEDI6.js.map} +0 -0
  106. /package/dist/{cli-circuit-breaker-4GJA2IXC.js.map → cli-circuit-breaker-UWJNXHLC.js.map} +0 -0
  107. /package/dist/{composite-router-UBZO4YR7.js.map → composite-router-ULDZRQGO.js.map} +0 -0
  108. /package/dist/{consensus-vote-USZFJO2K.js.map → consensus-vote-KF6M7NZJ.js.map} +0 -0
  109. /package/dist/{context-retriever-C5C7RFQE.js.map → context-retriever-73PNAWES.js.map} +0 -0
  110. /package/dist/{doctor-deep-2N3F7EV6.js.map → doctor-deep-LURSTTF7.js.map} +0 -0
  111. /package/dist/{expert-bridge-B3EFTAID.js.map → expert-bridge-VWS3NBL3.js.map} +0 -0
  112. /package/dist/{factory-LKQKU3SD.js.map → factory-KPJ2EG63.js.map} +0 -0
  113. /package/dist/{factory-SURRFPSV.js.map → factory-MYJYONBQ.js.map} +0 -0
  114. /package/dist/{improvement-review-75OCZ5K7.js.map → improvement-review-APOK4U3Z.js.map} +0 -0
  115. /package/dist/{init-opencode-LDI5E5LW.js.map → init-opencode-Y7WPFCY7.js.map} +0 -0
  116. /package/dist/{issue-triage-WWQEY7PL.js.map → issue-triage-4P3TDIJQ.js.map} +0 -0
  117. /package/dist/{pr-reviewer-helpers-HDP24LGZ.js.map → pr-reviewer-helpers-4JX2LEVZ.js.map} +0 -0
  118. /package/dist/{registry-command-PZY7HWKO.js.map → registry-command-CTYTYRXF.js.map} +0 -0
  119. /package/dist/{repo-security-plan-IYKDY5PW.js.map → repo-security-plan-4CXBXLAY.js.map} +0 -0
  120. /package/dist/{research-helpers-synthesize-XSOFXRFK.js.map → research-helpers-synthesize-23OXMV47.js.map} +0 -0
  121. /package/dist/{routing-memory-JTNH2BXS.js.map → routing-memory-AWCOIW27.js.map} +0 -0
  122. /package/dist/{session-memory-RJZ447UX.js.map → session-memory-P53QXKGV.js.map} +0 -0
  123. /package/dist/{setup-command-35MCRS33.js.map → setup-command-IRW76CNQ.js.map} +0 -0
  124. /package/dist/{setup-config-JV23ZYPO.js.map → setup-config-B7WLUMUU.js.map} +0 -0
  125. /package/dist/{setup-custom-api-LMA445OB.js.map → setup-custom-api-B6QGKSEY.js.map} +0 -0
  126. /package/dist/{tool-memory-K6EYH3FQ.js.map → tool-memory-QUFVINHN.js.map} +0 -0
  127. /package/dist/{unified-registry-MJA6IBDD.js.map → unified-registry-4NOWT2MU.js.map} +0 -0
  128. /package/dist/{weather-report-ID4ZNUAF.js.map → weather-report-MCLS5MFZ.js.map} +0 -0
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  discoverModels,
3
3
  readOpencodeGateway
4
- } from "./chunk-OIT75IRK.js";
5
- import "./chunk-NXSY4G4Y.js";
6
- import "./chunk-JOYOOEPJ.js";
4
+ } from "./chunk-DLVDFJXU.js";
5
+ import "./chunk-7AJWIOMT.js";
6
+ import "./chunk-4KVAHGMB.js";
7
7
  import {
8
8
  createLogger
9
- } from "./chunk-GVTXP6F6.js";
9
+ } from "./chunk-QBCWORAK.js";
10
10
  import "./chunk-AXTD4TFK.js";
11
11
  import "./chunk-DHVMSIT5.js";
12
12
  import "./chunk-ZPWHCABL.js";
@@ -175,4 +175,4 @@ export {
175
175
  runInitOpencode,
176
176
  runOpencodeValidate
177
177
  };
178
- //# sourceMappingURL=init-opencode-LDI5E5LW.js.map
178
+ //# sourceMappingURL=init-opencode-Y7WPFCY7.js.map
@@ -2,11 +2,11 @@ import {
2
2
  IssueTriage,
3
3
  createIssueTriage,
4
4
  formatTriageComment
5
- } from "./chunk-WKW5SEP7.js";
6
- import "./chunk-C6IAXFNC.js";
7
- import "./chunk-DEE2UTYV.js";
8
- import "./chunk-OYBAKU7N.js";
9
- import "./chunk-GVTXP6F6.js";
5
+ } from "./chunk-RQGORCFM.js";
6
+ import "./chunk-RAK6PTNM.js";
7
+ import "./chunk-CEDSYAAI.js";
8
+ import "./chunk-BTH745HU.js";
9
+ import "./chunk-QBCWORAK.js";
10
10
  import "./chunk-AXTD4TFK.js";
11
11
  import "./chunk-DHVMSIT5.js";
12
12
  import "./chunk-ZPWHCABL.js";
@@ -15,4 +15,4 @@ export {
15
15
  createIssueTriage,
16
16
  formatTriageComment
17
17
  };
18
- //# sourceMappingURL=issue-triage-WWQEY7PL.js.map
18
+ //# sourceMappingURL=issue-triage-4P3TDIJQ.js.map
@@ -17,10 +17,10 @@ import {
17
17
  parseFindings,
18
18
  parseSeverity,
19
19
  sumFindings
20
- } from "./chunk-OFVUBY6Z.js";
20
+ } from "./chunk-AJIDYCQG.js";
21
21
  import "./chunk-WAYGXUSM.js";
22
- import "./chunk-DEE2UTYV.js";
23
- import "./chunk-GVTXP6F6.js";
22
+ import "./chunk-CEDSYAAI.js";
23
+ import "./chunk-QBCWORAK.js";
24
24
  import "./chunk-AXTD4TFK.js";
25
25
  import "./chunk-DHVMSIT5.js";
26
26
  import "./chunk-ZPWHCABL.js";
@@ -44,4 +44,4 @@ export {
44
44
  parseSeverity,
45
45
  sumFindings
46
46
  };
47
- //# sourceMappingURL=pr-reviewer-helpers-HDP24LGZ.js.map
47
+ //# sourceMappingURL=pr-reviewer-helpers-4JX2LEVZ.js.map
@@ -7,7 +7,7 @@ import {
7
7
  loadGeneratedRegistryEntries,
8
8
  loadUserManifestOverlay,
9
9
  reloadDefaultRegistry
10
- } from "./chunk-GVTXP6F6.js";
10
+ } from "./chunk-QBCWORAK.js";
11
11
  import "./chunk-AXTD4TFK.js";
12
12
  import {
13
13
  nexusDataPath
@@ -249,4 +249,4 @@ export {
249
249
  isValidRegistrySubcommand,
250
250
  registryCommand
251
251
  };
252
- //# sourceMappingURL=registry-command-PZY7HWKO.js.map
252
+ //# sourceMappingURL=registry-command-CTYTYRXF.js.map
@@ -3,9 +3,9 @@ import {
3
3
  buildPlanFromAnalysis,
4
4
  generateSecurityPlan,
5
5
  resolveScannerData
6
- } from "./chunk-JYDXHV4L.js";
6
+ } from "./chunk-B4XT3B2E.js";
7
7
  import "./chunk-HFOQKCD2.js";
8
- import "./chunk-GVTXP6F6.js";
8
+ import "./chunk-QBCWORAK.js";
9
9
  import "./chunk-AXTD4TFK.js";
10
10
  import "./chunk-DHVMSIT5.js";
11
11
  import "./chunk-ZPWHCABL.js";
@@ -15,4 +15,4 @@ export {
15
15
  generateSecurityPlan,
16
16
  resolveScannerData
17
17
  };
18
- //# sourceMappingURL=repo-security-plan-IYKDY5PW.js.map
18
+ //# sourceMappingURL=repo-security-plan-4CXBXLAY.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  AttributedInsightSchema,
3
3
  synthesizeResearch
4
- } from "./chunk-6TN2Z2AQ.js";
5
- import "./chunk-RZJQZ5P3.js";
4
+ } from "./chunk-DYFF72HX.js";
5
+ import "./chunk-ZSWXEDI6.js";
6
6
  import "./chunk-NUBSJGQZ.js";
7
- import "./chunk-GVTXP6F6.js";
7
+ import "./chunk-QBCWORAK.js";
8
8
  import "./chunk-AXTD4TFK.js";
9
9
  import "./chunk-DHVMSIT5.js";
10
10
  import "./chunk-ZPWHCABL.js";
@@ -12,4 +12,4 @@ export {
12
12
  AttributedInsightSchema,
13
13
  synthesizeResearch
14
14
  };
15
- //# sourceMappingURL=research-helpers-synthesize-XSOFXRFK.js.map
15
+ //# sourceMappingURL=research-helpers-synthesize-23OXMV47.js.map
@@ -2,7 +2,7 @@ import {
2
2
  DEFAULT_ROUTING_MEMORY_CONFIG,
3
3
  RoutingMemory,
4
4
  createRoutingMemory
5
- } from "./chunk-GVTXP6F6.js";
5
+ } from "./chunk-QBCWORAK.js";
6
6
  import "./chunk-AXTD4TFK.js";
7
7
  import "./chunk-DHVMSIT5.js";
8
8
  import "./chunk-ZPWHCABL.js";
@@ -11,4 +11,4 @@ export {
11
11
  RoutingMemory,
12
12
  createRoutingMemory
13
13
  };
14
- //# sourceMappingURL=routing-memory-JTNH2BXS.js.map
14
+ //# sourceMappingURL=routing-memory-AWCOIW27.js.map
@@ -0,0 +1,15 @@
1
+ id: command-exec-go
2
+ language: go
3
+ severity: warning
4
+ message: External command execution — verify args are not attacker-controlled
5
+ rule:
6
+ # A bare selector-expression pattern (`exec.Command($$$ARGS)`) does not
7
+ # reliably match against the dynamically-registered Go grammar (verified
8
+ # against @ast-grep/napi@0.44.1 + @ast-grep/lang-go@0.0.6): the pattern
9
+ # parser needs a valid enclosing Go context to resolve the `call_expression`
10
+ # selector for a dotted callee. The explicit context+selector form matches
11
+ # correctly and still excludes local/aliased near-misses (a bare `Command(x)`
12
+ # call, or a `myexec.Command(...)` call through a differently-named object).
13
+ pattern:
14
+ context: 'func f() { exec.Command($$$ARGS) }'
15
+ selector: call_expression
@@ -0,0 +1,8 @@
1
+ id: dangerous-eval-python
2
+ language: python
3
+ severity: error
4
+ message: Dynamic code execution via eval/exec
5
+ rule:
6
+ any:
7
+ - pattern: eval($CODE)
8
+ - pattern: exec($CODE)
@@ -0,0 +1,13 @@
1
+ id: shell-injection-python
2
+ language: python
3
+ severity: error
4
+ message: Possible shell injection — shell=True / os.system with dynamic input
5
+ rule:
6
+ any:
7
+ - pattern: os.system($CMD)
8
+ # ast-grep's multi-meta-var cannot match a trailing empty `$$$B` right
9
+ # after another matched arg (a napi/dynamic-lang quirk, verified against
10
+ # @ast-grep/napi@0.44.1 + @ast-grep/lang-python@0.0.6) — `shell=True` as
11
+ # the LAST arg needs its own arm alongside the "more args follow" arm.
12
+ - pattern: subprocess.$FN($$$A, shell=True, $$$B)
13
+ - pattern: subprocess.$FN($$$A, shell=True)
@@ -6,8 +6,8 @@ import {
6
6
  SessionMemory,
7
7
  SessionMemoryError,
8
8
  createSessionMemory
9
- } from "./chunk-PIODB4SW.js";
10
- import "./chunk-GVTXP6F6.js";
9
+ } from "./chunk-O4J34GZT.js";
10
+ import "./chunk-QBCWORAK.js";
11
11
  import "./chunk-AXTD4TFK.js";
12
12
  import "./chunk-DHVMSIT5.js";
13
13
  import "./chunk-ZPWHCABL.js";
@@ -20,4 +20,4 @@ export {
20
20
  SessionMemoryError,
21
21
  createSessionMemory
22
22
  };
23
- //# sourceMappingURL=session-memory-RJZ447UX.js.map
23
+ //# sourceMappingURL=session-memory-P53QXKGV.js.map
@@ -8,22 +8,22 @@ import {
8
8
  runWizard,
9
9
  setupCommand,
10
10
  setupCommandAsync
11
- } from "./chunk-P4PLZZCR.js";
12
- import "./chunk-HTM32H2E.js";
13
- import "./chunk-BGV3IF3G.js";
14
- import "./chunk-OIT75IRK.js";
15
- import "./chunk-NXSY4G4Y.js";
11
+ } from "./chunk-PP5QL4EJ.js";
12
+ import "./chunk-S66XOAMZ.js";
13
+ import "./chunk-E53VLN73.js";
14
+ import "./chunk-DLVDFJXU.js";
15
+ import "./chunk-7AJWIOMT.js";
16
16
  import "./chunk-NUBSJGQZ.js";
17
17
  import "./chunk-6T3EPABN.js";
18
18
  import "./chunk-ZM4O442V.js";
19
- import "./chunk-SCHD7NZD.js";
20
- import "./chunk-JOYOOEPJ.js";
21
- import "./chunk-JLG5AUZB.js";
22
- import "./chunk-Z4AWOPXA.js";
23
- import "./chunk-UXXNNT5D.js";
19
+ import "./chunk-5UDKUPZB.js";
20
+ import "./chunk-4KVAHGMB.js";
21
+ import "./chunk-QFS5VOB6.js";
22
+ import "./chunk-76Q63KJM.js";
23
+ import "./chunk-SUWN54CK.js";
24
24
  import "./chunk-QZUG667L.js";
25
- import "./chunk-DCXCVEZP.js";
26
- import "./chunk-GVTXP6F6.js";
25
+ import "./chunk-IC3NZHPT.js";
26
+ import "./chunk-QBCWORAK.js";
27
27
  import "./chunk-AXTD4TFK.js";
28
28
  import "./chunk-DHVMSIT5.js";
29
29
  import "./chunk-ZPWHCABL.js";
@@ -38,4 +38,4 @@ export {
38
38
  setupCommand,
39
39
  setupCommandAsync
40
40
  };
41
- //# sourceMappingURL=setup-command-35MCRS33.js.map
41
+ //# sourceMappingURL=setup-command-IRW76CNQ.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  runConfigInitSync
3
- } from "./chunk-HTM32H2E.js";
4
- import "./chunk-GVTXP6F6.js";
3
+ } from "./chunk-S66XOAMZ.js";
4
+ import "./chunk-QBCWORAK.js";
5
5
  import "./chunk-AXTD4TFK.js";
6
6
  import "./chunk-DHVMSIT5.js";
7
7
  import "./chunk-ZPWHCABL.js";
8
8
  export {
9
9
  runConfigInitSync
10
10
  };
11
- //# sourceMappingURL=setup-config-JV23ZYPO.js.map
11
+ //# sourceMappingURL=setup-config-B7WLUMUU.js.map
@@ -3,11 +3,11 @@ import {
3
3
  CUSTOM_API_BASE_URL_ENV,
4
4
  CUSTOM_API_DEFAULT_MODEL,
5
5
  validateCustomApiBaseUrl
6
- } from "./chunk-JLG5AUZB.js";
6
+ } from "./chunk-QFS5VOB6.js";
7
7
  import {
8
8
  err,
9
9
  ok
10
- } from "./chunk-GVTXP6F6.js";
10
+ } from "./chunk-QBCWORAK.js";
11
11
  import "./chunk-AXTD4TFK.js";
12
12
  import "./chunk-DHVMSIT5.js";
13
13
  import "./chunk-ZPWHCABL.js";
@@ -105,4 +105,4 @@ function buildShellFragment(params) {
105
105
  export {
106
106
  configureCustomApi
107
107
  };
108
- //# sourceMappingURL=setup-custom-api-LMA445OB.js.map
108
+ //# sourceMappingURL=setup-custom-api-B6QGKSEY.js.map
@@ -3,13 +3,13 @@ import {
3
3
  getToolMemory,
4
4
  reinitializeMemoryBackends,
5
5
  shutdownToolMemory
6
- } from "./chunk-MG4JBADQ.js";
6
+ } from "./chunk-LFKCJQ7G.js";
7
7
  import "./chunk-6T3EPABN.js";
8
- import "./chunk-PIODB4SW.js";
8
+ import "./chunk-O4J34GZT.js";
9
9
  import "./chunk-PINS44XA.js";
10
10
  import "./chunk-KSQSWEFH.js";
11
- import "./chunk-DCXCVEZP.js";
12
- import "./chunk-GVTXP6F6.js";
11
+ import "./chunk-IC3NZHPT.js";
12
+ import "./chunk-QBCWORAK.js";
13
13
  import "./chunk-AXTD4TFK.js";
14
14
  import "./chunk-DHVMSIT5.js";
15
15
  import "./chunk-ZPWHCABL.js";
@@ -19,4 +19,4 @@ export {
19
19
  reinitializeMemoryBackends,
20
20
  shutdownToolMemory
21
21
  };
22
- //# sourceMappingURL=tool-memory-K6EYH3FQ.js.map
22
+ //# sourceMappingURL=tool-memory-QUFVINHN.js.map
@@ -4,15 +4,15 @@ import {
4
4
  getGlobalRegistry,
5
5
  resetGlobalRegistry,
6
6
  withDefaultOnRetirement
7
- } from "./chunk-RJDJMOX6.js";
8
- import "./chunk-SCHD7NZD.js";
9
- import "./chunk-JOYOOEPJ.js";
10
- import "./chunk-JLG5AUZB.js";
11
- import "./chunk-Z4AWOPXA.js";
12
- import "./chunk-UXXNNT5D.js";
7
+ } from "./chunk-Z5GJ4FXW.js";
8
+ import "./chunk-5UDKUPZB.js";
9
+ import "./chunk-4KVAHGMB.js";
10
+ import "./chunk-QFS5VOB6.js";
11
+ import "./chunk-76Q63KJM.js";
12
+ import "./chunk-SUWN54CK.js";
13
13
  import "./chunk-QZUG667L.js";
14
- import "./chunk-DCXCVEZP.js";
15
- import "./chunk-GVTXP6F6.js";
14
+ import "./chunk-IC3NZHPT.js";
15
+ import "./chunk-QBCWORAK.js";
16
16
  import "./chunk-AXTD4TFK.js";
17
17
  import "./chunk-DHVMSIT5.js";
18
18
  import "./chunk-ZPWHCABL.js";
@@ -23,4 +23,4 @@ export {
23
23
  resetGlobalRegistry,
24
24
  withDefaultOnRetirement
25
25
  };
26
- //# sourceMappingURL=unified-registry-MJA6IBDD.js.map
26
+ //# sourceMappingURL=unified-registry-4NOWT2MU.js.map
@@ -5,7 +5,7 @@ import {
5
5
  getModelWeatherSummary,
6
6
  queryWithLookback,
7
7
  shouldExplore
8
- } from "./chunk-GVTXP6F6.js";
8
+ } from "./chunk-QBCWORAK.js";
9
9
  import "./chunk-AXTD4TFK.js";
10
10
  import "./chunk-DHVMSIT5.js";
11
11
  import "./chunk-ZPWHCABL.js";
@@ -17,4 +17,4 @@ export {
17
17
  queryWithLookback,
18
18
  shouldExplore
19
19
  };
20
- //# sourceMappingURL=weather-report-ID4ZNUAF.js.map
20
+ //# sourceMappingURL=weather-report-MCLS5MFZ.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexus-agents",
3
- "version": "2.170.0",
3
+ "version": "2.171.0",
4
4
  "description": "Governance substrate for AI coding agents — adversarial PR review, drift-detected rules, tamper-evident audit, and closed-loop outcome routing for Claude, Codex, Gemini, and OpenCode",
5
5
  "mcpName": "io.github.nexus-substrate/nexus-agents",
6
6
  "license": "MIT",
@@ -20,6 +20,7 @@
20
20
  "dist",
21
21
  "scripts/postinstall.js",
22
22
  "src/workflows/templates",
23
+ "src/security/ast-rules",
23
24
  "README.md"
24
25
  ],
25
26
  "repository": {
@@ -63,6 +64,8 @@
63
64
  },
64
65
  "dependencies": {
65
66
  "@anthropic-ai/sdk": "^0.110.0",
67
+ "@ast-grep/lang-go": "0.0.6",
68
+ "@ast-grep/lang-python": "0.0.6",
66
69
  "@ast-grep/napi": "0.44.1",
67
70
  "@google/genai": "^1.52.0",
68
71
  "@modelcontextprotocol/sdk": "^1.29.0",
@@ -0,0 +1,15 @@
1
+ id: command-exec-go
2
+ language: go
3
+ severity: warning
4
+ message: External command execution — verify args are not attacker-controlled
5
+ rule:
6
+ # A bare selector-expression pattern (`exec.Command($$$ARGS)`) does not
7
+ # reliably match against the dynamically-registered Go grammar (verified
8
+ # against @ast-grep/napi@0.44.1 + @ast-grep/lang-go@0.0.6): the pattern
9
+ # parser needs a valid enclosing Go context to resolve the `call_expression`
10
+ # selector for a dotted callee. The explicit context+selector form matches
11
+ # correctly and still excludes local/aliased near-misses (a bare `Command(x)`
12
+ # call, or a `myexec.Command(...)` call through a differently-named object).
13
+ pattern:
14
+ context: 'func f() { exec.Command($$$ARGS) }'
15
+ selector: call_expression
@@ -0,0 +1,8 @@
1
+ id: dangerous-eval-python
2
+ language: python
3
+ severity: error
4
+ message: Dynamic code execution via eval/exec
5
+ rule:
6
+ any:
7
+ - pattern: eval($CODE)
8
+ - pattern: exec($CODE)
@@ -0,0 +1,33 @@
1
+ // Fixture for the command-exec-go ast-grep rule.
2
+ //
3
+ // One rule-hit per statement keeps the red/green test assertions (ruleId +
4
+ // line number) stable across edits. Generic sample data only (input, x) —
5
+ // no project- or vendor-specific names.
6
+ package fixtures
7
+
8
+ import "os/exec"
9
+
10
+ // PositiveDirectCall shells out via the standard library exec.Command —
11
+ // POSITIVE: command-exec-go.
12
+ func PositiveDirectCall(input string) {
13
+ exec.Command("sh", "-c", input) // POSITIVE: command-exec-go (exec.Command)
14
+ }
15
+
16
+ // Command is a local helper of the SAME NAME as the stdlib call, but it is
17
+ // not `exec.Command` (no selector on the `exec` package) — must NOT match.
18
+ func Command(x string) string {
19
+ return x // NEGATIVE: local `Command(...)` helper, not `exec.Command`
20
+ }
21
+
22
+ // NegativeLocalHelper calls the local helper above directly — NEGATIVE.
23
+ func NegativeLocalHelper(x string) string {
24
+ return Command(x) // NEGATIVE: bare `Command(...)` call, no `exec.` selector
25
+ }
26
+
27
+ // NegativeAliasedNearMiss calls a `.Command(...)` method through a package
28
+ // alias that is NOT literally named `exec` — the ast-grep pattern matches on
29
+ // the literal identifier `exec`, so an aliased or differently-named package
30
+ // must not match.
31
+ func NegativeAliasedNearMiss(input string) {
32
+ myexec.Command("sh", "-c", input) // NEGATIVE: object is `myexec`, not `exec`
33
+ }
@@ -0,0 +1,41 @@
1
+ """Fixture for dangerous-eval-python / shell-injection-python ast-grep rules.
2
+
3
+ Each function below is intentionally tiny and self-contained: one rule-hit
4
+ per line keeps the red/green test assertions (ruleId + line number) stable
5
+ across edits. Generic sample data only (payload/user_input/cmd) — no
6
+ project- or vendor-specific names.
7
+ """
8
+
9
+
10
+ def positive_eval(user_input):
11
+ return eval(user_input) # POSITIVE: dangerous-eval-python (eval)
12
+
13
+
14
+ def positive_exec(payload):
15
+ exec(payload) # POSITIVE: dangerous-eval-python (exec)
16
+
17
+
18
+ def positive_os_system(cmd):
19
+ import os
20
+
21
+ os.system(cmd) # POSITIVE: shell-injection-python (os.system)
22
+
23
+
24
+ def positive_subprocess_shell_true(cmd):
25
+ import subprocess
26
+
27
+ subprocess.run(cmd, shell=True) # POSITIVE: shell-injection-python (shell=True)
28
+
29
+
30
+ def negative_evaluate(x):
31
+ return evaluate(x) # NEGATIVE: not `eval` — must not match dangerous-eval-python
32
+
33
+
34
+ def negative_executor(y):
35
+ return executor(y) # NEGATIVE: not `exec` — must not match dangerous-eval-python
36
+
37
+
38
+ def negative_subprocess_no_shell(cmd):
39
+ import subprocess
40
+
41
+ return subprocess.run(cmd) # NEGATIVE: no shell=True — must not match shell-injection-python
@@ -0,0 +1,13 @@
1
+ id: shell-injection-python
2
+ language: python
3
+ severity: error
4
+ message: Possible shell injection — shell=True / os.system with dynamic input
5
+ rule:
6
+ any:
7
+ - pattern: os.system($CMD)
8
+ # ast-grep's multi-meta-var cannot match a trailing empty `$$$B` right
9
+ # after another matched arg (a napi/dynamic-lang quirk, verified against
10
+ # @ast-grep/napi@0.44.1 + @ast-grep/lang-python@0.0.6) — `shell=True` as
11
+ # the LAST arg needs its own arm alongside the "more args follow" arm.
12
+ - pattern: subprocess.$FN($$$A, shell=True, $$$B)
13
+ - pattern: subprocess.$FN($$$A, shell=True)