@pan-sec/notebooklm-mcp 2026.3.3 → 2026.4.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.
- package/dist/auth/auth-manager.d.ts +0 -1
- package/dist/auth/auth-manager.js +0 -1
- package/dist/auth/mcp-auth.d.ts +0 -1
- package/dist/auth/mcp-auth.js +0 -1
- package/dist/compliance/alert-manager.d.ts +6 -2
- package/dist/compliance/alert-manager.js +40 -10
- package/dist/compliance/breach-detection.d.ts +0 -1
- package/dist/compliance/breach-detection.js +0 -1
- package/dist/compliance/change-log.d.ts +13 -1
- package/dist/compliance/change-log.js +82 -16
- package/dist/compliance/compliance-logger.d.ts +29 -3
- package/dist/compliance/compliance-logger.js +90 -27
- package/dist/compliance/compliance-tools.d.ts +0 -1
- package/dist/compliance/compliance-tools.js +0 -1
- package/dist/compliance/consent-manager.d.ts +0 -1
- package/dist/compliance/consent-manager.js +0 -1
- package/dist/compliance/dashboard.d.ts +4 -3
- package/dist/compliance/dashboard.js +11 -8
- package/dist/compliance/data-classification.d.ts +0 -1
- package/dist/compliance/data-classification.js +0 -1
- package/dist/compliance/data-erasure.d.ts +0 -1
- package/dist/compliance/data-erasure.js +0 -1
- package/dist/compliance/data-export.d.ts +0 -1
- package/dist/compliance/data-export.js +0 -1
- package/dist/compliance/data-inventory.d.ts +0 -1
- package/dist/compliance/data-inventory.js +0 -1
- package/dist/compliance/dsar-handler.d.ts +0 -1
- package/dist/compliance/dsar-handler.js +0 -1
- package/dist/compliance/evidence-collector.d.ts +0 -1
- package/dist/compliance/evidence-collector.js +4 -2
- package/dist/compliance/health-monitor.d.ts +0 -1
- package/dist/compliance/health-monitor.js +0 -1
- package/dist/compliance/incident-manager.d.ts +0 -1
- package/dist/compliance/incident-manager.js +0 -1
- package/dist/compliance/index.d.ts +0 -1
- package/dist/compliance/index.js +0 -1
- package/dist/compliance/policy-docs.d.ts +0 -1
- package/dist/compliance/policy-docs.js +0 -1
- package/dist/compliance/privacy-notice-text.d.ts +0 -1
- package/dist/compliance/privacy-notice-text.js +0 -1
- package/dist/compliance/privacy-notice.d.ts +0 -1
- package/dist/compliance/privacy-notice.js +0 -1
- package/dist/compliance/report-generator.d.ts +7 -1
- package/dist/compliance/report-generator.js +116 -34
- package/dist/compliance/retention-engine.d.ts +0 -1
- package/dist/compliance/retention-engine.js +0 -1
- package/dist/compliance/siem-exporter.d.ts +26 -2
- package/dist/compliance/siem-exporter.js +89 -24
- package/dist/compliance/types.d.ts +0 -1
- package/dist/compliance/types.js +0 -1
- package/dist/config.d.ts +0 -1
- package/dist/config.js +2 -3
- package/dist/errors.d.ts +0 -1
- package/dist/errors.js +0 -1
- package/dist/events/event-emitter.d.ts +9 -1
- package/dist/events/event-emitter.js +47 -8
- package/dist/events/event-types.d.ts +0 -1
- package/dist/events/event-types.js +8 -2
- package/dist/gemini/gemini-client.d.ts +0 -1
- package/dist/gemini/gemini-client.js +237 -45
- package/dist/gemini/index.d.ts +0 -1
- package/dist/gemini/index.js +0 -1
- package/dist/gemini/pdf-chunker.d.ts +0 -1
- package/dist/gemini/pdf-chunker.js +60 -35
- package/dist/gemini/types.d.ts +0 -1
- package/dist/gemini/types.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +60 -7
- package/dist/library/notebook-library.d.ts +30 -2
- package/dist/library/notebook-library.js +345 -85
- package/dist/library/types.d.ts +0 -1
- package/dist/library/types.js +0 -1
- package/dist/logging/index.d.ts +0 -1
- package/dist/logging/index.js +0 -1
- package/dist/logging/query-logger.d.ts +20 -1
- package/dist/logging/query-logger.js +104 -21
- package/dist/notebook-creation/audio-manager.d.ts +0 -1
- package/dist/notebook-creation/audio-manager.js +111 -20
- package/dist/notebook-creation/browser-options.d.ts +0 -1
- package/dist/notebook-creation/browser-options.js +0 -1
- package/dist/notebook-creation/data-table-manager.d.ts +7 -1
- package/dist/notebook-creation/data-table-manager.js +59 -3
- package/dist/notebook-creation/dom-scripts.d.ts +0 -1
- package/dist/notebook-creation/dom-scripts.js +0 -1
- package/dist/notebook-creation/errors.d.ts +0 -1
- package/dist/notebook-creation/errors.js +0 -1
- package/dist/notebook-creation/index.d.ts +0 -1
- package/dist/notebook-creation/index.js +0 -1
- package/dist/notebook-creation/notebook-creator.d.ts +9 -1
- package/dist/notebook-creation/notebook-creator.js +50 -1
- package/dist/notebook-creation/notebook-nav.d.ts +0 -1
- package/dist/notebook-creation/notebook-nav.js +21 -6
- package/dist/notebook-creation/notebook-sync.d.ts +14 -2
- package/dist/notebook-creation/notebook-sync.js +124 -35
- package/dist/notebook-creation/selectors.d.ts +0 -1
- package/dist/notebook-creation/selectors.js +6 -4
- package/dist/notebook-creation/source-manager.d.ts +29 -2
- package/dist/notebook-creation/source-manager.js +0 -0
- package/dist/notebook-creation/types.d.ts +0 -1
- package/dist/notebook-creation/types.js +0 -1
- package/dist/notebook-creation/video-manager.d.ts +0 -1
- package/dist/notebook-creation/video-manager.js +91 -15
- package/dist/observability/metrics.d.ts +0 -1
- package/dist/observability/metrics.js +0 -1
- package/dist/quota/index.d.ts +0 -1
- package/dist/quota/index.js +0 -1
- package/dist/quota/quota-manager.d.ts +59 -4
- package/dist/quota/quota-manager.js +195 -46
- package/dist/resources/resource-handlers.d.ts +0 -1
- package/dist/resources/resource-handlers.js +33 -3
- package/dist/session/browser-session.d.ts +0 -1
- package/dist/session/browser-session.js +0 -1
- package/dist/session/session-manager.d.ts +0 -1
- package/dist/session/session-manager.js +0 -1
- package/dist/session/session-timeout.d.ts +0 -1
- package/dist/session/session-timeout.js +0 -1
- package/dist/session/shared-context-manager.d.ts +0 -1
- package/dist/session/shared-context-manager.js +0 -1
- package/dist/tools/annotations.d.ts +0 -1
- package/dist/tools/annotations.js +0 -1
- package/dist/tools/definitions/ask-question.d.ts +6 -3
- package/dist/tools/definitions/ask-question.js +12 -8
- package/dist/tools/definitions/chat-history.d.ts +0 -1
- package/dist/tools/definitions/chat-history.js +1 -1
- package/dist/tools/definitions/data-tables.d.ts +0 -1
- package/dist/tools/definitions/data-tables.js +4 -1
- package/dist/tools/definitions/gemini.d.ts +0 -1
- package/dist/tools/definitions/gemini.js +14 -7
- package/dist/tools/definitions/notebook-management.d.ts +0 -1
- package/dist/tools/definitions/notebook-management.js +7 -2
- package/dist/tools/definitions/query-history.d.ts +0 -1
- package/dist/tools/definitions/query-history.js +0 -1
- package/dist/tools/definitions/session-management.d.ts +0 -1
- package/dist/tools/definitions/session-management.js +0 -1
- package/dist/tools/definitions/system.d.ts +0 -1
- package/dist/tools/definitions/system.js +32 -12
- package/dist/tools/definitions/video.d.ts +0 -1
- package/dist/tools/definitions/video.js +6 -3
- package/dist/tools/definitions.d.ts +0 -1
- package/dist/tools/definitions.js +0 -1
- package/dist/tools/handlers/ask-question.d.ts +0 -1
- package/dist/tools/handlers/ask-question.js +47 -18
- package/dist/tools/handlers/audio-video.d.ts +0 -1
- package/dist/tools/handlers/audio-video.js +0 -1
- package/dist/tools/handlers/auth.d.ts +0 -1
- package/dist/tools/handlers/auth.js +0 -1
- package/dist/tools/handlers/error-utils.d.ts +0 -1
- package/dist/tools/handlers/error-utils.js +0 -1
- package/dist/tools/handlers/gemini.d.ts +0 -1
- package/dist/tools/handlers/gemini.js +0 -1
- package/dist/tools/handlers/index.d.ts +0 -1
- package/dist/tools/handlers/index.js +0 -1
- package/dist/tools/handlers/notebook-creation.d.ts +0 -1
- package/dist/tools/handlers/notebook-creation.js +16 -1
- package/dist/tools/handlers/notebook-management.d.ts +0 -1
- package/dist/tools/handlers/notebook-management.js +7 -2
- package/dist/tools/handlers/session-management.d.ts +0 -1
- package/dist/tools/handlers/session-management.js +0 -1
- package/dist/tools/handlers/system.d.ts +0 -1
- package/dist/tools/handlers/system.js +0 -1
- package/dist/tools/handlers/types.d.ts +0 -1
- package/dist/tools/handlers/types.js +0 -1
- package/dist/tools/handlers/webhooks.d.ts +0 -1
- package/dist/tools/handlers/webhooks.js +0 -1
- package/dist/tools/icons.d.ts +0 -1
- package/dist/tools/icons.js +0 -1
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/index.js +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -1
- package/dist/utils/audit-logger.d.ts +11 -1
- package/dist/utils/audit-logger.js +189 -21
- package/dist/utils/cleanup-manager.d.ts +0 -1
- package/dist/utils/cleanup-manager.js +0 -1
- package/dist/utils/cli-handler.d.ts +0 -1
- package/dist/utils/cli-handler.js +0 -1
- package/dist/utils/crypto.d.ts +18 -9
- package/dist/utils/crypto.js +93 -28
- package/dist/utils/file-lock.d.ts +15 -1
- package/dist/utils/file-lock.js +67 -59
- package/dist/utils/file-permissions.d.ts +0 -1
- package/dist/utils/file-permissions.js +35 -7
- package/dist/utils/logger.d.ts +0 -1
- package/dist/utils/logger.js +0 -1
- package/dist/utils/page-utils.d.ts +0 -1
- package/dist/utils/page-utils.js +32 -28
- package/dist/utils/response-validator.d.ts +0 -1
- package/dist/utils/response-validator.js +18 -15
- package/dist/utils/secrets-scanner.d.ts +0 -1
- package/dist/utils/secrets-scanner.js +32 -7
- package/dist/utils/secure-memory.d.ts +34 -16
- package/dist/utils/secure-memory.js +40 -25
- package/dist/utils/security.d.ts +0 -1
- package/dist/utils/security.js +66 -39
- package/dist/utils/settings-manager.d.ts +9 -1
- package/dist/utils/settings-manager.js +45 -2
- package/dist/utils/stealth-utils.d.ts +0 -1
- package/dist/utils/stealth-utils.js +11 -9
- package/dist/webhooks/index.d.ts +0 -1
- package/dist/webhooks/index.js +0 -1
- package/dist/webhooks/types.d.ts +0 -1
- package/dist/webhooks/types.js +0 -1
- package/dist/webhooks/webhook-dispatcher.d.ts +0 -1
- package/dist/webhooks/webhook-dispatcher.js +0 -1
- package/package.json +5 -4
- package/dist/auth/auth-manager.d.ts.map +0 -1
- package/dist/auth/auth-manager.js.map +0 -1
- package/dist/auth/mcp-auth.d.ts.map +0 -1
- package/dist/auth/mcp-auth.js.map +0 -1
- package/dist/compliance/alert-manager.d.ts.map +0 -1
- package/dist/compliance/alert-manager.js.map +0 -1
- package/dist/compliance/breach-detection.d.ts.map +0 -1
- package/dist/compliance/breach-detection.js.map +0 -1
- package/dist/compliance/change-log.d.ts.map +0 -1
- package/dist/compliance/change-log.js.map +0 -1
- package/dist/compliance/compliance-logger.d.ts.map +0 -1
- package/dist/compliance/compliance-logger.js.map +0 -1
- package/dist/compliance/compliance-tools.d.ts.map +0 -1
- package/dist/compliance/compliance-tools.js.map +0 -1
- package/dist/compliance/consent-manager.d.ts.map +0 -1
- package/dist/compliance/consent-manager.js.map +0 -1
- package/dist/compliance/dashboard.d.ts.map +0 -1
- package/dist/compliance/dashboard.js.map +0 -1
- package/dist/compliance/data-classification.d.ts.map +0 -1
- package/dist/compliance/data-classification.js.map +0 -1
- package/dist/compliance/data-erasure.d.ts.map +0 -1
- package/dist/compliance/data-erasure.js.map +0 -1
- package/dist/compliance/data-export.d.ts.map +0 -1
- package/dist/compliance/data-export.js.map +0 -1
- package/dist/compliance/data-inventory.d.ts.map +0 -1
- package/dist/compliance/data-inventory.js.map +0 -1
- package/dist/compliance/dsar-handler.d.ts.map +0 -1
- package/dist/compliance/dsar-handler.js.map +0 -1
- package/dist/compliance/evidence-collector.d.ts.map +0 -1
- package/dist/compliance/evidence-collector.js.map +0 -1
- package/dist/compliance/health-monitor.d.ts.map +0 -1
- package/dist/compliance/health-monitor.js.map +0 -1
- package/dist/compliance/incident-manager.d.ts.map +0 -1
- package/dist/compliance/incident-manager.js.map +0 -1
- package/dist/compliance/index.d.ts.map +0 -1
- package/dist/compliance/index.js.map +0 -1
- package/dist/compliance/policy-docs.d.ts.map +0 -1
- package/dist/compliance/policy-docs.js.map +0 -1
- package/dist/compliance/privacy-notice-text.d.ts.map +0 -1
- package/dist/compliance/privacy-notice-text.js.map +0 -1
- package/dist/compliance/privacy-notice.d.ts.map +0 -1
- package/dist/compliance/privacy-notice.js.map +0 -1
- package/dist/compliance/report-generator.d.ts.map +0 -1
- package/dist/compliance/report-generator.js.map +0 -1
- package/dist/compliance/retention-engine.d.ts.map +0 -1
- package/dist/compliance/retention-engine.js.map +0 -1
- package/dist/compliance/siem-exporter.d.ts.map +0 -1
- package/dist/compliance/siem-exporter.js.map +0 -1
- package/dist/compliance/types.d.ts.map +0 -1
- package/dist/compliance/types.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/events/event-emitter.d.ts.map +0 -1
- package/dist/events/event-emitter.js.map +0 -1
- package/dist/events/event-types.d.ts.map +0 -1
- package/dist/events/event-types.js.map +0 -1
- package/dist/gemini/gemini-client.d.ts.map +0 -1
- package/dist/gemini/gemini-client.js.map +0 -1
- package/dist/gemini/index.d.ts.map +0 -1
- package/dist/gemini/index.js.map +0 -1
- package/dist/gemini/pdf-chunker.d.ts.map +0 -1
- package/dist/gemini/pdf-chunker.js.map +0 -1
- package/dist/gemini/types.d.ts.map +0 -1
- package/dist/gemini/types.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/library/notebook-library.d.ts.map +0 -1
- package/dist/library/notebook-library.js.map +0 -1
- package/dist/library/types.d.ts.map +0 -1
- package/dist/library/types.js.map +0 -1
- package/dist/logging/index.d.ts.map +0 -1
- package/dist/logging/index.js.map +0 -1
- package/dist/logging/query-logger.d.ts.map +0 -1
- package/dist/logging/query-logger.js.map +0 -1
- package/dist/notebook-creation/audio-manager.d.ts.map +0 -1
- package/dist/notebook-creation/audio-manager.js.map +0 -1
- package/dist/notebook-creation/browser-options.d.ts.map +0 -1
- package/dist/notebook-creation/browser-options.js.map +0 -1
- package/dist/notebook-creation/data-table-manager.d.ts.map +0 -1
- package/dist/notebook-creation/data-table-manager.js.map +0 -1
- package/dist/notebook-creation/discover-creation-flow.d.ts +0 -2
- package/dist/notebook-creation/discover-creation-flow.d.ts.map +0 -1
- package/dist/notebook-creation/discover-creation-flow.js +0 -177
- package/dist/notebook-creation/discover-creation-flow.js.map +0 -1
- package/dist/notebook-creation/discover-quota.d.ts +0 -2
- package/dist/notebook-creation/discover-quota.d.ts.map +0 -1
- package/dist/notebook-creation/discover-quota.js +0 -194
- package/dist/notebook-creation/discover-quota.js.map +0 -1
- package/dist/notebook-creation/discover-source-dialog.d.ts +0 -8
- package/dist/notebook-creation/discover-source-dialog.d.ts.map +0 -1
- package/dist/notebook-creation/discover-source-dialog.js +0 -134
- package/dist/notebook-creation/discover-source-dialog.js.map +0 -1
- package/dist/notebook-creation/discover-sources.d.ts +0 -8
- package/dist/notebook-creation/discover-sources.d.ts.map +0 -1
- package/dist/notebook-creation/discover-sources.js +0 -272
- package/dist/notebook-creation/discover-sources.js.map +0 -1
- package/dist/notebook-creation/discover-text-input.d.ts +0 -7
- package/dist/notebook-creation/discover-text-input.d.ts.map +0 -1
- package/dist/notebook-creation/discover-text-input.js +0 -135
- package/dist/notebook-creation/discover-text-input.js.map +0 -1
- package/dist/notebook-creation/dom-scripts.d.ts.map +0 -1
- package/dist/notebook-creation/dom-scripts.js.map +0 -1
- package/dist/notebook-creation/errors.d.ts.map +0 -1
- package/dist/notebook-creation/errors.js.map +0 -1
- package/dist/notebook-creation/index.d.ts.map +0 -1
- package/dist/notebook-creation/index.js.map +0 -1
- package/dist/notebook-creation/notebook-creator.d.ts.map +0 -1
- package/dist/notebook-creation/notebook-creator.js.map +0 -1
- package/dist/notebook-creation/notebook-nav.d.ts.map +0 -1
- package/dist/notebook-creation/notebook-nav.js.map +0 -1
- package/dist/notebook-creation/notebook-sync.d.ts.map +0 -1
- package/dist/notebook-creation/notebook-sync.js.map +0 -1
- package/dist/notebook-creation/run-discovery.d.ts +0 -11
- package/dist/notebook-creation/run-discovery.d.ts.map +0 -1
- package/dist/notebook-creation/run-discovery.js +0 -151
- package/dist/notebook-creation/run-discovery.js.map +0 -1
- package/dist/notebook-creation/selector-discovery.d.ts +0 -65
- package/dist/notebook-creation/selector-discovery.d.ts.map +0 -1
- package/dist/notebook-creation/selector-discovery.js +0 -414
- package/dist/notebook-creation/selector-discovery.js.map +0 -1
- package/dist/notebook-creation/selectors.d.ts.map +0 -1
- package/dist/notebook-creation/selectors.js.map +0 -1
- package/dist/notebook-creation/selectors.ts +0 -112
- package/dist/notebook-creation/source-manager.d.ts.map +0 -1
- package/dist/notebook-creation/source-manager.js.map +0 -1
- package/dist/notebook-creation/test-create.d.ts +0 -8
- package/dist/notebook-creation/test-create.d.ts.map +0 -1
- package/dist/notebook-creation/test-create.js +0 -72
- package/dist/notebook-creation/test-create.js.map +0 -1
- package/dist/notebook-creation/types.d.ts.map +0 -1
- package/dist/notebook-creation/types.js.map +0 -1
- package/dist/notebook-creation/video-manager.d.ts.map +0 -1
- package/dist/notebook-creation/video-manager.js.map +0 -1
- package/dist/observability/metrics.d.ts.map +0 -1
- package/dist/observability/metrics.js.map +0 -1
- package/dist/quota/index.d.ts.map +0 -1
- package/dist/quota/index.js.map +0 -1
- package/dist/quota/quota-manager.d.ts.map +0 -1
- package/dist/quota/quota-manager.js.map +0 -1
- package/dist/resources/resource-handlers.d.ts.map +0 -1
- package/dist/resources/resource-handlers.js.map +0 -1
- package/dist/session/browser-session.d.ts.map +0 -1
- package/dist/session/browser-session.js.map +0 -1
- package/dist/session/session-manager.d.ts.map +0 -1
- package/dist/session/session-manager.js.map +0 -1
- package/dist/session/session-timeout.d.ts.map +0 -1
- package/dist/session/session-timeout.js.map +0 -1
- package/dist/session/shared-context-manager.d.ts.map +0 -1
- package/dist/session/shared-context-manager.js.map +0 -1
- package/dist/tools/annotations.d.ts.map +0 -1
- package/dist/tools/annotations.js.map +0 -1
- package/dist/tools/definitions/ask-question.d.ts.map +0 -1
- package/dist/tools/definitions/ask-question.js.map +0 -1
- package/dist/tools/definitions/chat-history.d.ts.map +0 -1
- package/dist/tools/definitions/chat-history.js.map +0 -1
- package/dist/tools/definitions/data-tables.d.ts.map +0 -1
- package/dist/tools/definitions/data-tables.js.map +0 -1
- package/dist/tools/definitions/gemini.d.ts.map +0 -1
- package/dist/tools/definitions/gemini.js.map +0 -1
- package/dist/tools/definitions/notebook-management.d.ts.map +0 -1
- package/dist/tools/definitions/notebook-management.js.map +0 -1
- package/dist/tools/definitions/query-history.d.ts.map +0 -1
- package/dist/tools/definitions/query-history.js.map +0 -1
- package/dist/tools/definitions/session-management.d.ts.map +0 -1
- package/dist/tools/definitions/session-management.js.map +0 -1
- package/dist/tools/definitions/system.d.ts.map +0 -1
- package/dist/tools/definitions/system.js.map +0 -1
- package/dist/tools/definitions/video.d.ts.map +0 -1
- package/dist/tools/definitions/video.js.map +0 -1
- package/dist/tools/definitions.d.ts.map +0 -1
- package/dist/tools/definitions.js.map +0 -1
- package/dist/tools/handlers/ask-question.d.ts.map +0 -1
- package/dist/tools/handlers/ask-question.js.map +0 -1
- package/dist/tools/handlers/audio-video.d.ts.map +0 -1
- package/dist/tools/handlers/audio-video.js.map +0 -1
- package/dist/tools/handlers/auth.d.ts.map +0 -1
- package/dist/tools/handlers/auth.js.map +0 -1
- package/dist/tools/handlers/error-utils.d.ts.map +0 -1
- package/dist/tools/handlers/error-utils.js.map +0 -1
- package/dist/tools/handlers/gemini.d.ts.map +0 -1
- package/dist/tools/handlers/gemini.js.map +0 -1
- package/dist/tools/handlers/index.d.ts.map +0 -1
- package/dist/tools/handlers/index.js.map +0 -1
- package/dist/tools/handlers/notebook-creation.d.ts.map +0 -1
- package/dist/tools/handlers/notebook-creation.js.map +0 -1
- package/dist/tools/handlers/notebook-management.d.ts.map +0 -1
- package/dist/tools/handlers/notebook-management.js.map +0 -1
- package/dist/tools/handlers/session-management.d.ts.map +0 -1
- package/dist/tools/handlers/session-management.js.map +0 -1
- package/dist/tools/handlers/system.d.ts.map +0 -1
- package/dist/tools/handlers/system.js.map +0 -1
- package/dist/tools/handlers/types.d.ts.map +0 -1
- package/dist/tools/handlers/types.js.map +0 -1
- package/dist/tools/handlers/webhooks.d.ts.map +0 -1
- package/dist/tools/handlers/webhooks.js.map +0 -1
- package/dist/tools/handlers.d.ts +0 -666
- package/dist/tools/handlers.d.ts.map +0 -1
- package/dist/tools/handlers.js +0 -2929
- package/dist/tools/handlers.js.map +0 -1
- package/dist/tools/icons.d.ts.map +0 -1
- package/dist/tools/icons.js.map +0 -1
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils/audit-logger.d.ts.map +0 -1
- package/dist/utils/audit-logger.js.map +0 -1
- package/dist/utils/cert-pinning.d.ts +0 -97
- package/dist/utils/cert-pinning.d.ts.map +0 -1
- package/dist/utils/cert-pinning.js +0 -328
- package/dist/utils/cert-pinning.js.map +0 -1
- package/dist/utils/cleanup-manager.d.ts.map +0 -1
- package/dist/utils/cleanup-manager.js.map +0 -1
- package/dist/utils/cli-handler.d.ts.map +0 -1
- package/dist/utils/cli-handler.js.map +0 -1
- package/dist/utils/crypto.d.ts.map +0 -1
- package/dist/utils/crypto.js.map +0 -1
- package/dist/utils/file-lock.d.ts.map +0 -1
- package/dist/utils/file-lock.js.map +0 -1
- package/dist/utils/file-permissions.d.ts.map +0 -1
- package/dist/utils/file-permissions.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/page-utils.d.ts.map +0 -1
- package/dist/utils/page-utils.js.map +0 -1
- package/dist/utils/response-validator.d.ts.map +0 -1
- package/dist/utils/response-validator.js.map +0 -1
- package/dist/utils/secrets-scanner.d.ts.map +0 -1
- package/dist/utils/secrets-scanner.js.map +0 -1
- package/dist/utils/secure-memory.d.ts.map +0 -1
- package/dist/utils/secure-memory.js.map +0 -1
- package/dist/utils/security.d.ts.map +0 -1
- package/dist/utils/security.js.map +0 -1
- package/dist/utils/settings-manager.d.ts.map +0 -1
- package/dist/utils/settings-manager.js.map +0 -1
- package/dist/utils/stealth-utils.d.ts.map +0 -1
- package/dist/utils/stealth-utils.js.map +0 -1
- package/dist/utils/tool-validation.d.ts +0 -93
- package/dist/utils/tool-validation.d.ts.map +0 -1
- package/dist/utils/tool-validation.js +0 -277
- package/dist/utils/tool-validation.js.map +0 -1
- package/dist/webhooks/index.d.ts.map +0 -1
- package/dist/webhooks/index.js.map +0 -1
- package/dist/webhooks/types.d.ts.map +0 -1
- package/dist/webhooks/types.js.map +0 -1
- package/dist/webhooks/webhook-dispatcher.d.ts.map +0 -1
- package/dist/webhooks/webhook-dispatcher.js.map +0 -1
- package/docs/COMPLIANCE-SPEC.md +0 -1452
- package/docs/MCP-DIRECTORY-LISTINGS.md +0 -91
- package/docs/SECURITY-FORK-OPPORTUNITIES.md +0 -79
- package/docs/SECURITY_IMPLEMENTATION_PLAN.md +0 -437
- package/docs/archive/ISSUES-legacy-2026-04-24.md +0 -644
- package/docs/configuration.md +0 -94
- package/docs/dependency-risk.md +0 -25
- package/docs/improvement-sprint-2026.2.10.md +0 -210
- package/docs/testing-runbook.md +0 -166
- package/docs/tools.md +0 -34
- package/docs/troubleshooting.md +0 -59
- package/docs/usage-guide.md +0 -246
|
@@ -184,4 +184,3 @@ export declare function verifyEvidence(evidencePackage: EvidencePackage): {
|
|
|
184
184
|
* List saved evidence packages
|
|
185
185
|
*/
|
|
186
186
|
export declare function listEvidencePackages(): ReturnType<EvidenceCollector["listPackages"]>;
|
|
187
|
-
//# sourceMappingURL=evidence-collector.d.ts.map
|
|
@@ -189,7 +189,10 @@ export class EvidenceCollector {
|
|
|
189
189
|
legal_basis: c.legal_basis,
|
|
190
190
|
granted_at: c.granted_at,
|
|
191
191
|
expires_at: c.expires_at,
|
|
192
|
-
|
|
192
|
+
// Validity is derived from existing fields: granted (record exists),
|
|
193
|
+
// not revoked, and not past its optional expiry.
|
|
194
|
+
is_valid: !c.revoked &&
|
|
195
|
+
(!c.expires_at || new Date(c.expires_at) > new Date()),
|
|
193
196
|
revoked: c.revoked,
|
|
194
197
|
})),
|
|
195
198
|
};
|
|
@@ -657,4 +660,3 @@ export function verifyEvidence(evidencePackage) {
|
|
|
657
660
|
export function listEvidencePackages() {
|
|
658
661
|
return getEvidenceCollector().listPackages();
|
|
659
662
|
}
|
|
660
|
-
//# sourceMappingURL=evidence-collector.js.map
|
|
@@ -128,4 +128,3 @@ export declare function updateIncidentStatus(incidentId: string, status: Inciden
|
|
|
128
128
|
* Get incident statistics
|
|
129
129
|
*/
|
|
130
130
|
export declare function getIncidentStatistics(): Promise<ReturnType<IncidentManager["getStatistics"]>>;
|
|
131
|
-
//# sourceMappingURL=incident-manager.d.ts.map
|
|
@@ -29,4 +29,3 @@ export type { ReportType, ReportFormat, GeneratedReport, ReportOptions } from ".
|
|
|
29
29
|
export { EvidenceCollector, getEvidenceCollector, collectEvidence, collectAndSaveEvidence, collectRegulationEvidence, verifyEvidence, listEvidencePackages, } from "./evidence-collector.js";
|
|
30
30
|
export type { EvidenceType, EvidenceItem, EvidencePackage, CollectionOptions } from "./evidence-collector.js";
|
|
31
31
|
export { getComplianceTools, handleComplianceToolCall, } from "./compliance-tools.js";
|
|
32
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/compliance/index.js
CHANGED
|
@@ -32,4 +32,3 @@ export { ComplianceDashboard, getComplianceDashboard, generateDashboard, getComp
|
|
|
32
32
|
export { ReportGenerator, getReportGenerator, generateReport, generateAndSaveReport, listReports, } from "./report-generator.js";
|
|
33
33
|
export { EvidenceCollector, getEvidenceCollector, collectEvidence, collectAndSaveEvidence, collectRegulationEvidence, verifyEvidence, listEvidencePackages, } from "./evidence-collector.js";
|
|
34
34
|
export { getComplianceTools, handleComplianceToolCall, } from "./compliance-tools.js";
|
|
35
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -115,6 +115,13 @@ export declare class ReportGenerator {
|
|
|
115
115
|
* Convert to CSV format (flattened)
|
|
116
116
|
*/
|
|
117
117
|
private toCSV;
|
|
118
|
+
/**
|
|
119
|
+
* Quote a CSV cell and neutralize formula injection.
|
|
120
|
+
* If the value begins with =, +, -, @, tab, or CR it is prefixed with a
|
|
121
|
+
* single quote so spreadsheet apps (Excel/Sheets) treat it as text rather
|
|
122
|
+
* than a formula. Embedded double-quotes are doubled per RFC 4180.
|
|
123
|
+
*/
|
|
124
|
+
private csvSafeCell;
|
|
118
125
|
/**
|
|
119
126
|
* Flatten nested object
|
|
120
127
|
*/
|
|
@@ -165,4 +172,3 @@ export declare function generateAndSaveReport(reportType: ReportType, options?:
|
|
|
165
172
|
*/
|
|
166
173
|
export declare function listReports(): ReturnType<ReportGenerator["listGeneratedReports"]>;
|
|
167
174
|
export {};
|
|
168
|
-
//# sourceMappingURL=report-generator.d.ts.map
|
|
@@ -149,10 +149,42 @@ export class ReportGenerator {
|
|
|
149
149
|
const dataInventory = getDataInventory();
|
|
150
150
|
const dsarHandler = getDSARHandler();
|
|
151
151
|
const retentionEngine = getRetentionEngine();
|
|
152
|
+
const dashboard = getComplianceDashboard();
|
|
152
153
|
const consents = await consentManager.getActiveConsents();
|
|
153
154
|
const inventory = await dataInventory.getAll();
|
|
154
155
|
const dsarSummary = await dsarHandler.getStatistics();
|
|
155
156
|
const retentionStatus = await retentionEngine.getStatus();
|
|
157
|
+
const dashboardData = await dashboard.generateDashboard();
|
|
158
|
+
// Derive per-consent validity from real fields (mirrors evidence-collector):
|
|
159
|
+
// a consent is valid only if it is not revoked and not past its optional expiry.
|
|
160
|
+
const now = new Date();
|
|
161
|
+
const consentRows = consents.map((c) => {
|
|
162
|
+
const valid = !c.revoked && (!c.expires_at || new Date(c.expires_at) > now);
|
|
163
|
+
return {
|
|
164
|
+
purpose: c.purposes.join(", "),
|
|
165
|
+
legal_basis: c.legal_basis,
|
|
166
|
+
granted: c.granted_at,
|
|
167
|
+
valid,
|
|
168
|
+
};
|
|
169
|
+
});
|
|
170
|
+
const validConsents = consentRows.filter(c => c.valid).length;
|
|
171
|
+
// Build compliance verdict from real signals rather than hardcoding "compliant".
|
|
172
|
+
const gaps = [];
|
|
173
|
+
const recommendations = [];
|
|
174
|
+
const invalidConsents = consents.length - validConsents;
|
|
175
|
+
if (invalidConsents > 0) {
|
|
176
|
+
gaps.push(`${invalidConsents} consent record(s) are revoked or expired (Article 6 legal basis).`);
|
|
177
|
+
recommendations.push("Re-obtain or retire invalid consent records.");
|
|
178
|
+
}
|
|
179
|
+
if (dsarSummary.pending_requests > 0) {
|
|
180
|
+
gaps.push(`${dsarSummary.pending_requests} data subject request(s) pending (Articles 15/17).`);
|
|
181
|
+
recommendations.push("Process pending DSARs within the 30-day deadline.");
|
|
182
|
+
}
|
|
183
|
+
if (dashboardData.gdpr.status === "non_compliant") {
|
|
184
|
+
gaps.push("GDPR dashboard status is non-compliant.");
|
|
185
|
+
}
|
|
186
|
+
// Compliant only when the dashboard agrees and no concrete gaps were found.
|
|
187
|
+
const gdprCompliant = dashboardData.gdpr.status === "compliant" && gaps.length === 0;
|
|
156
188
|
const report = {
|
|
157
189
|
title: "GDPR Compliance Audit Report",
|
|
158
190
|
regulation: "General Data Protection Regulation (EU) 2016/679",
|
|
@@ -165,13 +197,8 @@ export class ReportGenerator {
|
|
|
165
197
|
article_6_legal_basis: {
|
|
166
198
|
description: "Lawfulness of Processing",
|
|
167
199
|
consent_records: consents.length,
|
|
168
|
-
valid_consents:
|
|
169
|
-
consents:
|
|
170
|
-
purpose: c.purposes.join(", "),
|
|
171
|
-
legal_basis: c.legal_basis,
|
|
172
|
-
granted: c.granted_at,
|
|
173
|
-
valid: true,
|
|
174
|
-
})),
|
|
200
|
+
valid_consents: validConsents, // Derived: not revoked and not expired
|
|
201
|
+
consents: consentRows,
|
|
175
202
|
},
|
|
176
203
|
article_15_17_access_erasure: {
|
|
177
204
|
description: "Data Subject Access and Erasure Rights",
|
|
@@ -190,9 +217,10 @@ export class ReportGenerator {
|
|
|
190
217
|
status: retentionStatus,
|
|
191
218
|
},
|
|
192
219
|
compliance_status: {
|
|
193
|
-
compliant:
|
|
194
|
-
|
|
195
|
-
|
|
220
|
+
compliant: gdprCompliant,
|
|
221
|
+
status: dashboardData.gdpr.status,
|
|
222
|
+
gaps,
|
|
223
|
+
recommendations,
|
|
196
224
|
},
|
|
197
225
|
};
|
|
198
226
|
return this.formatOutput(report, format);
|
|
@@ -228,7 +256,10 @@ export class ReportGenerator {
|
|
|
228
256
|
principle: "CC7 - System Operations",
|
|
229
257
|
controls: {
|
|
230
258
|
health_monitoring: true,
|
|
259
|
+
// Availability % is not measured (no downtime accounting); expose the
|
|
260
|
+
// raw value (null) and the measurement flag rather than a fake figure.
|
|
231
261
|
uptime_percentage: dashboardData.soc2.availability.uptime_percentage,
|
|
262
|
+
uptime_percentage_measured: dashboardData.soc2.availability.uptime_percentage_measured,
|
|
232
263
|
status: dashboardData.health.status,
|
|
233
264
|
},
|
|
234
265
|
status: dashboardData.health.status === "healthy" ? "Met" : "Partially Met",
|
|
@@ -286,11 +317,29 @@ export class ReportGenerator {
|
|
|
286
317
|
const complianceLogger = getComplianceLogger();
|
|
287
318
|
const policyManager = getPolicyDocManager();
|
|
288
319
|
const incidentManager = getIncidentManager();
|
|
320
|
+
const dashboard = getComplianceDashboard();
|
|
289
321
|
const loggerStats = await complianceLogger.getStats();
|
|
290
322
|
const integrity = await complianceLogger.verifyIntegrity();
|
|
291
323
|
const policies = await policyManager.getAllPolicies();
|
|
292
324
|
const policySummary = await policyManager.getPolicySummary();
|
|
293
325
|
const incidentStats = await incidentManager.getStatistics();
|
|
326
|
+
const dashboardData = await dashboard.generateDashboard();
|
|
327
|
+
// Derive the overall CSSF verdict from real signals rather than hardcoding.
|
|
328
|
+
const cssfGaps = [];
|
|
329
|
+
if (!loggerStats.enabled)
|
|
330
|
+
cssfGaps.push("Compliance audit logging is disabled (Section 4.3 audit trail).");
|
|
331
|
+
if (!integrity.valid)
|
|
332
|
+
cssfGaps.push("Audit log hash-chain integrity verification failed (tamper evidence).");
|
|
333
|
+
if (policySummary.due_for_review > 0)
|
|
334
|
+
cssfGaps.push(`${policySummary.due_for_review} policy/policies are overdue for review (Section 3 IT governance).`);
|
|
335
|
+
if (incidentStats.open_incidents > 0)
|
|
336
|
+
cssfGaps.push(`${incidentStats.open_incidents} security incident(s) open (Section 5 incident management).`);
|
|
337
|
+
// Map dashboard status to the report's verbal verdict.
|
|
338
|
+
const cssfOverall = dashboardData.cssf.status === "compliant"
|
|
339
|
+
? "Compliant"
|
|
340
|
+
: dashboardData.cssf.status === "at_risk"
|
|
341
|
+
? "At Risk"
|
|
342
|
+
: "Non-Compliant";
|
|
294
343
|
const report = {
|
|
295
344
|
title: "CSSF Compliance Audit Report",
|
|
296
345
|
regulation: "CSSF Circular 20/750 - IT Risk Management",
|
|
@@ -314,7 +363,8 @@ export class ReportGenerator {
|
|
|
314
363
|
total_incidents: incidentStats.total_incidents,
|
|
315
364
|
},
|
|
316
365
|
statistics: incidentStats,
|
|
317
|
-
|
|
366
|
+
// Open incidents indicate active remediation rather than a clean control.
|
|
367
|
+
status: incidentStats.open_incidents > 0 ? "At Risk" : "Compliant",
|
|
318
368
|
},
|
|
319
369
|
policy_management: {
|
|
320
370
|
circular_reference: "Section 3 - IT Governance",
|
|
@@ -335,8 +385,8 @@ export class ReportGenerator {
|
|
|
335
385
|
status: policySummary.due_for_review === 0 ? "Compliant" : "At Risk",
|
|
336
386
|
},
|
|
337
387
|
compliance_status: {
|
|
338
|
-
overall:
|
|
339
|
-
gaps:
|
|
388
|
+
overall: cssfOverall,
|
|
389
|
+
gaps: cssfGaps,
|
|
340
390
|
recommendations: [],
|
|
341
391
|
},
|
|
342
392
|
};
|
|
@@ -391,6 +441,7 @@ export class ReportGenerator {
|
|
|
391
441
|
total_24h: dashboardData.security.alerts.total_24h,
|
|
392
442
|
critical_24h: dashboardData.security.alerts.critical_24h,
|
|
393
443
|
unacknowledged: dashboardData.security.alerts.unacknowledged,
|
|
444
|
+
unacknowledged_tracked: dashboardData.security.alerts.unacknowledged_tracked,
|
|
394
445
|
},
|
|
395
446
|
recommendations: [],
|
|
396
447
|
};
|
|
@@ -533,27 +584,47 @@ export class ReportGenerator {
|
|
|
533
584
|
* Generate full audit report
|
|
534
585
|
*/
|
|
535
586
|
async generateFullAudit(from, to, format) {
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
this.
|
|
542
|
-
this.
|
|
543
|
-
this.
|
|
544
|
-
this.
|
|
545
|
-
|
|
587
|
+
// Generate each sub-report independently so a single failure degrades that
|
|
588
|
+
// one section instead of opaquely sinking the whole audit (L47). Sub-reports
|
|
589
|
+
// are produced as JSON strings then parsed back into objects; a rejected
|
|
590
|
+
// section is replaced with an explicit error placeholder.
|
|
591
|
+
const sections = [
|
|
592
|
+
{ key: "gdpr_audit", gen: () => this.generateGDPRAudit(from, to, "json") },
|
|
593
|
+
{ key: "soc2_audit", gen: () => this.generateSOC2Audit(from, to, "json") },
|
|
594
|
+
{ key: "cssf_audit", gen: () => this.generateCSSFAudit(from, to, "json") },
|
|
595
|
+
{ key: "security_audit", gen: () => this.generateSecurityAudit(from, to, "json") },
|
|
596
|
+
{ key: "incident_report", gen: () => this.generateIncidentReport(from, to, "json") },
|
|
597
|
+
{ key: "dsar_report", gen: () => this.generateDSARReport(from, to, "json") },
|
|
598
|
+
{ key: "retention_report", gen: () => this.generateRetentionReport(from, to, "json") },
|
|
599
|
+
{ key: "change_management", gen: () => this.generateChangeManagementReport(from, to, "json") },
|
|
600
|
+
];
|
|
601
|
+
const results = await Promise.allSettled(sections.map(s => s.gen()));
|
|
546
602
|
const report = {
|
|
547
603
|
title: "Comprehensive Compliance Audit Report",
|
|
548
604
|
period: { from: from.toISOString(), to: to.toISOString() },
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
605
|
+
};
|
|
606
|
+
const failedSections = [];
|
|
607
|
+
results.forEach((result, i) => {
|
|
608
|
+
const key = sections[i].key;
|
|
609
|
+
if (result.status === "fulfilled") {
|
|
610
|
+
try {
|
|
611
|
+
report[key] = JSON.parse(result.value);
|
|
612
|
+
}
|
|
613
|
+
catch (err) {
|
|
614
|
+
failedSections.push(key);
|
|
615
|
+
report[key] = { error: `Failed to parse section: ${err instanceof Error ? err.message : String(err)}` };
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
failedSections.push(key);
|
|
620
|
+
const reason = result.reason;
|
|
621
|
+
report[key] = { error: `Failed to generate section: ${reason instanceof Error ? reason.message : String(reason)}` };
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
// Surface partial-failure so an incomplete audit is never mistaken for a clean one.
|
|
625
|
+
report.generation_status = {
|
|
626
|
+
complete: failedSections.length === 0,
|
|
627
|
+
failed_sections: failedSections,
|
|
557
628
|
};
|
|
558
629
|
return this.formatOutput(report, format);
|
|
559
630
|
}
|
|
@@ -608,11 +679,23 @@ export class ReportGenerator {
|
|
|
608
679
|
const lines = [];
|
|
609
680
|
lines.push("Key,Value");
|
|
610
681
|
for (const [key, value] of Object.entries(flattened)) {
|
|
611
|
-
|
|
612
|
-
lines.push(`"${key}","${escapedValue}"`);
|
|
682
|
+
lines.push(`${this.csvSafeCell(key)},${this.csvSafeCell(value)}`);
|
|
613
683
|
}
|
|
614
684
|
return lines.join("\n");
|
|
615
685
|
}
|
|
686
|
+
/**
|
|
687
|
+
* Quote a CSV cell and neutralize formula injection.
|
|
688
|
+
* If the value begins with =, +, -, @, tab, or CR it is prefixed with a
|
|
689
|
+
* single quote so spreadsheet apps (Excel/Sheets) treat it as text rather
|
|
690
|
+
* than a formula. Embedded double-quotes are doubled per RFC 4180.
|
|
691
|
+
*/
|
|
692
|
+
csvSafeCell(value) {
|
|
693
|
+
let str = String(value);
|
|
694
|
+
if (/^[=+\-@\t\r]/.test(str)) {
|
|
695
|
+
str = `'${str}`;
|
|
696
|
+
}
|
|
697
|
+
return `"${str.replace(/"/g, '""')}"`;
|
|
698
|
+
}
|
|
616
699
|
/**
|
|
617
700
|
* Flatten nested object
|
|
618
701
|
*/
|
|
@@ -829,4 +912,3 @@ export async function generateAndSaveReport(reportType, options) {
|
|
|
829
912
|
export function listReports() {
|
|
830
913
|
return getReportGenerator().listGeneratedReports();
|
|
831
914
|
}
|
|
832
|
-
//# sourceMappingURL=report-generator.js.map
|
|
@@ -29,6 +29,8 @@ export declare class SIEMExporter {
|
|
|
29
29
|
private flushTimer;
|
|
30
30
|
private isExporting;
|
|
31
31
|
private failedDir;
|
|
32
|
+
private droppedEvents;
|
|
33
|
+
private lastDropWarning;
|
|
32
34
|
private constructor();
|
|
33
35
|
/**
|
|
34
36
|
* Get singleton instance
|
|
@@ -86,7 +88,13 @@ export declare class SIEMExporter {
|
|
|
86
88
|
*/
|
|
87
89
|
private formatSyslog;
|
|
88
90
|
/**
|
|
89
|
-
* Export event as syslog
|
|
91
|
+
* Export event as syslog over UDP.
|
|
92
|
+
*
|
|
93
|
+
* NOTE: UDP syslog is best-effort. A successful send only means the datagram
|
|
94
|
+
* was handed to the OS — it does NOT confirm delivery to the collector. A
|
|
95
|
+
* `settled` guard ensures the socket is closed and the promise resolves exactly
|
|
96
|
+
* once (the send callback and the safety timeout previously raced, double-closing
|
|
97
|
+
* and double-resolving), and the timeout is cleared as soon as the callback fires.
|
|
90
98
|
*/
|
|
91
99
|
private exportSyslog;
|
|
92
100
|
/**
|
|
@@ -109,6 +117,21 @@ export declare class SIEMExporter {
|
|
|
109
117
|
* Escape CEF extension value
|
|
110
118
|
*/
|
|
111
119
|
private escapeExtension;
|
|
120
|
+
/**
|
|
121
|
+
* Escape a LEEF key or value. LEEF is tab-delimited and newline-terminated,
|
|
122
|
+
* so tabs/newlines/carriage-returns (and the `=` separator) must be neutralized
|
|
123
|
+
* to prevent attribute- or record-injection into the SIEM.
|
|
124
|
+
*/
|
|
125
|
+
private escapeLeef;
|
|
126
|
+
/**
|
|
127
|
+
* Escape a CEF header component (pipe-delimited). Backslash first, then pipe.
|
|
128
|
+
*/
|
|
129
|
+
private escapeCefHeader;
|
|
130
|
+
/**
|
|
131
|
+
* Strip C0 control characters (CR/LF/tab/etc.) from free-text fields so a
|
|
132
|
+
* crafted value cannot terminate or forge a syslog/LEEF record.
|
|
133
|
+
*/
|
|
134
|
+
private sanitizeFreeText;
|
|
112
135
|
/**
|
|
113
136
|
* Save failed event for later retry
|
|
114
137
|
*/
|
|
@@ -127,6 +150,8 @@ export declare class SIEMExporter {
|
|
|
127
150
|
enabled: boolean;
|
|
128
151
|
format: SIEMFormat;
|
|
129
152
|
queue_size: number;
|
|
153
|
+
queue_max_size: number;
|
|
154
|
+
dropped_events: number;
|
|
130
155
|
endpoint_configured: boolean;
|
|
131
156
|
syslog_configured: boolean;
|
|
132
157
|
};
|
|
@@ -147,4 +172,3 @@ export declare function flushSIEM(): Promise<{
|
|
|
147
172
|
failed: number;
|
|
148
173
|
}>;
|
|
149
174
|
export {};
|
|
150
|
-
//# sourceMappingURL=siem-exporter.d.ts.map
|
|
@@ -86,6 +86,10 @@ export class SIEMExporter {
|
|
|
86
86
|
flushTimer = null;
|
|
87
87
|
isExporting = false;
|
|
88
88
|
failedDir;
|
|
89
|
+
// Count of events dropped on queue overflow (e.g. during a SIEM outage). Without
|
|
90
|
+
// this, a backed-up queue silently sheds compliance events (L50).
|
|
91
|
+
droppedEvents = 0;
|
|
92
|
+
lastDropWarning = 0;
|
|
89
93
|
constructor() {
|
|
90
94
|
this.config = getSIEMConfig();
|
|
91
95
|
const config = CONFIG;
|
|
@@ -157,8 +161,19 @@ export class SIEMExporter {
|
|
|
157
161
|
}
|
|
158
162
|
// Check queue size
|
|
159
163
|
if (this.eventQueue.length >= this.config.queue_max_size) {
|
|
160
|
-
//
|
|
161
|
-
|
|
164
|
+
// Queue full (likely a SIEM outage). Persist the oldest event to the failed
|
|
165
|
+
// dir before dropping it so it is not silently lost, then count + warn.
|
|
166
|
+
const dropped = this.eventQueue.shift();
|
|
167
|
+
this.droppedEvents++;
|
|
168
|
+
if (dropped) {
|
|
169
|
+
await this.saveFailedEvent(dropped);
|
|
170
|
+
}
|
|
171
|
+
// Throttle the warning to at most once per minute to avoid log flooding.
|
|
172
|
+
const now = Date.now();
|
|
173
|
+
if (now - this.lastDropWarning > 60000) {
|
|
174
|
+
this.lastDropWarning = now;
|
|
175
|
+
log.warning(`siem-exporter: queue full (max ${this.config.queue_max_size}); dropped oldest event (total dropped: ${this.droppedEvents}). Overflow persisted to ${this.failedDir}.`);
|
|
176
|
+
}
|
|
162
177
|
}
|
|
163
178
|
this.eventQueue.push(event);
|
|
164
179
|
// Flush if batch size reached
|
|
@@ -225,8 +240,8 @@ export class SIEMExporter {
|
|
|
225
240
|
"Pantheon Security",
|
|
226
241
|
"NotebookLM MCP",
|
|
227
242
|
"1.5.1",
|
|
228
|
-
event.event_type,
|
|
229
|
-
event.event_name,
|
|
243
|
+
this.escapeCefHeader(event.event_type),
|
|
244
|
+
this.escapeCefHeader(event.event_name),
|
|
230
245
|
cefSeverity.toString(),
|
|
231
246
|
].join("|");
|
|
232
247
|
// Add extension fields
|
|
@@ -258,18 +273,19 @@ export class SIEMExporter {
|
|
|
258
273
|
"Pantheon Security",
|
|
259
274
|
"NotebookLM MCP",
|
|
260
275
|
"1.5.1",
|
|
261
|
-
event.event_type,
|
|
276
|
+
this.escapeLeef(event.event_type),
|
|
262
277
|
].join("|");
|
|
263
|
-
// Add attributes
|
|
278
|
+
// Add attributes — every key and value is LEEF-escaped so a crafted
|
|
279
|
+
// field cannot inject forged attributes or records via tab/newline.
|
|
264
280
|
const attributes = [];
|
|
265
|
-
attributes.push(`cat=${event.event_name}`);
|
|
281
|
+
attributes.push(`cat=${this.escapeLeef(event.event_name)}`);
|
|
266
282
|
attributes.push(`sev=${SYSLOG_SEVERITY[event.severity]}`);
|
|
267
|
-
attributes.push(`msg=${event.message}`);
|
|
268
|
-
attributes.push(`src=${event.source}`);
|
|
269
|
-
attributes.push(`devTime=${event.timestamp}`);
|
|
283
|
+
attributes.push(`msg=${this.escapeLeef(event.message)}`);
|
|
284
|
+
attributes.push(`src=${this.escapeLeef(event.source)}`);
|
|
285
|
+
attributes.push(`devTime=${this.escapeLeef(event.timestamp)}`);
|
|
270
286
|
if (event.details) {
|
|
271
287
|
for (const [key, value] of Object.entries(event.details)) {
|
|
272
|
-
attributes.push(`${key}=${String(value)}`);
|
|
288
|
+
attributes.push(`${this.escapeLeef(key)}=${this.escapeLeef(String(value))}`);
|
|
273
289
|
}
|
|
274
290
|
}
|
|
275
291
|
return `${leef}\t${attributes.join("\t")}`;
|
|
@@ -292,10 +308,18 @@ export class SIEMExporter {
|
|
|
292
308
|
const procId = process.pid.toString();
|
|
293
309
|
const msgId = event.event_type;
|
|
294
310
|
// RFC 5424 format
|
|
295
|
-
|
|
311
|
+
// Strip C0 control chars (CR/LF etc.) so message cannot inject a forged record.
|
|
312
|
+
const safeMessage = this.sanitizeFreeText(event.message);
|
|
313
|
+
return `<${priority}>1 ${timestamp} ${hostname} ${appName} ${procId} ${msgId} - ${safeMessage}`;
|
|
296
314
|
}
|
|
297
315
|
/**
|
|
298
|
-
* Export event as syslog
|
|
316
|
+
* Export event as syslog over UDP.
|
|
317
|
+
*
|
|
318
|
+
* NOTE: UDP syslog is best-effort. A successful send only means the datagram
|
|
319
|
+
* was handed to the OS — it does NOT confirm delivery to the collector. A
|
|
320
|
+
* `settled` guard ensures the socket is closed and the promise resolves exactly
|
|
321
|
+
* once (the send callback and the safety timeout previously raced, double-closing
|
|
322
|
+
* and double-resolving), and the timeout is cleared as soon as the callback fires.
|
|
299
323
|
*/
|
|
300
324
|
async exportSyslog(event) {
|
|
301
325
|
if (!this.config.syslog_host) {
|
|
@@ -305,21 +329,32 @@ export class SIEMExporter {
|
|
|
305
329
|
return new Promise((resolve) => {
|
|
306
330
|
const client = dgram.createSocket("udp4");
|
|
307
331
|
const buffer = Buffer.from(syslogMessage);
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
332
|
+
let settled = false;
|
|
333
|
+
let timer = null;
|
|
334
|
+
const finish = (result) => {
|
|
335
|
+
if (settled)
|
|
336
|
+
return;
|
|
337
|
+
settled = true;
|
|
338
|
+
if (timer) {
|
|
339
|
+
clearTimeout(timer);
|
|
340
|
+
timer = null;
|
|
341
|
+
}
|
|
314
342
|
try {
|
|
315
343
|
client.close();
|
|
316
344
|
}
|
|
317
345
|
catch (err) {
|
|
318
|
-
log.debug(`siem-exporter: close
|
|
319
|
-
// Ignore
|
|
346
|
+
log.debug(`siem-exporter: close UDP client: ${err instanceof Error ? err.message : String(err)}`);
|
|
347
|
+
// Ignore — socket may already be closed.
|
|
320
348
|
}
|
|
321
|
-
resolve(
|
|
322
|
-
}
|
|
349
|
+
resolve(result);
|
|
350
|
+
};
|
|
351
|
+
client.on("error", () => finish(false));
|
|
352
|
+
client.send(buffer, 0, buffer.length, this.config.syslog_port || 514, this.config.syslog_host,
|
|
353
|
+
// Best-effort: !err means the datagram was accepted by the OS, not that
|
|
354
|
+
// the collector received it.
|
|
355
|
+
(err) => finish(!err));
|
|
356
|
+
// Safety timeout in case the send callback never fires.
|
|
357
|
+
timer = setTimeout(() => finish(false), 5000);
|
|
323
358
|
});
|
|
324
359
|
}
|
|
325
360
|
/**
|
|
@@ -423,6 +458,35 @@ export class SIEMExporter {
|
|
|
423
458
|
.replace(/\n/g, "\\n")
|
|
424
459
|
.replace(/\r/g, "\\r");
|
|
425
460
|
}
|
|
461
|
+
/**
|
|
462
|
+
* Escape a LEEF key or value. LEEF is tab-delimited and newline-terminated,
|
|
463
|
+
* so tabs/newlines/carriage-returns (and the `=` separator) must be neutralized
|
|
464
|
+
* to prevent attribute- or record-injection into the SIEM.
|
|
465
|
+
*/
|
|
466
|
+
escapeLeef(value) {
|
|
467
|
+
return String(value)
|
|
468
|
+
.replace(/\\/g, "\\\\")
|
|
469
|
+
.replace(/=/g, "\\=")
|
|
470
|
+
.replace(/\t/g, " ")
|
|
471
|
+
.replace(/\r?\n/g, " ")
|
|
472
|
+
.replace(/[\x00-\x1f\x7f]/g, " ");
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Escape a CEF header component (pipe-delimited). Backslash first, then pipe.
|
|
476
|
+
*/
|
|
477
|
+
escapeCefHeader(value) {
|
|
478
|
+
return String(value)
|
|
479
|
+
.replace(/\\/g, "\\\\")
|
|
480
|
+
.replace(/\|/g, "\\|")
|
|
481
|
+
.replace(/[\r\n]+/g, " ");
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Strip C0 control characters (CR/LF/tab/etc.) from free-text fields so a
|
|
485
|
+
* crafted value cannot terminate or forge a syslog/LEEF record.
|
|
486
|
+
*/
|
|
487
|
+
sanitizeFreeText(value) {
|
|
488
|
+
return String(value).replace(/[\x00-\x1f\x7f]/g, " ");
|
|
489
|
+
}
|
|
426
490
|
/**
|
|
427
491
|
* Save failed event for later retry
|
|
428
492
|
*/
|
|
@@ -493,6 +557,8 @@ export class SIEMExporter {
|
|
|
493
557
|
enabled: this.config.enabled,
|
|
494
558
|
format: this.config.format,
|
|
495
559
|
queue_size: this.eventQueue.length,
|
|
560
|
+
queue_max_size: this.config.queue_max_size,
|
|
561
|
+
dropped_events: this.droppedEvents,
|
|
496
562
|
endpoint_configured: !!this.config.endpoint,
|
|
497
563
|
syslog_configured: !!this.config.syslog_host,
|
|
498
564
|
};
|
|
@@ -530,4 +596,3 @@ export async function exportToSIEM(eventType, eventName, severity, message, sour
|
|
|
530
596
|
export async function flushSIEM() {
|
|
531
597
|
return getSIEMExporter().flush();
|
|
532
598
|
}
|
|
533
|
-
//# sourceMappingURL=siem-exporter.js.map
|