@pan-sec/notebooklm-mcp 2026.3.3 → 2026.4.1

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 (470) hide show
  1. package/dist/auth/auth-manager.d.ts +0 -1
  2. package/dist/auth/auth-manager.js +0 -1
  3. package/dist/auth/mcp-auth.d.ts +0 -1
  4. package/dist/auth/mcp-auth.js +0 -1
  5. package/dist/compliance/alert-manager.d.ts +6 -2
  6. package/dist/compliance/alert-manager.js +40 -10
  7. package/dist/compliance/breach-detection.d.ts +0 -1
  8. package/dist/compliance/breach-detection.js +0 -1
  9. package/dist/compliance/change-log.d.ts +13 -1
  10. package/dist/compliance/change-log.js +82 -16
  11. package/dist/compliance/compliance-logger.d.ts +29 -3
  12. package/dist/compliance/compliance-logger.js +90 -27
  13. package/dist/compliance/compliance-tools.d.ts +0 -1
  14. package/dist/compliance/compliance-tools.js +0 -1
  15. package/dist/compliance/consent-manager.d.ts +0 -1
  16. package/dist/compliance/consent-manager.js +0 -1
  17. package/dist/compliance/dashboard.d.ts +4 -3
  18. package/dist/compliance/dashboard.js +11 -8
  19. package/dist/compliance/data-classification.d.ts +0 -1
  20. package/dist/compliance/data-classification.js +0 -1
  21. package/dist/compliance/data-erasure.d.ts +0 -1
  22. package/dist/compliance/data-erasure.js +0 -1
  23. package/dist/compliance/data-export.d.ts +0 -1
  24. package/dist/compliance/data-export.js +0 -1
  25. package/dist/compliance/data-inventory.d.ts +0 -1
  26. package/dist/compliance/data-inventory.js +0 -1
  27. package/dist/compliance/dsar-handler.d.ts +0 -1
  28. package/dist/compliance/dsar-handler.js +0 -1
  29. package/dist/compliance/evidence-collector.d.ts +0 -1
  30. package/dist/compliance/evidence-collector.js +4 -2
  31. package/dist/compliance/health-monitor.d.ts +0 -1
  32. package/dist/compliance/health-monitor.js +0 -1
  33. package/dist/compliance/incident-manager.d.ts +0 -1
  34. package/dist/compliance/incident-manager.js +0 -1
  35. package/dist/compliance/index.d.ts +0 -1
  36. package/dist/compliance/index.js +0 -1
  37. package/dist/compliance/policy-docs.d.ts +0 -1
  38. package/dist/compliance/policy-docs.js +0 -1
  39. package/dist/compliance/privacy-notice-text.d.ts +0 -1
  40. package/dist/compliance/privacy-notice-text.js +0 -1
  41. package/dist/compliance/privacy-notice.d.ts +0 -1
  42. package/dist/compliance/privacy-notice.js +0 -1
  43. package/dist/compliance/report-generator.d.ts +7 -1
  44. package/dist/compliance/report-generator.js +116 -34
  45. package/dist/compliance/retention-engine.d.ts +0 -1
  46. package/dist/compliance/retention-engine.js +0 -1
  47. package/dist/compliance/siem-exporter.d.ts +26 -2
  48. package/dist/compliance/siem-exporter.js +89 -24
  49. package/dist/compliance/types.d.ts +0 -1
  50. package/dist/compliance/types.js +0 -1
  51. package/dist/config.d.ts +0 -1
  52. package/dist/config.js +2 -3
  53. package/dist/errors.d.ts +0 -1
  54. package/dist/errors.js +0 -1
  55. package/dist/events/event-emitter.d.ts +9 -1
  56. package/dist/events/event-emitter.js +47 -8
  57. package/dist/events/event-types.d.ts +0 -1
  58. package/dist/events/event-types.js +8 -2
  59. package/dist/gemini/gemini-client.d.ts +0 -1
  60. package/dist/gemini/gemini-client.js +237 -45
  61. package/dist/gemini/index.d.ts +0 -1
  62. package/dist/gemini/index.js +0 -1
  63. package/dist/gemini/pdf-chunker.d.ts +0 -1
  64. package/dist/gemini/pdf-chunker.js +60 -35
  65. package/dist/gemini/types.d.ts +0 -1
  66. package/dist/gemini/types.js +0 -1
  67. package/dist/index.d.ts +0 -1
  68. package/dist/index.js +60 -7
  69. package/dist/library/notebook-library.d.ts +30 -2
  70. package/dist/library/notebook-library.js +345 -85
  71. package/dist/library/types.d.ts +0 -1
  72. package/dist/library/types.js +0 -1
  73. package/dist/logging/index.d.ts +0 -1
  74. package/dist/logging/index.js +0 -1
  75. package/dist/logging/query-logger.d.ts +20 -1
  76. package/dist/logging/query-logger.js +104 -21
  77. package/dist/notebook-creation/audio-manager.d.ts +7 -16
  78. package/dist/notebook-creation/audio-manager.js +115 -58
  79. package/dist/notebook-creation/browser-options.d.ts +0 -1
  80. package/dist/notebook-creation/browser-options.js +0 -1
  81. package/dist/notebook-creation/data-table-manager.d.ts +8 -14
  82. package/dist/notebook-creation/data-table-manager.js +64 -37
  83. package/dist/notebook-creation/dom-scripts.d.ts +0 -1
  84. package/dist/notebook-creation/dom-scripts.js +0 -1
  85. package/dist/notebook-creation/errors.d.ts +0 -1
  86. package/dist/notebook-creation/errors.js +0 -1
  87. package/dist/notebook-creation/index.d.ts +0 -1
  88. package/dist/notebook-creation/index.js +0 -1
  89. package/dist/notebook-creation/notebook-creator.d.ts +9 -1
  90. package/dist/notebook-creation/notebook-creator.js +50 -1
  91. package/dist/notebook-creation/notebook-nav.d.ts +0 -1
  92. package/dist/notebook-creation/notebook-nav.js +21 -6
  93. package/dist/notebook-creation/notebook-sync.d.ts +14 -2
  94. package/dist/notebook-creation/notebook-sync.js +124 -35
  95. package/dist/notebook-creation/selectors.d.ts +0 -1
  96. package/dist/notebook-creation/selectors.js +6 -4
  97. package/dist/notebook-creation/source-manager-shared.d.ts +75 -0
  98. package/dist/notebook-creation/source-manager-shared.js +86 -0
  99. package/dist/notebook-creation/source-manager.d.ts +29 -2
  100. package/dist/notebook-creation/source-manager.js +0 -0
  101. package/dist/notebook-creation/studio-manager-base.d.ts +57 -0
  102. package/dist/notebook-creation/studio-manager-base.js +67 -0
  103. package/dist/notebook-creation/types.d.ts +0 -1
  104. package/dist/notebook-creation/types.js +0 -1
  105. package/dist/notebook-creation/video-manager.d.ts +3 -16
  106. package/dist/notebook-creation/video-manager.js +94 -53
  107. package/dist/observability/metrics.d.ts +0 -1
  108. package/dist/observability/metrics.js +0 -1
  109. package/dist/quota/index.d.ts +0 -1
  110. package/dist/quota/index.js +0 -1
  111. package/dist/quota/quota-manager.d.ts +59 -4
  112. package/dist/quota/quota-manager.js +195 -46
  113. package/dist/resources/resource-handlers.d.ts +0 -1
  114. package/dist/resources/resource-handlers.js +33 -3
  115. package/dist/session/browser-session.d.ts +0 -1
  116. package/dist/session/browser-session.js +0 -1
  117. package/dist/session/session-manager.d.ts +0 -1
  118. package/dist/session/session-manager.js +0 -1
  119. package/dist/session/session-timeout.d.ts +0 -1
  120. package/dist/session/session-timeout.js +0 -1
  121. package/dist/session/shared-context-manager.d.ts +0 -1
  122. package/dist/session/shared-context-manager.js +0 -1
  123. package/dist/tools/annotations.d.ts +0 -1
  124. package/dist/tools/annotations.js +0 -1
  125. package/dist/tools/definitions/ask-question.d.ts +6 -3
  126. package/dist/tools/definitions/ask-question.js +12 -8
  127. package/dist/tools/definitions/chat-history.d.ts +0 -1
  128. package/dist/tools/definitions/chat-history.js +1 -1
  129. package/dist/tools/definitions/data-tables.d.ts +0 -1
  130. package/dist/tools/definitions/data-tables.js +4 -1
  131. package/dist/tools/definitions/gemini.d.ts +0 -1
  132. package/dist/tools/definitions/gemini.js +14 -7
  133. package/dist/tools/definitions/notebook-management.d.ts +0 -1
  134. package/dist/tools/definitions/notebook-management.js +7 -2
  135. package/dist/tools/definitions/query-history.d.ts +0 -1
  136. package/dist/tools/definitions/query-history.js +0 -1
  137. package/dist/tools/definitions/session-management.d.ts +0 -1
  138. package/dist/tools/definitions/session-management.js +0 -1
  139. package/dist/tools/definitions/system.d.ts +0 -1
  140. package/dist/tools/definitions/system.js +32 -12
  141. package/dist/tools/definitions/video.d.ts +0 -1
  142. package/dist/tools/definitions/video.js +6 -3
  143. package/dist/tools/definitions.d.ts +0 -1
  144. package/dist/tools/definitions.js +0 -1
  145. package/dist/tools/handlers/ask-question.d.ts +0 -1
  146. package/dist/tools/handlers/ask-question.js +47 -18
  147. package/dist/tools/handlers/audio-video.d.ts +0 -1
  148. package/dist/tools/handlers/audio-video.js +0 -1
  149. package/dist/tools/handlers/auth.d.ts +0 -1
  150. package/dist/tools/handlers/auth.js +0 -1
  151. package/dist/tools/handlers/error-utils.d.ts +0 -1
  152. package/dist/tools/handlers/error-utils.js +0 -1
  153. package/dist/tools/handlers/gemini.d.ts +0 -1
  154. package/dist/tools/handlers/gemini.js +0 -1
  155. package/dist/tools/handlers/index.d.ts +0 -1
  156. package/dist/tools/handlers/index.js +0 -1
  157. package/dist/tools/handlers/notebook-creation.d.ts +0 -1
  158. package/dist/tools/handlers/notebook-creation.js +16 -1
  159. package/dist/tools/handlers/notebook-management.d.ts +0 -1
  160. package/dist/tools/handlers/notebook-management.js +7 -2
  161. package/dist/tools/handlers/session-management.d.ts +0 -1
  162. package/dist/tools/handlers/session-management.js +0 -1
  163. package/dist/tools/handlers/system.d.ts +0 -1
  164. package/dist/tools/handlers/system.js +0 -1
  165. package/dist/tools/handlers/types.d.ts +0 -1
  166. package/dist/tools/handlers/types.js +0 -1
  167. package/dist/tools/handlers/webhooks.d.ts +0 -1
  168. package/dist/tools/handlers/webhooks.js +0 -1
  169. package/dist/tools/icons.d.ts +0 -1
  170. package/dist/tools/icons.js +0 -1
  171. package/dist/tools/index.d.ts +0 -1
  172. package/dist/tools/index.js +0 -1
  173. package/dist/types.d.ts +0 -1
  174. package/dist/types.js +0 -1
  175. package/dist/utils/audit-logger.d.ts +11 -1
  176. package/dist/utils/audit-logger.js +189 -21
  177. package/dist/utils/cleanup-manager.d.ts +0 -1
  178. package/dist/utils/cleanup-manager.js +0 -1
  179. package/dist/utils/cli-handler.d.ts +0 -1
  180. package/dist/utils/cli-handler.js +0 -1
  181. package/dist/utils/crypto.d.ts +18 -9
  182. package/dist/utils/crypto.js +93 -28
  183. package/dist/utils/file-lock.d.ts +15 -1
  184. package/dist/utils/file-lock.js +67 -59
  185. package/dist/utils/file-permissions.d.ts +0 -1
  186. package/dist/utils/file-permissions.js +35 -7
  187. package/dist/utils/logger.d.ts +0 -1
  188. package/dist/utils/logger.js +0 -1
  189. package/dist/utils/page-utils.d.ts +0 -1
  190. package/dist/utils/page-utils.js +32 -28
  191. package/dist/utils/response-validator.d.ts +0 -1
  192. package/dist/utils/response-validator.js +18 -15
  193. package/dist/utils/secrets-scanner.d.ts +0 -1
  194. package/dist/utils/secrets-scanner.js +32 -7
  195. package/dist/utils/secure-memory.d.ts +34 -16
  196. package/dist/utils/secure-memory.js +40 -25
  197. package/dist/utils/security.d.ts +0 -1
  198. package/dist/utils/security.js +66 -39
  199. package/dist/utils/settings-manager.d.ts +9 -1
  200. package/dist/utils/settings-manager.js +45 -2
  201. package/dist/utils/stealth-utils.d.ts +0 -1
  202. package/dist/utils/stealth-utils.js +11 -9
  203. package/dist/webhooks/index.d.ts +0 -1
  204. package/dist/webhooks/index.js +0 -1
  205. package/dist/webhooks/types.d.ts +0 -1
  206. package/dist/webhooks/types.js +0 -1
  207. package/dist/webhooks/webhook-dispatcher.d.ts +0 -1
  208. package/dist/webhooks/webhook-dispatcher.js +0 -1
  209. package/package.json +5 -4
  210. package/dist/auth/auth-manager.d.ts.map +0 -1
  211. package/dist/auth/auth-manager.js.map +0 -1
  212. package/dist/auth/mcp-auth.d.ts.map +0 -1
  213. package/dist/auth/mcp-auth.js.map +0 -1
  214. package/dist/compliance/alert-manager.d.ts.map +0 -1
  215. package/dist/compliance/alert-manager.js.map +0 -1
  216. package/dist/compliance/breach-detection.d.ts.map +0 -1
  217. package/dist/compliance/breach-detection.js.map +0 -1
  218. package/dist/compliance/change-log.d.ts.map +0 -1
  219. package/dist/compliance/change-log.js.map +0 -1
  220. package/dist/compliance/compliance-logger.d.ts.map +0 -1
  221. package/dist/compliance/compliance-logger.js.map +0 -1
  222. package/dist/compliance/compliance-tools.d.ts.map +0 -1
  223. package/dist/compliance/compliance-tools.js.map +0 -1
  224. package/dist/compliance/consent-manager.d.ts.map +0 -1
  225. package/dist/compliance/consent-manager.js.map +0 -1
  226. package/dist/compliance/dashboard.d.ts.map +0 -1
  227. package/dist/compliance/dashboard.js.map +0 -1
  228. package/dist/compliance/data-classification.d.ts.map +0 -1
  229. package/dist/compliance/data-classification.js.map +0 -1
  230. package/dist/compliance/data-erasure.d.ts.map +0 -1
  231. package/dist/compliance/data-erasure.js.map +0 -1
  232. package/dist/compliance/data-export.d.ts.map +0 -1
  233. package/dist/compliance/data-export.js.map +0 -1
  234. package/dist/compliance/data-inventory.d.ts.map +0 -1
  235. package/dist/compliance/data-inventory.js.map +0 -1
  236. package/dist/compliance/dsar-handler.d.ts.map +0 -1
  237. package/dist/compliance/dsar-handler.js.map +0 -1
  238. package/dist/compliance/evidence-collector.d.ts.map +0 -1
  239. package/dist/compliance/evidence-collector.js.map +0 -1
  240. package/dist/compliance/health-monitor.d.ts.map +0 -1
  241. package/dist/compliance/health-monitor.js.map +0 -1
  242. package/dist/compliance/incident-manager.d.ts.map +0 -1
  243. package/dist/compliance/incident-manager.js.map +0 -1
  244. package/dist/compliance/index.d.ts.map +0 -1
  245. package/dist/compliance/index.js.map +0 -1
  246. package/dist/compliance/policy-docs.d.ts.map +0 -1
  247. package/dist/compliance/policy-docs.js.map +0 -1
  248. package/dist/compliance/privacy-notice-text.d.ts.map +0 -1
  249. package/dist/compliance/privacy-notice-text.js.map +0 -1
  250. package/dist/compliance/privacy-notice.d.ts.map +0 -1
  251. package/dist/compliance/privacy-notice.js.map +0 -1
  252. package/dist/compliance/report-generator.d.ts.map +0 -1
  253. package/dist/compliance/report-generator.js.map +0 -1
  254. package/dist/compliance/retention-engine.d.ts.map +0 -1
  255. package/dist/compliance/retention-engine.js.map +0 -1
  256. package/dist/compliance/siem-exporter.d.ts.map +0 -1
  257. package/dist/compliance/siem-exporter.js.map +0 -1
  258. package/dist/compliance/types.d.ts.map +0 -1
  259. package/dist/compliance/types.js.map +0 -1
  260. package/dist/config.d.ts.map +0 -1
  261. package/dist/config.js.map +0 -1
  262. package/dist/errors.d.ts.map +0 -1
  263. package/dist/errors.js.map +0 -1
  264. package/dist/events/event-emitter.d.ts.map +0 -1
  265. package/dist/events/event-emitter.js.map +0 -1
  266. package/dist/events/event-types.d.ts.map +0 -1
  267. package/dist/events/event-types.js.map +0 -1
  268. package/dist/gemini/gemini-client.d.ts.map +0 -1
  269. package/dist/gemini/gemini-client.js.map +0 -1
  270. package/dist/gemini/index.d.ts.map +0 -1
  271. package/dist/gemini/index.js.map +0 -1
  272. package/dist/gemini/pdf-chunker.d.ts.map +0 -1
  273. package/dist/gemini/pdf-chunker.js.map +0 -1
  274. package/dist/gemini/types.d.ts.map +0 -1
  275. package/dist/gemini/types.js.map +0 -1
  276. package/dist/index.d.ts.map +0 -1
  277. package/dist/index.js.map +0 -1
  278. package/dist/library/notebook-library.d.ts.map +0 -1
  279. package/dist/library/notebook-library.js.map +0 -1
  280. package/dist/library/types.d.ts.map +0 -1
  281. package/dist/library/types.js.map +0 -1
  282. package/dist/logging/index.d.ts.map +0 -1
  283. package/dist/logging/index.js.map +0 -1
  284. package/dist/logging/query-logger.d.ts.map +0 -1
  285. package/dist/logging/query-logger.js.map +0 -1
  286. package/dist/notebook-creation/audio-manager.d.ts.map +0 -1
  287. package/dist/notebook-creation/audio-manager.js.map +0 -1
  288. package/dist/notebook-creation/browser-options.d.ts.map +0 -1
  289. package/dist/notebook-creation/browser-options.js.map +0 -1
  290. package/dist/notebook-creation/data-table-manager.d.ts.map +0 -1
  291. package/dist/notebook-creation/data-table-manager.js.map +0 -1
  292. package/dist/notebook-creation/discover-creation-flow.d.ts +0 -2
  293. package/dist/notebook-creation/discover-creation-flow.d.ts.map +0 -1
  294. package/dist/notebook-creation/discover-creation-flow.js +0 -177
  295. package/dist/notebook-creation/discover-creation-flow.js.map +0 -1
  296. package/dist/notebook-creation/discover-quota.d.ts +0 -2
  297. package/dist/notebook-creation/discover-quota.d.ts.map +0 -1
  298. package/dist/notebook-creation/discover-quota.js +0 -194
  299. package/dist/notebook-creation/discover-quota.js.map +0 -1
  300. package/dist/notebook-creation/discover-source-dialog.d.ts +0 -8
  301. package/dist/notebook-creation/discover-source-dialog.d.ts.map +0 -1
  302. package/dist/notebook-creation/discover-source-dialog.js +0 -134
  303. package/dist/notebook-creation/discover-source-dialog.js.map +0 -1
  304. package/dist/notebook-creation/discover-sources.d.ts +0 -8
  305. package/dist/notebook-creation/discover-sources.d.ts.map +0 -1
  306. package/dist/notebook-creation/discover-sources.js +0 -272
  307. package/dist/notebook-creation/discover-sources.js.map +0 -1
  308. package/dist/notebook-creation/discover-text-input.d.ts +0 -7
  309. package/dist/notebook-creation/discover-text-input.d.ts.map +0 -1
  310. package/dist/notebook-creation/discover-text-input.js +0 -135
  311. package/dist/notebook-creation/discover-text-input.js.map +0 -1
  312. package/dist/notebook-creation/dom-scripts.d.ts.map +0 -1
  313. package/dist/notebook-creation/dom-scripts.js.map +0 -1
  314. package/dist/notebook-creation/errors.d.ts.map +0 -1
  315. package/dist/notebook-creation/errors.js.map +0 -1
  316. package/dist/notebook-creation/index.d.ts.map +0 -1
  317. package/dist/notebook-creation/index.js.map +0 -1
  318. package/dist/notebook-creation/notebook-creator.d.ts.map +0 -1
  319. package/dist/notebook-creation/notebook-creator.js.map +0 -1
  320. package/dist/notebook-creation/notebook-nav.d.ts.map +0 -1
  321. package/dist/notebook-creation/notebook-nav.js.map +0 -1
  322. package/dist/notebook-creation/notebook-sync.d.ts.map +0 -1
  323. package/dist/notebook-creation/notebook-sync.js.map +0 -1
  324. package/dist/notebook-creation/run-discovery.d.ts +0 -11
  325. package/dist/notebook-creation/run-discovery.d.ts.map +0 -1
  326. package/dist/notebook-creation/run-discovery.js +0 -151
  327. package/dist/notebook-creation/run-discovery.js.map +0 -1
  328. package/dist/notebook-creation/selector-discovery.d.ts +0 -65
  329. package/dist/notebook-creation/selector-discovery.d.ts.map +0 -1
  330. package/dist/notebook-creation/selector-discovery.js +0 -414
  331. package/dist/notebook-creation/selector-discovery.js.map +0 -1
  332. package/dist/notebook-creation/selectors.d.ts.map +0 -1
  333. package/dist/notebook-creation/selectors.js.map +0 -1
  334. package/dist/notebook-creation/selectors.ts +0 -112
  335. package/dist/notebook-creation/source-manager.d.ts.map +0 -1
  336. package/dist/notebook-creation/source-manager.js.map +0 -1
  337. package/dist/notebook-creation/test-create.d.ts +0 -8
  338. package/dist/notebook-creation/test-create.d.ts.map +0 -1
  339. package/dist/notebook-creation/test-create.js +0 -72
  340. package/dist/notebook-creation/test-create.js.map +0 -1
  341. package/dist/notebook-creation/types.d.ts.map +0 -1
  342. package/dist/notebook-creation/types.js.map +0 -1
  343. package/dist/notebook-creation/video-manager.d.ts.map +0 -1
  344. package/dist/notebook-creation/video-manager.js.map +0 -1
  345. package/dist/observability/metrics.d.ts.map +0 -1
  346. package/dist/observability/metrics.js.map +0 -1
  347. package/dist/quota/index.d.ts.map +0 -1
  348. package/dist/quota/index.js.map +0 -1
  349. package/dist/quota/quota-manager.d.ts.map +0 -1
  350. package/dist/quota/quota-manager.js.map +0 -1
  351. package/dist/resources/resource-handlers.d.ts.map +0 -1
  352. package/dist/resources/resource-handlers.js.map +0 -1
  353. package/dist/session/browser-session.d.ts.map +0 -1
  354. package/dist/session/browser-session.js.map +0 -1
  355. package/dist/session/session-manager.d.ts.map +0 -1
  356. package/dist/session/session-manager.js.map +0 -1
  357. package/dist/session/session-timeout.d.ts.map +0 -1
  358. package/dist/session/session-timeout.js.map +0 -1
  359. package/dist/session/shared-context-manager.d.ts.map +0 -1
  360. package/dist/session/shared-context-manager.js.map +0 -1
  361. package/dist/tools/annotations.d.ts.map +0 -1
  362. package/dist/tools/annotations.js.map +0 -1
  363. package/dist/tools/definitions/ask-question.d.ts.map +0 -1
  364. package/dist/tools/definitions/ask-question.js.map +0 -1
  365. package/dist/tools/definitions/chat-history.d.ts.map +0 -1
  366. package/dist/tools/definitions/chat-history.js.map +0 -1
  367. package/dist/tools/definitions/data-tables.d.ts.map +0 -1
  368. package/dist/tools/definitions/data-tables.js.map +0 -1
  369. package/dist/tools/definitions/gemini.d.ts.map +0 -1
  370. package/dist/tools/definitions/gemini.js.map +0 -1
  371. package/dist/tools/definitions/notebook-management.d.ts.map +0 -1
  372. package/dist/tools/definitions/notebook-management.js.map +0 -1
  373. package/dist/tools/definitions/query-history.d.ts.map +0 -1
  374. package/dist/tools/definitions/query-history.js.map +0 -1
  375. package/dist/tools/definitions/session-management.d.ts.map +0 -1
  376. package/dist/tools/definitions/session-management.js.map +0 -1
  377. package/dist/tools/definitions/system.d.ts.map +0 -1
  378. package/dist/tools/definitions/system.js.map +0 -1
  379. package/dist/tools/definitions/video.d.ts.map +0 -1
  380. package/dist/tools/definitions/video.js.map +0 -1
  381. package/dist/tools/definitions.d.ts.map +0 -1
  382. package/dist/tools/definitions.js.map +0 -1
  383. package/dist/tools/handlers/ask-question.d.ts.map +0 -1
  384. package/dist/tools/handlers/ask-question.js.map +0 -1
  385. package/dist/tools/handlers/audio-video.d.ts.map +0 -1
  386. package/dist/tools/handlers/audio-video.js.map +0 -1
  387. package/dist/tools/handlers/auth.d.ts.map +0 -1
  388. package/dist/tools/handlers/auth.js.map +0 -1
  389. package/dist/tools/handlers/error-utils.d.ts.map +0 -1
  390. package/dist/tools/handlers/error-utils.js.map +0 -1
  391. package/dist/tools/handlers/gemini.d.ts.map +0 -1
  392. package/dist/tools/handlers/gemini.js.map +0 -1
  393. package/dist/tools/handlers/index.d.ts.map +0 -1
  394. package/dist/tools/handlers/index.js.map +0 -1
  395. package/dist/tools/handlers/notebook-creation.d.ts.map +0 -1
  396. package/dist/tools/handlers/notebook-creation.js.map +0 -1
  397. package/dist/tools/handlers/notebook-management.d.ts.map +0 -1
  398. package/dist/tools/handlers/notebook-management.js.map +0 -1
  399. package/dist/tools/handlers/session-management.d.ts.map +0 -1
  400. package/dist/tools/handlers/session-management.js.map +0 -1
  401. package/dist/tools/handlers/system.d.ts.map +0 -1
  402. package/dist/tools/handlers/system.js.map +0 -1
  403. package/dist/tools/handlers/types.d.ts.map +0 -1
  404. package/dist/tools/handlers/types.js.map +0 -1
  405. package/dist/tools/handlers/webhooks.d.ts.map +0 -1
  406. package/dist/tools/handlers/webhooks.js.map +0 -1
  407. package/dist/tools/handlers.d.ts +0 -666
  408. package/dist/tools/handlers.d.ts.map +0 -1
  409. package/dist/tools/handlers.js +0 -2929
  410. package/dist/tools/handlers.js.map +0 -1
  411. package/dist/tools/icons.d.ts.map +0 -1
  412. package/dist/tools/icons.js.map +0 -1
  413. package/dist/tools/index.d.ts.map +0 -1
  414. package/dist/tools/index.js.map +0 -1
  415. package/dist/types.d.ts.map +0 -1
  416. package/dist/types.js.map +0 -1
  417. package/dist/utils/audit-logger.d.ts.map +0 -1
  418. package/dist/utils/audit-logger.js.map +0 -1
  419. package/dist/utils/cert-pinning.d.ts +0 -97
  420. package/dist/utils/cert-pinning.d.ts.map +0 -1
  421. package/dist/utils/cert-pinning.js +0 -328
  422. package/dist/utils/cert-pinning.js.map +0 -1
  423. package/dist/utils/cleanup-manager.d.ts.map +0 -1
  424. package/dist/utils/cleanup-manager.js.map +0 -1
  425. package/dist/utils/cli-handler.d.ts.map +0 -1
  426. package/dist/utils/cli-handler.js.map +0 -1
  427. package/dist/utils/crypto.d.ts.map +0 -1
  428. package/dist/utils/crypto.js.map +0 -1
  429. package/dist/utils/file-lock.d.ts.map +0 -1
  430. package/dist/utils/file-lock.js.map +0 -1
  431. package/dist/utils/file-permissions.d.ts.map +0 -1
  432. package/dist/utils/file-permissions.js.map +0 -1
  433. package/dist/utils/logger.d.ts.map +0 -1
  434. package/dist/utils/logger.js.map +0 -1
  435. package/dist/utils/page-utils.d.ts.map +0 -1
  436. package/dist/utils/page-utils.js.map +0 -1
  437. package/dist/utils/response-validator.d.ts.map +0 -1
  438. package/dist/utils/response-validator.js.map +0 -1
  439. package/dist/utils/secrets-scanner.d.ts.map +0 -1
  440. package/dist/utils/secrets-scanner.js.map +0 -1
  441. package/dist/utils/secure-memory.d.ts.map +0 -1
  442. package/dist/utils/secure-memory.js.map +0 -1
  443. package/dist/utils/security.d.ts.map +0 -1
  444. package/dist/utils/security.js.map +0 -1
  445. package/dist/utils/settings-manager.d.ts.map +0 -1
  446. package/dist/utils/settings-manager.js.map +0 -1
  447. package/dist/utils/stealth-utils.d.ts.map +0 -1
  448. package/dist/utils/stealth-utils.js.map +0 -1
  449. package/dist/utils/tool-validation.d.ts +0 -93
  450. package/dist/utils/tool-validation.d.ts.map +0 -1
  451. package/dist/utils/tool-validation.js +0 -277
  452. package/dist/utils/tool-validation.js.map +0 -1
  453. package/dist/webhooks/index.d.ts.map +0 -1
  454. package/dist/webhooks/index.js.map +0 -1
  455. package/dist/webhooks/types.d.ts.map +0 -1
  456. package/dist/webhooks/types.js.map +0 -1
  457. package/dist/webhooks/webhook-dispatcher.d.ts.map +0 -1
  458. package/dist/webhooks/webhook-dispatcher.js.map +0 -1
  459. package/docs/COMPLIANCE-SPEC.md +0 -1452
  460. package/docs/MCP-DIRECTORY-LISTINGS.md +0 -91
  461. package/docs/SECURITY-FORK-OPPORTUNITIES.md +0 -79
  462. package/docs/SECURITY_IMPLEMENTATION_PLAN.md +0 -437
  463. package/docs/archive/ISSUES-legacy-2026-04-24.md +0 -644
  464. package/docs/configuration.md +0 -94
  465. package/docs/dependency-risk.md +0 -25
  466. package/docs/improvement-sprint-2026.2.10.md +0 -210
  467. package/docs/testing-runbook.md +0 -166
  468. package/docs/tools.md +0 -34
  469. package/docs/troubleshooting.md +0 -59
  470. package/docs/usage-guide.md +0 -246
@@ -1,91 +0,0 @@
1
- # MCP Directory Listings Tracker
2
-
3
- Track where `@pan-sec/notebooklm-mcp` is listed and submission progress.
4
-
5
- **Last Updated:** 2026-01-24
6
-
7
- ---
8
-
9
- ## Current Listings
10
-
11
- | Directory | Status | URL | Notes |
12
- |-----------|--------|-----|-------|
13
- | [Official MCP Registry](https://registry.modelcontextprotocol.io/) | ✅ Listed | io.github.Pantheon-Security/notebooklm-mcp-secure | Published 2026-01-24 |
14
- | [Glama.ai](https://glama.ai/mcp/servers) | ✅ Listed | [View Listing](https://glama.ai/mcp/servers/@Pantheon-Security/notebooklm-mcp-secure) | Auto-indexed from GitHub |
15
- | [PulseMCP](https://www.pulsemcp.com/servers) | ✅ Listed | [View Listing](https://www.pulsemcp.com/servers/pantheon-security-notebooklm-secure) | Auto-indexed, #601 this week |
16
- | [awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers) | ⏳ PR Pending | [PR #1735](https://github.com/punkpeye/awesome-mcp-servers/pull/1735) | Submitted 2026-01-24 |
17
-
18
- ---
19
-
20
- ## Pending Submissions
21
-
22
- ### Priority 2: Good Visibility
23
-
24
- #### MCP.so
25
- - **URL:** https://mcp.so/
26
- - **Submit via:** https://github.com/chatmcp/mcpso
27
- - **Status:** ⏳ Not submitted
28
- - **Notes:** Popular directory with call ranking leaderboard.
29
-
30
- #### MCPServers.org
31
- - **URL:** https://mcpservers.org/
32
- - **Submit via:** Unknown - check site
33
- - **Status:** ⏳ Not submitted
34
- - **Notes:** Has original notebooklm-mcp, not secure fork.
35
-
36
- #### mcp-get.com
37
- - **URL:** https://mcp-get.com/
38
- - **Submit via:** Package registry submission
39
- - **Status:** ⏳ Not submitted
40
- - **Notes:** Package manager style directory.
41
-
42
- ### Requires Hosted Server
43
-
44
- #### Smithery.ai
45
- - **URL:** https://smithery.ai/
46
- - **Status:** ❌ Requires remote hosting
47
- - **Notes:** Server/Client style MCP. Would need to deploy notebooklm-mcp as a hosted service.
48
-
49
- ### Priority 3: Niche/Emerging
50
-
51
- #### Azure API Center
52
- - **URL:** https://learn.microsoft.com/en-us/azure/api-center/register-discover-mcp-server
53
- - **Submit via:** Azure portal
54
- - **Status:** ⏳ Not applicable yet
55
- - **Notes:** Enterprise Azure integration. Consider for enterprise customers.
56
-
57
- #### awesome-devops-mcp-servers
58
- - **URL:** https://github.com/rohitg00/awesome-devops-mcp-servers
59
- - **Submit via:** Pull Request
60
- - **Status:** ⏳ Not submitted
61
- - **Notes:** DevOps focused list. May not be relevant.
62
-
63
- ---
64
-
65
- ## Completed
66
-
67
- - [x] Official MCP Registry - Published 2026-01-24
68
- - [x] Glama.ai - Auto-listed
69
- - [x] PulseMCP - Auto-indexed
70
- - [x] awesome-mcp-servers - PR #1735 submitted
71
-
72
- ---
73
-
74
- ## Related Projects
75
-
76
- | Project | Directories Listed |
77
- |---------|-------------------|
78
- | [chrome-mcp-secure](https://github.com/Pantheon-Security/chrome-mcp-secure) | awesome-mcp-servers ✅ |
79
- | [notebooklm-mcp-secure](https://github.com/Pantheon-Security/notebooklm-mcp-secure) | Official Registry ✅, Glama ✅, PulseMCP ✅ |
80
-
81
- ---
82
-
83
- ## Stats
84
-
85
- - **PulseMCP Rank:** #601 this week, #3,227 global
86
- - **GitHub Stars:** 14
87
- - **npm:** @pan-sec/notebooklm-mcp v2026.1.5
88
-
89
- ---
90
-
91
- *This document tracks MCP directory listings for visibility and discoverability.*
@@ -1,79 +0,0 @@
1
- # Security Fork Opportunities
2
-
3
- MCP servers that could benefit from Pantheon Security hardening.
4
-
5
- **Last Updated:** 2026-01-24
6
-
7
- ---
8
-
9
- ## High Priority (High Traffic + High Risk)
10
-
11
- | Rank | Server | Weekly Visitors | Security Gaps | Effort |
12
- |------|--------|-----------------|---------------|--------|
13
- | #4 | **Filesystem** (Anthropic) | 193K | No sandboxing, no path validation, no audit logging | Medium |
14
- | #18 | **PostgreSQL** (Anthropic) | 31.8K | SQL injection risk, no query validation, no audit trails | Medium |
15
- | #17 | **MongoDB** (MongoDB Inc.) | 35.6K | NoSQL injection, data exfiltration, no encryption | Medium |
16
- | #12 | **Git** (Anthropic) | 66.8K | Command execution, credential exposure, repo tampering | Medium |
17
- | #19 | **Supabase** (Supabase) | 40.5K | Database + auth, credential exposure, API key leaks | High |
18
-
19
- ---
20
-
21
- ## Medium Priority (Good Traffic + Moderate Risk)
22
-
23
- | Rank | Server | Weekly Visitors | Security Gaps | Effort |
24
- |------|--------|-----------------|---------------|--------|
25
- | #3 | **Fetch** (Anthropic) | 249K | URL validation, SSRF risks, data exfiltration | Low |
26
- | #7 | **Claude Flow** (ruvnet) | 163K | Agent orchestration, prompt injection, privilege escalation | High |
27
- | #8 | **Playwriter** (Community) | 129K | Browser automation, credential capture, DOM injection | Medium |
28
- | #20 | **Notion** (Notion) | 26.7K | API key exposure, data access logging | Low |
29
- | #16 | **Zapier** (Zapier) | 48.9K | 8000+ app integrations, credential management | High |
30
-
31
- ---
32
-
33
- ## Already Covered
34
-
35
- | Server | Pantheon Fork | Status |
36
- |--------|---------------|--------|
37
- | Chrome/Playwright | [chrome-mcp-secure](https://github.com/Pantheon-Security/chrome-mcp-secure) | ✅ Published |
38
- | NotebookLM | [notebooklm-mcp-secure](https://github.com/Pantheon-Security/notebooklm-mcp-secure) | ✅ Published |
39
-
40
- ---
41
-
42
- ## Security Layers to Add
43
-
44
- Standard Pantheon Security hardening:
45
-
46
- 1. **Input Validation** - Zod schemas, path traversal prevention
47
- 2. **Audit Logging** - Hash-chained logs, SIEM integration
48
- 3. **Post-Quantum Encryption** - ML-KEM-768 + ChaCha20-Poly1305
49
- 4. **Credential Protection** - Secrets scanning, memory scrubbing
50
- 5. **Rate Limiting** - Abuse prevention
51
- 6. **Compliance Tools** - GDPR consent, SOC2 evidence, CSSF retention
52
- 7. **Session Security** - Timeouts, MCP authentication
53
- 8. **Response Validation** - Output sanitization
54
-
55
- ---
56
-
57
- ## Recommended First Target
58
-
59
- **filesystem-mcp-secure**
60
- - Highest risk (direct file system access)
61
- - Large user base (193K weekly)
62
- - Clear value prop: "Secure file access with sandboxing and audit trails"
63
- - Anthropic's official = credibility for fork
64
-
65
- ---
66
-
67
- ## Research Links
68
-
69
- | Server | GitHub |
70
- |--------|--------|
71
- | Filesystem | https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem |
72
- | PostgreSQL | https://github.com/modelcontextprotocol/servers/tree/main/src/postgres |
73
- | Git | https://github.com/modelcontextprotocol/servers/tree/main/src/git |
74
- | MongoDB | https://github.com/mongodb/mcp-server |
75
- | Fetch | https://github.com/modelcontextprotocol/servers/tree/main/src/fetch |
76
-
77
- ---
78
-
79
- *Track progress and prioritize based on enterprise customer demand.*
@@ -1,437 +0,0 @@
1
- # Security Implementation Plan - High Priority Features
2
-
3
- ## Overview
4
-
5
- This plan outlines the implementation of 5 high-priority security features for the notebooklm-mcp-secure fork.
6
-
7
- **Target Version**: 1.3.0-secure
8
- **Status**: ✅ ALL PHASES COMPLETE
9
- **Estimated Files**: 8 new, 6 modified
10
-
11
- ### Implementation Status
12
-
13
- | Phase | Feature | Status |
14
- |-------|---------|--------|
15
- | 1 | Audit Logging | ✅ Complete |
16
- | 2 | Session Timeout | ✅ Complete |
17
- | 3 | MCP Authentication | ✅ Complete |
18
- | 4 | Response Validation | ✅ Complete |
19
- | 5 | Post-Quantum Encrypted Storage | ✅ Complete |
20
-
21
- ---
22
-
23
- ## Feature 1: Post-Quantum Encrypted Credential Storage ✅
24
-
25
- ### Problem
26
- Chrome profile stores session cookies and auth state in plaintext on disk at:
27
- - `~/.local/share/notebooklm-mcp/chrome_profile/`
28
- - `~/.local/share/notebooklm-mcp/browser_state/state.json`
29
-
30
- Anyone with disk access can steal the Google session. Additionally, classical encryption may be vulnerable to future quantum computer attacks.
31
-
32
- ### Solution
33
- Encrypt sensitive files at rest using **hybrid post-quantum encryption**:
34
- - **ML-KEM-768 (Kyber)** for quantum-resistant key encapsulation
35
- - **AES-256-GCM** for symmetric encryption
36
- - **PBKDF2** for classical key derivation from passwords
37
-
38
- This hybrid approach provides both current security and future quantum resistance.
39
-
40
- ### Implementation (COMPLETE)
41
-
42
- ```
43
- src/utils/crypto.ts (NEW) ✅
44
- ├── deriveKey(passphrase, salt) → Key derivation using PBKDF2
45
- ├── getMachineKey() → Derive key from machine ID (fallback)
46
- ├── generatePQKeyPair() → Generate ML-KEM-768 key pair
47
- ├── encryptPQ(data, publicKey) → Hybrid PQ+AES-256-GCM encryption
48
- ├── decryptPQ(ciphertext, secretKey) → Hybrid PQ decryption
49
- ├── encryptClassical(data, key) → AES-256-GCM encryption (fallback)
50
- ├── decryptClassical(ciphertext, key) → AES-256-GCM decryption
51
- └── SecureStorage class
52
- ├── initialize() → Load/generate PQ keys
53
- ├── save(filename, data) → Encrypt with ML-KEM-768 + AES-256-GCM
54
- ├── load(filename) → Decrypt and return data
55
- ├── loadJSON<T>(filename) → Parse JSON after decryption
56
- ├── delete(filename) → Remove all encrypted versions
57
- ├── exists(filename) → Check any version exists
58
- ├── getStatus() → Return encryption status
59
- └── getPublicKey() → Export PQ public key
60
- ```
61
-
62
- ### Encrypted File Format
63
- ```json
64
- {
65
- "version": 2,
66
- "algorithm": "aes-256-gcm",
67
- "pqAlgorithm": "ML-KEM-768",
68
- "encapsulatedKey": "<base64>",
69
- "iv": "<base64>",
70
- "salt": "<base64>",
71
- "tag": "<base64>",
72
- "ciphertext": "<base64>"
73
- }
74
- ```
75
-
76
- ### Files Modified
77
- - `src/auth/auth-manager.ts` ✅ - Use SecureStorage for state.json, session.json
78
- - `package.json` ✅ - Added `@noble/post-quantum` dependency
79
-
80
- ### Environment Variables
81
- ```
82
- NLMCP_ENCRYPTION_ENABLED=true # Default: true
83
- NLMCP_ENCRYPTION_KEY=<base64-key> # Optional: User-provided classical key
84
- NLMCP_USE_POST_QUANTUM=true # Default: true
85
- NLMCP_USE_MACHINE_KEY=true # Default: true (fallback)
86
- NLMCP_PBKDF2_ITERATIONS=100000 # Default: 100000
87
- ```
88
-
89
- ### Dependencies
90
- - Node.js `crypto` module (built-in)
91
- - `@noble/post-quantum` v0.2.1 - ML-KEM (Kyber) implementation
92
-
93
- ### Security Properties
94
- 1. **Quantum Resistance**: ML-KEM-768 provides ~192-bit post-quantum security
95
- 2. **Hybrid Security**: Even if PQ crypto is broken, AES-256-GCM remains secure
96
- 3. **Forward Secrecy**: New encapsulated key per file save
97
- 4. **Automatic Migration**: Unencrypted files are automatically encrypted on load
98
-
99
- ---
100
-
101
- ## Feature 2: Session Timeout Enforcement
102
-
103
- ### Problem
104
- Sessions can remain active indefinitely. Stale sessions with valid cookies pose security risk.
105
-
106
- ### Solution
107
- Implement configurable hard timeout that:
108
- 1. Forces session closure after max lifetime (e.g., 8 hours)
109
- 2. Forces re-authentication after inactivity (e.g., 30 minutes)
110
- 3. Clears sensitive memory on timeout
111
-
112
- ### Implementation
113
-
114
- ```
115
- src/session/session-timeout.ts (NEW)
116
- ├── SessionTimeoutManager class
117
- │ ├── startSession(sessionId)
118
- │ ├── touchSession(sessionId) → Reset inactivity timer
119
- │ ├── isExpired(sessionId) → boolean
120
- │ ├── getTimeRemaining(sessionId) → { lifetime, inactivity }
121
- │ └── onTimeout callback → Cleanup handler
122
- └── TimeoutConfig interface
123
- ├── maxLifetimeMs: number (default: 8 hours)
124
- ├── inactivityTimeoutMs: number (default: 30 min)
125
- └── warningBeforeMs: number (default: 5 min)
126
- ```
127
-
128
- ### Files Modified
129
- - `src/session/session-manager.ts` - Integrate timeout checks
130
- - `src/session/browser-session.ts` - Call touchSession on activity
131
- - `src/tools/handlers.ts` - Return timeout warnings in responses
132
- - `src/config.ts` - Add timeout config options
133
-
134
- ### Environment Variables
135
- ```
136
- NLMCP_SESSION_MAX_LIFETIME=28800 # 8 hours in seconds
137
- NLMCP_SESSION_INACTIVITY_TIMEOUT=1800 # 30 minutes in seconds
138
- ```
139
-
140
- ---
141
-
142
- ## Feature 3: Audit Logging
143
-
144
- ### Problem
145
- No record of what operations were performed, when, or by whom. Critical for:
146
- - Security incident investigation
147
- - Compliance requirements
148
- - Debugging production issues
149
-
150
- ### Solution
151
- Comprehensive audit log with:
152
- - All tool invocations with sanitized parameters
153
- - Authentication events (login, logout, failures)
154
- - Session lifecycle events
155
- - Security events (validation failures, rate limits)
156
-
157
- ### Implementation
158
-
159
- ```
160
- src/utils/audit-logger.ts (NEW)
161
- ├── AuditLogger class
162
- │ ├── logToolCall(tool, args, result, duration)
163
- │ ├── logAuthEvent(event, success, details)
164
- │ ├── logSessionEvent(event, sessionId, details)
165
- │ ├── logSecurityEvent(event, severity, details)
166
- │ └── flush() → Force write to disk
167
- ├── AuditEvent interface
168
- │ ├── timestamp: ISO8601 string
169
- │ ├── eventType: 'tool' | 'auth' | 'session' | 'security'
170
- │ ├── eventName: string
171
- │ ├── success: boolean
172
- │ ├── duration_ms?: number
173
- │ ├── details: Record<string, any> (sanitized)
174
- │ └── hash: SHA256 of previous entry (tamper detection)
175
- └── Log rotation and retention config
176
- ```
177
-
178
- ### Log Format (JSONL)
179
- ```json
180
- {"timestamp":"2025-11-28T10:30:00Z","eventType":"tool","eventName":"ask_question","success":true,"duration_ms":3420,"details":{"question_length":150,"session_id":"abc123"},"hash":"a1b2c3..."}
181
- {"timestamp":"2025-11-28T10:30:05Z","eventType":"security","eventName":"rate_limit_exceeded","success":false,"details":{"session_id":"abc123","remaining":0},"hash":"d4e5f6..."}
182
- ```
183
-
184
- ### Files Modified
185
- - `src/tools/handlers.ts` - Add audit logging to all handlers
186
- - `src/auth/auth-manager.ts` - Log auth events
187
- - `src/session/session-manager.ts` - Log session events
188
- - `src/index.ts` - Initialize audit logger on startup
189
-
190
- ### Log Location
191
- ```
192
- ~/.local/share/notebooklm-mcp/audit/
193
- ├── audit-2025-11-28.jsonl
194
- ├── audit-2025-11-27.jsonl
195
- └── ...
196
- ```
197
-
198
- ### Environment Variables
199
- ```
200
- NLMCP_AUDIT_ENABLED=true
201
- NLMCP_AUDIT_DIR=~/.local/share/notebooklm-mcp/audit
202
- NLMCP_AUDIT_RETENTION_DAYS=30
203
- ```
204
-
205
- ---
206
-
207
- ## Feature 4: Content Security Policy (Response Validation)
208
-
209
- ### Problem
210
- NotebookLM responses could potentially contain:
211
- - Malicious links
212
- - Prompt injection attempts targeting Claude
213
- - Encoded payloads
214
- - Exfiltration URLs
215
-
216
- ### Solution
217
- Validate and sanitize all responses before returning to the MCP client.
218
-
219
- ### Implementation
220
-
221
- ```
222
- src/utils/response-validator.ts (NEW)
223
- ├── ResponseValidator class
224
- │ ├── validate(response) → { safe: boolean, warnings: string[], sanitized: string }
225
- │ ├── detectMaliciousUrls(text) → URLs to untrusted domains
226
- │ ├── detectPromptInjection(text) → Injection patterns
227
- │ ├── detectEncodedPayloads(text) → Base64, hex, etc.
228
- │ ├── sanitizeResponse(text) → Cleaned text
229
- │ └── getStats() → { blocked, warned, passed }
230
- └── ValidationConfig
231
- ├── blockMaliciousUrls: boolean
232
- ├── blockPromptInjection: boolean
233
- ├── warnOnSuspicious: boolean
234
- └── allowedDomains: string[]
235
- ```
236
-
237
- ### Detection Patterns
238
- ```typescript
239
- // Prompt injection patterns (from MEDUSA AI security scanner)
240
- const PROMPT_INJECTION_PATTERNS = [
241
- /ignore\s+(all\s+)?(previous|prior|above)\s+(instructions?|prompts?)/i,
242
- /disregard\s+(all\s+)?(previous|prior|above)/i,
243
- /you\s+are\s+now\s+in\s+(\w+)\s+mode/i,
244
- /forget\s+(everything|all|your)\s+(you|instructions)/i,
245
- /new\s+instructions?:/i,
246
- /system\s*:\s*/i,
247
- /\[INST\]/i,
248
- /<\|im_start\|>/i,
249
- ];
250
-
251
- // Suspicious URL patterns
252
- const SUSPICIOUS_URL_PATTERNS = [
253
- /bit\.ly|tinyurl|t\.co/i, // URL shorteners
254
- /pastebin|hastebin/i, // Paste services
255
- /file:\/\//i, // File protocol
256
- /javascript:/i, // JS protocol
257
- ];
258
- ```
259
-
260
- ### Files Modified
261
- - `src/tools/handlers.ts` - Validate responses before returning
262
- - `src/session/browser-session.ts` - Optional: validate at capture time
263
-
264
- ### Environment Variables
265
- ```
266
- NLMCP_RESPONSE_VALIDATION=true
267
- NLMCP_BLOCK_PROMPT_INJECTION=true
268
- NLMCP_BLOCK_SUSPICIOUS_URLS=true
269
- ```
270
-
271
- ---
272
-
273
- ## Feature 5: MCP Authentication
274
-
275
- ### Problem
276
- Any process on the local machine can connect to the MCP server via stdio. No authentication means:
277
- - Malicious processes can use your Google session
278
- - No accountability for requests
279
- - Shared machines are especially vulnerable
280
-
281
- ### Solution
282
- Require authentication token for MCP requests.
283
-
284
- ### Implementation Options
285
-
286
- #### Option A: Environment Token (Simple)
287
- ```
288
- NLMCP_AUTH_TOKEN=<random-32-char-token>
289
- ```
290
- Client must include in request metadata.
291
-
292
- #### Option B: Unix Socket Permissions (Linux/Mac)
293
- Instead of stdio, use Unix socket with file permissions.
294
-
295
- #### Option C: Challenge-Response (Most Secure)
296
- 1. Server generates challenge on connect
297
- 2. Client signs challenge with shared secret
298
- 3. Server validates signature
299
-
300
- ### Chosen: Option A (Environment Token) + Option B (Unix Socket)
301
-
302
- ```
303
- src/auth/mcp-auth.ts (NEW)
304
- ├── MCPAuthenticator class
305
- │ ├── validateToken(token) → boolean
306
- │ ├── generateToken() → string (for initial setup)
307
- │ ├── hashToken(token) → string (stored hash, not plaintext)
308
- │ └── isEnabled() → boolean
309
- └── Token storage in encrypted config
310
- ```
311
-
312
- ### Files Modified
313
- - `src/index.ts` - Add auth middleware to MCP server
314
- - `src/config.ts` - Add auth config options
315
-
316
- ### Environment Variables
317
- ```
318
- NLMCP_AUTH_ENABLED=true
319
- NLMCP_AUTH_TOKEN=<token> # Or auto-generated on first run
320
- NLMCP_AUTH_TOKEN_FILE=~/.config/notebooklm-mcp/token
321
- ```
322
-
323
- ### Client Configuration (Claude Code)
324
- ```json
325
- {
326
- "mcpServers": {
327
- "notebooklm": {
328
- "command": "npx",
329
- "args": ["notebooklm-mcp-secure"],
330
- "env": {
331
- "NLMCP_AUTH_TOKEN": "<your-token>"
332
- }
333
- }
334
- }
335
- }
336
- ```
337
-
338
- ---
339
-
340
- ## Implementation Order
341
-
342
- | Phase | Feature | Complexity | Dependencies |
343
- |-------|---------|------------|--------------|
344
- | 1 | Audit Logging | Medium | None |
345
- | 2 | Session Timeout | Low | None |
346
- | 3 | MCP Authentication | Medium | None |
347
- | 4 | Response Validation | Medium | MEDUSA patterns |
348
- | 5 | Encrypted Storage | High | Phase 1 (for key storage) |
349
-
350
- ### Rationale
351
- 1. **Audit Logging first** - Enables monitoring of all subsequent changes
352
- 2. **Session Timeout second** - Quick win, low risk
353
- 3. **MCP Auth third** - Critical for shared environments
354
- 4. **Response Validation fourth** - Leverages MEDUSA patterns
355
- 5. **Encrypted Storage last** - Most complex, benefits from audit logs
356
-
357
- ---
358
-
359
- ## Testing Plan
360
-
361
- ### Unit Tests
362
- ```
363
- tests/
364
- ├── crypto.test.ts
365
- ├── session-timeout.test.ts
366
- ├── audit-logger.test.ts
367
- ├── response-validator.test.ts
368
- └── mcp-auth.test.ts
369
- ```
370
-
371
- ### Integration Tests
372
- - Full flow with all security features enabled
373
- - Timeout behavior under load
374
- - Audit log integrity verification
375
- - Auth token rotation
376
-
377
- ### Security Tests
378
- - Attempt to bypass auth
379
- - Inject malicious responses
380
- - Tamper with audit logs
381
- - Access encrypted data without key
382
-
383
- ---
384
-
385
- ## Rollout
386
-
387
- ### Version 1.3.0-secure.1
388
- - Audit Logging
389
- - Session Timeout
390
-
391
- ### Version 1.3.0-secure.2
392
- - MCP Authentication
393
- - Response Validation
394
-
395
- ### Version 1.3.0-secure.3
396
- - Encrypted Storage
397
- - Full integration testing
398
-
399
- ---
400
-
401
- ## Success Metrics
402
-
403
- | Feature | Metric |
404
- |---------|--------|
405
- | Encrypted Storage | 0 plaintext credentials on disk |
406
- | Session Timeout | 100% sessions expire correctly |
407
- | Audit Logging | All events logged with <1ms overhead |
408
- | Response Validation | 0 prompt injections passed through |
409
- | MCP Auth | 0 unauthorized requests processed |
410
-
411
- ---
412
-
413
- ## Appendix: File Structure After Implementation
414
-
415
- ```
416
- src/
417
- ├── auth/
418
- │ ├── auth-manager.ts (modified)
419
- │ └── mcp-auth.ts (NEW)
420
- ├── session/
421
- │ ├── browser-session.ts (modified)
422
- │ ├── session-manager.ts (modified)
423
- │ └── session-timeout.ts (NEW)
424
- ├── utils/
425
- │ ├── security.ts (existing)
426
- │ ├── crypto.ts (NEW)
427
- │ ├── audit-logger.ts (NEW)
428
- │ └── response-validator.ts (NEW)
429
- ├── config.ts (modified)
430
- └── index.ts (modified)
431
- ```
432
-
433
- ---
434
-
435
- **Document Version**: 1.0
436
- **Created**: 2025-11-28
437
- **Author**: Pantheon Security