@vibesdotdev/security 0.0.0-stage → 1.0.0-rc.4
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/LICENSE +18 -0
- package/README.md +109 -2
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/plugin.d.ts +15 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +25 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/read-lockfile.d.ts +4 -0
- package/dist/cli/read-lockfile.d.ts.map +1 -0
- package/dist/cli/read-lockfile.js +74 -0
- package/dist/cli/read-lockfile.js.map +1 -0
- package/dist/cli/report-output.d.ts +20 -0
- package/dist/cli/report-output.d.ts.map +1 -0
- package/dist/cli/report-output.js +27 -0
- package/dist/cli/report-output.js.map +1 -0
- package/dist/cli/shield.cli-group.descriptor.d.ts +9 -0
- package/dist/cli/shield.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/shield.cli-group.descriptor.js +16 -0
- package/dist/cli/shield.cli-group.descriptor.js.map +1 -0
- package/dist/cli/shield.deps.cli-group.descriptor.d.ts +9 -0
- package/dist/cli/shield.deps.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/shield.deps.cli-group.descriptor.js +17 -0
- package/dist/cli/shield.deps.cli-group.descriptor.js.map +1 -0
- package/dist/cli/shield.deps.gate.descriptor.d.ts +10 -0
- package/dist/cli/shield.deps.gate.descriptor.d.ts.map +1 -0
- package/dist/cli/shield.deps.gate.descriptor.js +25 -0
- package/dist/cli/shield.deps.gate.descriptor.js.map +1 -0
- package/dist/cli/shield.deps.gate.impl.consumer.d.ts +18 -0
- package/dist/cli/shield.deps.gate.impl.consumer.d.ts.map +1 -0
- package/dist/cli/shield.deps.gate.impl.consumer.js +42 -0
- package/dist/cli/shield.deps.gate.impl.consumer.js.map +1 -0
- package/dist/cli/shield.deps.scan.descriptor.d.ts +10 -0
- package/dist/cli/shield.deps.scan.descriptor.d.ts.map +1 -0
- package/dist/cli/shield.deps.scan.descriptor.js +25 -0
- package/dist/cli/shield.deps.scan.descriptor.js.map +1 -0
- package/dist/cli/shield.deps.scan.impl.consumer.d.ts +16 -0
- package/dist/cli/shield.deps.scan.impl.consumer.d.ts.map +1 -0
- package/dist/cli/shield.deps.scan.impl.consumer.js +35 -0
- package/dist/cli/shield.deps.scan.impl.consumer.js.map +1 -0
- package/dist/helpers/constant-time.d.ts +18 -0
- package/dist/helpers/constant-time.d.ts.map +1 -0
- package/dist/helpers/constant-time.js +49 -0
- package/dist/helpers/constant-time.js.map +1 -0
- package/dist/helpers/filename-sanitizer.d.ts +2 -0
- package/dist/helpers/filename-sanitizer.d.ts.map +1 -0
- package/dist/helpers/filename-sanitizer.js +18 -0
- package/dist/helpers/filename-sanitizer.js.map +1 -0
- package/dist/helpers/forwardable-auth-headers.d.ts +8 -0
- package/dist/helpers/forwardable-auth-headers.d.ts.map +1 -0
- package/dist/helpers/forwardable-auth-headers.js +44 -0
- package/dist/helpers/forwardable-auth-headers.js.map +1 -0
- package/dist/helpers/index.d.ts +7 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +7 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/ip-range.d.ts +3 -0
- package/dist/helpers/ip-range.d.ts.map +1 -0
- package/dist/helpers/ip-range.js +55 -0
- package/dist/helpers/ip-range.js.map +1 -0
- package/dist/helpers/mime-classifier.d.ts +3 -0
- package/dist/helpers/mime-classifier.d.ts.map +1 -0
- package/dist/helpers/mime-classifier.js +29 -0
- package/dist/helpers/mime-classifier.js.map +1 -0
- package/dist/helpers/pattern-matcher.d.ts +13 -0
- package/dist/helpers/pattern-matcher.d.ts.map +1 -0
- package/dist/helpers/pattern-matcher.js +29 -0
- package/dist/helpers/pattern-matcher.js.map +1 -0
- package/dist/implementations/cli-types.d.ts +2 -0
- package/dist/implementations/cli-types.d.ts.map +1 -0
- package/dist/implementations/cli-types.js +2 -0
- package/dist/implementations/cli-types.js.map +1 -0
- package/dist/implementations/encryption.d.ts +21 -0
- package/dist/implementations/encryption.d.ts.map +1 -0
- package/dist/implementations/encryption.js +154 -0
- package/dist/implementations/encryption.js.map +1 -0
- package/dist/implementations/errors.d.ts +17 -0
- package/dist/implementations/errors.d.ts.map +1 -0
- package/dist/implementations/errors.js +23 -0
- package/dist/implementations/errors.js.map +1 -0
- package/dist/implementations/keys.d.ts +24 -0
- package/dist/implementations/keys.d.ts.map +1 -0
- package/dist/implementations/keys.js +114 -0
- package/dist/implementations/keys.js.map +1 -0
- package/dist/implementations/redaction-admission.d.ts +24 -0
- package/dist/implementations/redaction-admission.d.ts.map +1 -0
- package/dist/implementations/redaction-admission.js +44 -0
- package/dist/implementations/redaction-admission.js.map +1 -0
- package/dist/implementations/redaction.d.ts +32 -0
- package/dist/implementations/redaction.d.ts.map +1 -0
- package/dist/implementations/redaction.js +47 -0
- package/dist/implementations/redaction.js.map +1 -0
- package/dist/implementations/redactor.inprocess.impl.d.ts +30 -0
- package/dist/implementations/redactor.inprocess.impl.d.ts.map +1 -0
- package/dist/implementations/redactor.inprocess.impl.js +26 -0
- package/dist/implementations/redactor.inprocess.impl.js.map +1 -0
- package/dist/implementations/redactor.subprocess.impl.d.ts +25 -0
- package/dist/implementations/redactor.subprocess.impl.d.ts.map +1 -0
- package/dist/implementations/redactor.subprocess.impl.js +42 -0
- package/dist/implementations/redactor.subprocess.impl.js.map +1 -0
- package/dist/implementations/scanner.impl.d.ts +7 -0
- package/dist/implementations/scanner.impl.d.ts.map +1 -0
- package/dist/implementations/scanner.impl.js +166 -0
- package/dist/implementations/scanner.impl.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/kinds/auditor.kind.d.ts +31 -0
- package/dist/kinds/auditor.kind.d.ts.map +1 -0
- package/dist/kinds/auditor.kind.js +48 -0
- package/dist/kinds/auditor.kind.js.map +1 -0
- package/dist/kinds/dep-scanner.kind.d.ts +27 -0
- package/dist/kinds/dep-scanner.kind.d.ts.map +1 -0
- package/dist/kinds/dep-scanner.kind.js +29 -0
- package/dist/kinds/dep-scanner.kind.js.map +1 -0
- package/dist/kinds/freshness-policy.kind.d.ts +34 -0
- package/dist/kinds/freshness-policy.kind.d.ts.map +1 -0
- package/dist/kinds/freshness-policy.kind.js +47 -0
- package/dist/kinds/freshness-policy.kind.js.map +1 -0
- package/dist/kinds/index.d.ts +9 -0
- package/dist/kinds/index.d.ts.map +1 -0
- package/dist/kinds/index.js +9 -0
- package/dist/kinds/index.js.map +1 -0
- package/dist/kinds/ioc-feed.kind.d.ts +35 -0
- package/dist/kinds/ioc-feed.kind.d.ts.map +1 -0
- package/dist/kinds/ioc-feed.kind.js +36 -0
- package/dist/kinds/ioc-feed.kind.js.map +1 -0
- package/dist/kinds/policy.kind.d.ts +42 -0
- package/dist/kinds/policy.kind.d.ts.map +1 -0
- package/dist/kinds/policy.kind.js +23 -0
- package/dist/kinds/policy.kind.js.map +1 -0
- package/dist/kinds/redactor.kind.d.ts +30 -0
- package/dist/kinds/redactor.kind.d.ts.map +1 -0
- package/dist/kinds/redactor.kind.js +25 -0
- package/dist/kinds/redactor.kind.js.map +1 -0
- package/dist/kinds/scanner.kind.d.ts +35 -0
- package/dist/kinds/scanner.kind.d.ts.map +1 -0
- package/dist/kinds/scanner.kind.js +26 -0
- package/dist/kinds/scanner.kind.js.map +1 -0
- package/dist/schemas/AuditEvent.d.ts +30 -0
- package/dist/schemas/AuditEvent.d.ts.map +1 -0
- package/dist/schemas/AuditEvent.js +17 -0
- package/dist/schemas/AuditEvent.js.map +1 -0
- package/dist/schemas/RedactionRule.d.ts +16 -0
- package/dist/schemas/RedactionRule.d.ts.map +1 -0
- package/dist/schemas/RedactionRule.js +10 -0
- package/dist/schemas/RedactionRule.js.map +1 -0
- package/dist/schemas/SecurityPolicy.d.ts +21 -0
- package/dist/schemas/SecurityPolicy.d.ts.map +1 -0
- package/dist/schemas/SecurityPolicy.js +9 -0
- package/dist/schemas/SecurityPolicy.js.map +1 -0
- package/dist/schemas/ThreatReport.d.ts +25 -0
- package/dist/schemas/ThreatReport.d.ts.map +1 -0
- package/dist/schemas/ThreatReport.js +14 -0
- package/dist/schemas/ThreatReport.js.map +1 -0
- package/dist/schemas/contracts/auditor.d.ts +68 -0
- package/dist/schemas/contracts/auditor.d.ts.map +1 -0
- package/dist/schemas/contracts/auditor.js +13 -0
- package/dist/schemas/contracts/auditor.js.map +1 -0
- package/dist/schemas/contracts/card.d.ts +106 -0
- package/dist/schemas/contracts/card.d.ts.map +1 -0
- package/dist/schemas/contracts/card.js +73 -0
- package/dist/schemas/contracts/card.js.map +1 -0
- package/dist/schemas/contracts/dep-scanner.d.ts +91 -0
- package/dist/schemas/contracts/dep-scanner.d.ts.map +1 -0
- package/dist/schemas/contracts/dep-scanner.js +27 -0
- package/dist/schemas/contracts/dep-scanner.js.map +1 -0
- package/dist/schemas/contracts/freshness-policy.d.ts +99 -0
- package/dist/schemas/contracts/freshness-policy.d.ts.map +1 -0
- package/dist/schemas/contracts/freshness-policy.js +31 -0
- package/dist/schemas/contracts/freshness-policy.js.map +1 -0
- package/dist/schemas/contracts/ioc-feed.d.ts +85 -0
- package/dist/schemas/contracts/ioc-feed.d.ts.map +1 -0
- package/dist/schemas/contracts/ioc-feed.js +28 -0
- package/dist/schemas/contracts/ioc-feed.js.map +1 -0
- package/dist/schemas/contracts/misc.d.ts +11 -0
- package/dist/schemas/contracts/misc.d.ts.map +1 -0
- package/dist/schemas/contracts/misc.js +4 -0
- package/dist/schemas/contracts/misc.js.map +1 -0
- package/dist/schemas/contracts/policy.d.ts +93 -0
- package/dist/schemas/contracts/policy.d.ts.map +1 -0
- package/dist/schemas/contracts/policy.js +25 -0
- package/dist/schemas/contracts/policy.js.map +1 -0
- package/dist/schemas/contracts/redactor.d.ts +99 -0
- package/dist/schemas/contracts/redactor.d.ts.map +1 -0
- package/dist/schemas/contracts/redactor.js +34 -0
- package/dist/schemas/contracts/redactor.js.map +1 -0
- package/dist/schemas/contracts/scanner.d.ts +112 -0
- package/dist/schemas/contracts/scanner.d.ts.map +1 -0
- package/dist/schemas/contracts/scanner.js +40 -0
- package/dist/schemas/contracts/scanner.js.map +1 -0
- package/dist/schemas/contracts/widget.d.ts +19 -0
- package/dist/schemas/contracts/widget.d.ts.map +1 -0
- package/dist/schemas/contracts/widget.js +10 -0
- package/dist/schemas/contracts/widget.js.map +1 -0
- package/dist/schemas/encryption.d.ts +25 -0
- package/dist/schemas/encryption.d.ts.map +1 -0
- package/dist/schemas/encryption.js +35 -0
- package/dist/schemas/encryption.js.map +1 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +6 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/policy.d.ts +2 -0
- package/dist/schemas/policy.d.ts.map +1 -0
- package/dist/schemas/policy.js +2 -0
- package/dist/schemas/policy.js.map +1 -0
- package/dist/schemas/redactor.d.ts +2 -0
- package/dist/schemas/redactor.d.ts.map +1 -0
- package/dist/schemas/redactor.js +2 -0
- package/dist/schemas/redactor.js.map +1 -0
- package/dist/schemas/report-event.d.ts +29 -0
- package/dist/schemas/report-event.d.ts.map +1 -0
- package/dist/schemas/report-event.js +19 -0
- package/dist/schemas/report-event.js.map +1 -0
- package/dist/schemas/scanner.d.ts +2 -0
- package/dist/schemas/scanner.d.ts.map +1 -0
- package/dist/schemas/scanner.js +2 -0
- package/dist/schemas/scanner.js.map +1 -0
- package/dist/security-client/index.d.ts +3 -0
- package/dist/security-client/index.d.ts.map +1 -0
- package/dist/security-client/index.js +2 -0
- package/dist/security-client/index.js.map +1 -0
- package/dist/security-client/security-client.d.ts +34 -0
- package/dist/security-client/security-client.d.ts.map +1 -0
- package/dist/security-client/security-client.js +54 -0
- package/dist/security-client/security-client.js.map +1 -0
- package/dist/security.consumer.plugin.d.ts +3 -0
- package/dist/security.consumer.plugin.d.ts.map +1 -0
- package/dist/security.consumer.plugin.js +28 -0
- package/dist/security.consumer.plugin.js.map +1 -0
- package/dist/security.plugin.d.ts +16 -0
- package/dist/security.plugin.d.ts.map +1 -0
- package/dist/security.plugin.js +78 -0
- package/dist/security.plugin.js.map +1 -0
- package/dist/svelte/index.d.ts +3 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +2 -0
- package/dist/svelte/security-svelte.plugin.d.ts +3 -0
- package/dist/svelte/security-svelte.plugin.d.ts.map +1 -0
- package/dist/svelte/security-svelte.plugin.js +38 -0
- package/dist/svelte/styles.css +8 -0
- package/dist/svelte/tool-widgets/SecurityToolCard.svelte +140 -0
- package/dist/svelte/tool-widgets/SecurityToolCard.svelte.d.ts +5 -0
- package/dist/svelte/tool-widgets/SecurityToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/index.d.ts +2 -0
- package/dist/svelte/tool-widgets/index.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/index.js +6 -0
- package/dist/tools/check-policy/check-policy.descriptor.d.ts +37 -0
- package/dist/tools/check-policy/check-policy.descriptor.d.ts.map +1 -0
- package/dist/tools/check-policy/check-policy.descriptor.js +21 -0
- package/dist/tools/check-policy/check-policy.descriptor.js.map +1 -0
- package/dist/tools/check-policy/check-policy.impl.consumer.d.ts +7 -0
- package/dist/tools/check-policy/check-policy.impl.consumer.d.ts.map +1 -0
- package/dist/tools/check-policy/check-policy.impl.consumer.js +21 -0
- package/dist/tools/check-policy/check-policy.impl.consumer.js.map +1 -0
- package/dist/tools/check-policy/index.d.ts +3 -0
- package/dist/tools/check-policy/index.d.ts.map +1 -0
- package/dist/tools/check-policy/index.js +2 -0
- package/dist/tools/check-policy/index.js.map +1 -0
- package/dist/tools/check-policy/schemas.d.ts +23 -0
- package/dist/tools/check-policy/schemas.d.ts.map +1 -0
- package/dist/tools/check-policy/schemas.js +13 -0
- package/dist/tools/check-policy/schemas.js.map +1 -0
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +6 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/redact-output/index.d.ts +3 -0
- package/dist/tools/redact-output/index.d.ts.map +1 -0
- package/dist/tools/redact-output/index.js +2 -0
- package/dist/tools/redact-output/index.js.map +1 -0
- package/dist/tools/redact-output/redact-output.descriptor.d.ts +42 -0
- package/dist/tools/redact-output/redact-output.descriptor.d.ts.map +1 -0
- package/dist/tools/redact-output/redact-output.descriptor.js +21 -0
- package/dist/tools/redact-output/redact-output.descriptor.js.map +1 -0
- package/dist/tools/redact-output/redact-output.impl.consumer.d.ts +7 -0
- package/dist/tools/redact-output/redact-output.impl.consumer.d.ts.map +1 -0
- package/dist/tools/redact-output/redact-output.impl.consumer.js +18 -0
- package/dist/tools/redact-output/redact-output.impl.consumer.js.map +1 -0
- package/dist/tools/redact-output/schemas.d.ts +28 -0
- package/dist/tools/redact-output/schemas.d.ts.map +1 -0
- package/dist/tools/redact-output/schemas.js +13 -0
- package/dist/tools/redact-output/schemas.js.map +1 -0
- package/dist/tools/report-event/index.d.ts +3 -0
- package/dist/tools/report-event/index.d.ts.map +1 -0
- package/dist/tools/report-event/index.js +2 -0
- package/dist/tools/report-event/index.js.map +1 -0
- package/dist/tools/report-event/report-event.descriptor.d.ts +43 -0
- package/dist/tools/report-event/report-event.descriptor.d.ts.map +1 -0
- package/dist/tools/report-event/report-event.descriptor.js +21 -0
- package/dist/tools/report-event/report-event.descriptor.js.map +1 -0
- package/dist/tools/report-event/report-event.impl.consumer.d.ts +24 -0
- package/dist/tools/report-event/report-event.impl.consumer.d.ts.map +1 -0
- package/dist/tools/report-event/report-event.impl.consumer.js +61 -0
- package/dist/tools/report-event/report-event.impl.consumer.js.map +1 -0
- package/dist/tools/report-event/schemas.d.ts +2 -0
- package/dist/tools/report-event/schemas.d.ts.map +1 -0
- package/dist/tools/report-event/schemas.js +3 -0
- package/dist/tools/report-event/schemas.js.map +1 -0
- package/dist/tools/scan-input/index.d.ts +3 -0
- package/dist/tools/scan-input/index.d.ts.map +1 -0
- package/dist/tools/scan-input/index.js +2 -0
- package/dist/tools/scan-input/index.js.map +1 -0
- package/dist/tools/scan-input/scan-input.descriptor.d.ts +49 -0
- package/dist/tools/scan-input/scan-input.descriptor.d.ts.map +1 -0
- package/dist/tools/scan-input/scan-input.descriptor.js +21 -0
- package/dist/tools/scan-input/scan-input.descriptor.js.map +1 -0
- package/dist/tools/scan-input/scan-input.impl.consumer.d.ts +7 -0
- package/dist/tools/scan-input/scan-input.impl.consumer.d.ts.map +1 -0
- package/dist/tools/scan-input/scan-input.impl.consumer.js +22 -0
- package/dist/tools/scan-input/scan-input.impl.consumer.js.map +1 -0
- package/dist/tools/scan-input/schemas.d.ts +36 -0
- package/dist/tools/scan-input/schemas.d.ts.map +1 -0
- package/dist/tools/scan-input/schemas.js +15 -0
- package/dist/tools/scan-input/schemas.js.map +1 -0
- package/dist/tools/security-tool-card.d.ts +13 -0
- package/dist/tools/security-tool-card.d.ts.map +1 -0
- package/dist/tools/security-tool-card.js +171 -0
- package/dist/tools/security-tool-card.js.map +1 -0
- package/dist/tools/security.docs.descriptor.d.ts +17 -0
- package/dist/tools/security.docs.descriptor.d.ts.map +1 -0
- package/dist/tools/security.docs.descriptor.js +49 -0
- package/dist/tools/security.docs.descriptor.js.map +1 -0
- package/dist/tui/index.d.ts +2 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +2 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/security-tui.plugin.d.ts +3 -0
- package/dist/tui/security-tui.plugin.d.ts.map +1 -0
- package/dist/tui/security-tui.plugin.js +31 -0
- package/dist/tui/security-tui.plugin.js.map +1 -0
- package/dist/tui/tool-widgets/SecurityToolWidget.impl.consumer.d.ts +5 -0
- package/dist/tui/tool-widgets/SecurityToolWidget.impl.consumer.d.ts.map +1 -0
- package/dist/tui/tool-widgets/SecurityToolWidget.impl.consumer.js +37 -0
- package/dist/tui/tool-widgets/SecurityToolWidget.impl.consumer.js.map +1 -0
- package/docs/host-boundary.md +186 -0
- package/docs/scanner-work.md +29 -0
- package/package.json +245 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as scanInputDescriptor } from './scan-input/index.ts';
|
|
2
|
+
export { default as redactOutputDescriptor } from './redact-output/index.ts';
|
|
3
|
+
export { default as checkPolicyDescriptor } from './check-policy/index.ts';
|
|
4
|
+
export { default as reportEventDescriptor } from './report-event/index.ts';
|
|
5
|
+
export { SECURITY_TOOL_IDS, decisionTone, isSecurityToolId, securityToolCardModel, securityToolCardRows, securityToolIcon, type PolicyDecision, type SecurityToolCardModel, type SecurityToolCardRow, type SecurityToolCardTone, type SecurityToolId, type SecurityToolThreat, } from './security-tool-card.ts';
|
|
6
|
+
export type { ScanInputInput, ScanInputOutput, } from './scan-input/schemas.ts';
|
|
7
|
+
export type { RedactOutputInput, RedactOutputOutput, } from './redact-output/schemas.ts';
|
|
8
|
+
export type { CheckPolicyInput, CheckPolicyOutput, } from './check-policy/schemas.ts';
|
|
9
|
+
export type { ReportEventInput, ReportEventOutput, } from './report-event/schemas.ts';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAE3E,OAAO,EACN,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACvB,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACX,cAAc,EACd,eAAe,GACf,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACX,iBAAiB,EACjB,kBAAkB,GAClB,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EACX,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EACX,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as scanInputDescriptor } from "./scan-input/index.js";
|
|
2
|
+
export { default as redactOutputDescriptor } from "./redact-output/index.js";
|
|
3
|
+
export { default as checkPolicyDescriptor } from "./check-policy/index.js";
|
|
4
|
+
export { default as reportEventDescriptor } from "./report-event/index.js";
|
|
5
|
+
export { SECURITY_TOOL_IDS, decisionTone, isSecurityToolId, securityToolCardModel, securityToolCardRows, securityToolIcon, } from "./security-tool-card.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAE3E,OAAO,EACN,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,GAOhB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/redact-output/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/redact-output/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
kind: "tools/tool";
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
mcpDescription: string;
|
|
7
|
+
category: string;
|
|
8
|
+
subcategory: string;
|
|
9
|
+
hardware: string[];
|
|
10
|
+
purpose: string[];
|
|
11
|
+
tags: string[];
|
|
12
|
+
safety: string;
|
|
13
|
+
requiresApproval: boolean;
|
|
14
|
+
schemas: {
|
|
15
|
+
input: import("zod/v4").ZodObject<{
|
|
16
|
+
content: import("zod/v4").ZodString;
|
|
17
|
+
rules: import("zod/v4").ZodOptional<import("zod/v4").ZodArray<import("zod/v4").ZodObject<{
|
|
18
|
+
pattern: import("zod/v4").ZodString;
|
|
19
|
+
id: import("zod/v4").ZodString;
|
|
20
|
+
replacement: import("zod/v4").ZodString;
|
|
21
|
+
target: import("zod/v4").ZodOptional<import("zod/v4").ZodEnum<{
|
|
22
|
+
metadata: "metadata";
|
|
23
|
+
content: "content";
|
|
24
|
+
header: "header";
|
|
25
|
+
}>>;
|
|
26
|
+
enabled: import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>;
|
|
27
|
+
}, import("zod/v4/core").$strip>>>;
|
|
28
|
+
}, import("zod/v4/core").$strip>;
|
|
29
|
+
output: import("zod/v4").ZodObject<{
|
|
30
|
+
redacted: import("zod/v4").ZodString;
|
|
31
|
+
matches: import("zod/v4").ZodArray<import("zod/v4").ZodObject<{
|
|
32
|
+
pattern: import("zod/v4").ZodString;
|
|
33
|
+
index: import("zod/v4").ZodNumber;
|
|
34
|
+
length: import("zod/v4").ZodNumber;
|
|
35
|
+
replacement: import("zod/v4").ZodString;
|
|
36
|
+
}, import("zod/v4/core").$strip>>;
|
|
37
|
+
redactorAvailable: import("zod/v4").ZodDefault<import("zod/v4").ZodBoolean>;
|
|
38
|
+
}, import("zod/v4/core").$strip>;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default _default;
|
|
42
|
+
//# sourceMappingURL=redact-output.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact-output.descriptor.d.ts","sourceRoot":"","sources":["../../../src/tools/redact-output/redact-output.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAkBG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel/factory';
|
|
2
|
+
import { RedactOutputInputSchema, RedactOutputOutputSchema } from "./schemas.js";
|
|
3
|
+
export default createRuntimeAsset({
|
|
4
|
+
kind: 'tools/tool',
|
|
5
|
+
id: 'security.redact-output',
|
|
6
|
+
name: 'Redact Output Content',
|
|
7
|
+
description: 'Redact PII, secrets, and configured deny-list patterns from output content.',
|
|
8
|
+
mcpDescription: 'Redact sensitive output. Ex: {content,rules}; returns redacted text and matches.',
|
|
9
|
+
category: 'security',
|
|
10
|
+
subcategory: 'redactor',
|
|
11
|
+
hardware: ['consumer', 'cloud'],
|
|
12
|
+
purpose: ['direct', 'worker', 'agent'],
|
|
13
|
+
tags: ['security', 'redact', 'pii', 'secrets'],
|
|
14
|
+
safety: 'write',
|
|
15
|
+
requiresApproval: false,
|
|
16
|
+
schemas: {
|
|
17
|
+
input: RedactOutputInputSchema,
|
|
18
|
+
output: RedactOutputOutputSchema,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=redact-output.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact-output.descriptor.js","sourceRoot":"","sources":["../../../src/tools/redact-output/redact-output.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAEjF,eAAe,kBAAkB,CAAC;IACjC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,wBAAwB;IAC5B,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,6EAA6E;IAC1F,cAAc,EACb,kFAAkF;IACnF,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,UAAU;IACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC;IACtC,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC;IAC9C,MAAM,EAAE,OAAO;IACf,gBAAgB,EAAE,KAAK;IACvB,OAAO,EAAE;QACR,KAAK,EAAE,uBAAuB;QAC9B,MAAM,EAAE,wBAAwB;KAChC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ToolCallContext, VibesRuntime } from '@vibesdotdev/kernel';
|
|
2
|
+
import { type RedactOutputInput, type RedactOutputOutput } from './schemas.ts';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
execute(input: RedactOutputInput, runtime: VibesRuntime, _ctx: ToolCallContext): Promise<RedactOutputOutput>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=redact-output.impl.consumer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact-output.impl.consumer.d.ts","sourceRoot":"","sources":["../../../src/tools/redact-output/redact-output.impl.consumer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAA2B,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;;mBAGlF,iBAAiB,WAAW,YAAY,QAAQ,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;;AADnH,wBAaE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SecurityRedactorResultSchema } from "../../schemas/contracts/redactor.js";
|
|
2
|
+
import { RedactOutputInputSchema } from "./schemas.js";
|
|
3
|
+
export default {
|
|
4
|
+
async execute(input, runtime, _ctx) {
|
|
5
|
+
const parsed = RedactOutputInputSchema.parse(input);
|
|
6
|
+
if (!runtime.hasKind('security/redactor'))
|
|
7
|
+
return { redacted: parsed.content, matches: [], redactorAvailable: false };
|
|
8
|
+
const query = runtime.query('security/redactor').enabled();
|
|
9
|
+
if (query.descriptors().length === 0)
|
|
10
|
+
return { redacted: parsed.content, matches: [], redactorAvailable: false };
|
|
11
|
+
const redactor = await query.resolve();
|
|
12
|
+
const rules = parsed.rules?.map(rule => ({
|
|
13
|
+
...rule, name: rule.id, target: rule.target ?? 'content', enabled: rule.enabled ?? true
|
|
14
|
+
}));
|
|
15
|
+
return SecurityRedactorResultSchema.parse(await redactor.redact(parsed.content, rules));
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=redact-output.impl.consumer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact-output.impl.consumer.js","sourceRoot":"","sources":["../../../src/tools/redact-output/redact-output.impl.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAGnF,OAAO,EAAE,uBAAuB,EAAmD,MAAM,cAAc,CAAC;AAExG,eAAe;IACd,KAAK,CAAC,OAAO,CAAC,KAAwB,EAAE,OAAqB,EAAE,IAAqB;QACnF,MAAM,MAAM,GAAG,uBAAuB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC;YAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC;QAEtH,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAsD,mBAAmB,CAAC,CAAC,OAAO,EAAE,CAAC;QAChH,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC;QACjH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACxC,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI;SACvF,CAAC,CAAC,CAAC;QACJ,OAAO,4BAA4B,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;IACzF,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const RedactOutputInputSchema: z.ZodObject<{
|
|
3
|
+
content: z.ZodString;
|
|
4
|
+
rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5
|
+
pattern: z.ZodString;
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
replacement: z.ZodString;
|
|
8
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
metadata: "metadata";
|
|
10
|
+
content: "content";
|
|
11
|
+
header: "header";
|
|
12
|
+
}>>;
|
|
13
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
}, z.core.$strip>>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type RedactOutputInput = z.infer<typeof RedactOutputInputSchema>;
|
|
17
|
+
export declare const RedactOutputOutputSchema: z.ZodObject<{
|
|
18
|
+
redacted: z.ZodString;
|
|
19
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
20
|
+
pattern: z.ZodString;
|
|
21
|
+
index: z.ZodNumber;
|
|
22
|
+
length: z.ZodNumber;
|
|
23
|
+
replacement: z.ZodString;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
redactorAvailable: z.ZodDefault<z.ZodBoolean>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type RedactOutputOutput = z.infer<typeof RedactOutputOutputSchema>;
|
|
28
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/tools/redact-output/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAK5B,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;iBAMlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,eAAO,MAAM,wBAAwB;;;;;;;;;iBAA+B,CAAC;AACrE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { RedactionRuleSchema } from "../../schemas/RedactionRule.js";
|
|
3
|
+
import { SecurityRedactorResultSchema } from "../../schemas/redactor.js";
|
|
4
|
+
import { SecurityContentSchema } from "../../schemas/contracts/scanner.js";
|
|
5
|
+
export const RedactOutputInputSchema = z.object({
|
|
6
|
+
content: SecurityContentSchema.describe('Content to redact'),
|
|
7
|
+
rules: z.array(RedactionRuleSchema.omit({ name: true }).extend({
|
|
8
|
+
target: RedactionRuleSchema.shape.target.optional(),
|
|
9
|
+
enabled: z.boolean().optional()
|
|
10
|
+
})).max(64).optional()
|
|
11
|
+
});
|
|
12
|
+
export const RedactOutputOutputSchema = SecurityRedactorResultSchema;
|
|
13
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/tools/redact-output/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,qBAAqB,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC5D,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QAC9D,MAAM,EAAE,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;QACnD,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KAC/B,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/report-event/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/report-event/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
kind: "tools/tool";
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
mcpDescription: string;
|
|
7
|
+
category: string;
|
|
8
|
+
subcategory: string;
|
|
9
|
+
hardware: string[];
|
|
10
|
+
purpose: string[];
|
|
11
|
+
tags: string[];
|
|
12
|
+
safety: string;
|
|
13
|
+
requiresApproval: boolean;
|
|
14
|
+
schemas: {
|
|
15
|
+
input: import("zod/v4").ZodObject<{
|
|
16
|
+
event: import("zod/v4").ZodObject<{
|
|
17
|
+
id: import("zod/v4").ZodString;
|
|
18
|
+
timestamp: import("zod/v4").ZodString;
|
|
19
|
+
actor: import("zod/v4").ZodString;
|
|
20
|
+
action: import("zod/v4").ZodString;
|
|
21
|
+
resource: import("zod/v4").ZodString;
|
|
22
|
+
outcome: import("zod/v4").ZodEnum<{
|
|
23
|
+
allow: "allow";
|
|
24
|
+
deny: "deny";
|
|
25
|
+
review: "review";
|
|
26
|
+
}>;
|
|
27
|
+
metadata: import("zod/v4").ZodOptional<import("zod/v4").ZodRecord<import("zod/v4").ZodString, import("zod/v4").ZodUnknown>>;
|
|
28
|
+
}, import("zod/v4/core").$strip>;
|
|
29
|
+
}, import("zod/v4/core").$strip>;
|
|
30
|
+
output: import("zod/v4").ZodObject<{
|
|
31
|
+
recorded: import("zod/v4").ZodBoolean;
|
|
32
|
+
eventId: import("zod/v4").ZodString;
|
|
33
|
+
error: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
|
|
34
|
+
failure: import("zod/v4").ZodOptional<import("zod/v4").ZodObject<{
|
|
35
|
+
name: import("zod/v4").ZodString;
|
|
36
|
+
code: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
|
|
37
|
+
reason: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
|
|
38
|
+
}, import("zod/v4/core").$strip>>;
|
|
39
|
+
}, import("zod/v4/core").$strip>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
43
|
+
//# sourceMappingURL=report-event.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-event.descriptor.d.ts","sourceRoot":"","sources":["../../../src/tools/report-event/report-event.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAkBG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel/factory';
|
|
2
|
+
import { ReportEventInputSchema, ReportEventOutputSchema } from "../../schemas/report-event.js";
|
|
3
|
+
export default createRuntimeAsset({
|
|
4
|
+
kind: 'tools/tool',
|
|
5
|
+
id: 'security.report-event',
|
|
6
|
+
name: 'Report Audit Event',
|
|
7
|
+
description: 'Record an audit event for security and compliance tracking.',
|
|
8
|
+
mcpDescription: 'Record a security audit event. Ex: {event}; returns recorded status and eventId.',
|
|
9
|
+
category: 'security',
|
|
10
|
+
subcategory: 'audit',
|
|
11
|
+
hardware: ['consumer', 'cloud'],
|
|
12
|
+
purpose: ['direct', 'worker', 'agent'],
|
|
13
|
+
tags: ['security', 'audit', 'compliance', 'events'],
|
|
14
|
+
safety: 'write',
|
|
15
|
+
requiresApproval: false,
|
|
16
|
+
schemas: {
|
|
17
|
+
input: ReportEventInputSchema,
|
|
18
|
+
output: ReportEventOutputSchema,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=report-event.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-event.descriptor.js","sourceRoot":"","sources":["../../../src/tools/report-event/report-event.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAEhG,eAAe,kBAAkB,CAAC;IACjC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,uBAAuB;IAC3B,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,6DAA6D;IAC1E,cAAc,EACb,kFAAkF;IACnF,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,OAAO;IACpB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC;IACtC,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC;IACnD,MAAM,EAAE,OAAO;IACf,gBAAgB,EAAE,KAAK;IACvB,OAAO,EAAE;QACR,KAAK,EAAE,sBAAsB;QAC7B,MAAM,EAAE,uBAAuB;KAC/B;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ToolCallContext, type VibesRuntime } from '@vibesdotdev/kernel';
|
|
2
|
+
import { type ReportEventInput, type ReportEventOutput } from '../../schemas/report-event.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Records one audit event with the registered `security/auditor`.
|
|
5
|
+
*
|
|
6
|
+
* The input is admitted through the owning ReportEventInputSchema before any
|
|
7
|
+
* runtime resolution: a malformed envelope or event rejects with the canonical
|
|
8
|
+
* ZodError, before an auditor is resolved, invoked or logged. That rejection is
|
|
9
|
+
* a validation outcome, not an operational failure — no recorded:false result
|
|
10
|
+
* and no failure logging is produced for it. After admission, only the parsed
|
|
11
|
+
* event is used; the raw caller input is never accessed again (so a malformed
|
|
12
|
+
* `input.event` cannot throw a TypeError inside the failure handler either).
|
|
13
|
+
*
|
|
14
|
+
* A failure to resolve the auditor or to emit — after admission — is answered
|
|
15
|
+
* `recorded: false` with the failure's value-free facts (class name, errno
|
|
16
|
+
* code, CapabilityError reason) and a fixed message naming them. The raw error
|
|
17
|
+
* (its message may carry event data or a credential) never crosses the tool
|
|
18
|
+
* boundary: only value-free facts also go to the runtime's logger, once.
|
|
19
|
+
*/
|
|
20
|
+
declare const _default: {
|
|
21
|
+
execute(input: ReportEventInput, runtime: VibesRuntime, _ctx: ToolCallContext): Promise<ReportEventOutput>;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=report-event.impl.consumer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-event.impl.consumer.d.ts","sourceRoot":"","sources":["../../../src/tools/report-event/report-event.impl.consumer.ts"],"names":[],"mappings":"AACA,OAAO,EAGN,KAAK,eAAe,EAEpB,KAAK,YAAY,EACjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAA0B,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAUtH;;;;;;;;;;;;;;;;GAgBG;;mBAGM,gBAAgB,WACd,YAAY,QACf,eAAe,GACnB,OAAO,CAAC,iBAAiB,CAAC;;AAL9B,wBAsCE"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { getLogger } from '@vibesdotdev/logging';
|
|
2
|
+
import { CaughtFailureSchema, valueFreeFailure } from '@vibesdotdev/kernel';
|
|
3
|
+
import { ReportEventInputSchema } from "../../schemas/report-event.js";
|
|
4
|
+
const LOGGER_ID = 'security:tools:report-event';
|
|
5
|
+
/** The output's message: fixed text naming only the failure's value-free facts. */
|
|
6
|
+
function failureMessage(facts) {
|
|
7
|
+
const named = [facts.name, facts.code, facts.reason].filter((fact) => fact !== undefined).join(' ');
|
|
8
|
+
return `The security auditor could not record the event (${named}).`;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Records one audit event with the registered `security/auditor`.
|
|
12
|
+
*
|
|
13
|
+
* The input is admitted through the owning ReportEventInputSchema before any
|
|
14
|
+
* runtime resolution: a malformed envelope or event rejects with the canonical
|
|
15
|
+
* ZodError, before an auditor is resolved, invoked or logged. That rejection is
|
|
16
|
+
* a validation outcome, not an operational failure — no recorded:false result
|
|
17
|
+
* and no failure logging is produced for it. After admission, only the parsed
|
|
18
|
+
* event is used; the raw caller input is never accessed again (so a malformed
|
|
19
|
+
* `input.event` cannot throw a TypeError inside the failure handler either).
|
|
20
|
+
*
|
|
21
|
+
* A failure to resolve the auditor or to emit — after admission — is answered
|
|
22
|
+
* `recorded: false` with the failure's value-free facts (class name, errno
|
|
23
|
+
* code, CapabilityError reason) and a fixed message naming them. The raw error
|
|
24
|
+
* (its message may carry event data or a credential) never crosses the tool
|
|
25
|
+
* boundary: only value-free facts also go to the runtime's logger, once.
|
|
26
|
+
*/
|
|
27
|
+
export default {
|
|
28
|
+
async execute(input, runtime, _ctx) {
|
|
29
|
+
const { event } = ReportEventInputSchema.parse(input);
|
|
30
|
+
try {
|
|
31
|
+
const query = runtime
|
|
32
|
+
.query('security/auditor').enabled();
|
|
33
|
+
if (query.descriptors().length === 0) {
|
|
34
|
+
return {
|
|
35
|
+
recorded: false,
|
|
36
|
+
eventId: event.id,
|
|
37
|
+
error: 'No security auditor registered'
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const auditor = await query.resolve();
|
|
41
|
+
await auditor.emit(event);
|
|
42
|
+
return {
|
|
43
|
+
recorded: true,
|
|
44
|
+
eventId: event.id
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
const failure = CaughtFailureSchema.parse(err);
|
|
49
|
+
const facts = valueFreeFailure(failure);
|
|
50
|
+
const logger = getLogger(LOGGER_ID, runtime);
|
|
51
|
+
logger.error('The security auditor could not record the event', { eventId: event.id, error: facts });
|
|
52
|
+
return {
|
|
53
|
+
recorded: false,
|
|
54
|
+
eventId: event.id,
|
|
55
|
+
error: failureMessage(facts),
|
|
56
|
+
failure: facts
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=report-event.impl.consumer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-event.impl.consumer.js","sourceRoot":"","sources":["../../../src/tools/report-event/report-event.impl.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAIhB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAiD,MAAM,+BAA+B,CAAC;AAEtH,MAAM,SAAS,GAAG,6BAA6B,CAAC;AAEhD,mFAAmF;AACnF,SAAS,cAAc,CAAC,KAAuB;IAC9C,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpG,OAAO,oDAAoD,KAAK,IAAI,CAAC;AACtE,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAe;IACd,KAAK,CAAC,OAAO,CACZ,KAAuB,EACvB,OAAqB,EACrB,IAAqB;QAErB,MAAM,EAAE,KAAK,EAAE,GAAG,sBAAsB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACtD,IAAI,CAAC;YACJ,MAAM,KAAK,GAAG,OAAO;iBACnB,KAAK,CAAoD,kBAAkB,CAAC,CAAC,OAAO,EAAE,CAAC;YAEzF,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACtC,OAAO;oBACN,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,KAAK,CAAC,EAAE;oBACjB,KAAK,EAAE,gCAAgC;iBACvC,CAAC;YACH,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;YACtC,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC1B,OAAO;gBACN,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,KAAK,CAAC,EAAE;aACjB,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC/C,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;YACxC,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAC7C,MAAM,CAAC,KAAK,CAAC,iDAAiD,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACrG,OAAO;gBACN,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,KAAK,CAAC,EAAE;gBACjB,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC;gBAC5B,OAAO,EAAE,KAAK;aACd,CAAC;QACH,CAAC;IACF,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/tools/report-event/schemas.ts"],"names":[],"mappings":"AACA,OAAO,EACN,sBAAsB,EACtB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACtB,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/tools/report-event/schemas.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,EACN,sBAAsB,EACtB,uBAAuB,GAGvB,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/scan-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/scan-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
kind: "tools/tool";
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
mcpDescription: string;
|
|
7
|
+
category: string;
|
|
8
|
+
subcategory: string;
|
|
9
|
+
hardware: string[];
|
|
10
|
+
purpose: string[];
|
|
11
|
+
tags: string[];
|
|
12
|
+
safety: string;
|
|
13
|
+
requiresApproval: boolean;
|
|
14
|
+
schemas: {
|
|
15
|
+
input: import("zod/v4").ZodObject<{
|
|
16
|
+
content: import("zod/v4").ZodString;
|
|
17
|
+
options: import("zod/v4").ZodOptional<import("zod/v4").ZodObject<{
|
|
18
|
+
detectSecrets: import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>;
|
|
19
|
+
detectPII: import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>;
|
|
20
|
+
detectPromptInjection: import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>;
|
|
21
|
+
}, import("zod/v4/core").$strip>>;
|
|
22
|
+
}, import("zod/v4/core").$strip>;
|
|
23
|
+
output: import("zod/v4").ZodObject<{
|
|
24
|
+
threats: import("zod/v4").ZodArray<import("zod/v4").ZodObject<{
|
|
25
|
+
severity: import("zod/v4").ZodEnum<{
|
|
26
|
+
low: "low";
|
|
27
|
+
medium: "medium";
|
|
28
|
+
high: "high";
|
|
29
|
+
critical: "critical";
|
|
30
|
+
}>;
|
|
31
|
+
kind: import("zod/v4").ZodEnum<{
|
|
32
|
+
prompt_injection: "prompt_injection";
|
|
33
|
+
secret_leak: "secret_leak";
|
|
34
|
+
pii: "pii";
|
|
35
|
+
suspicious_payload: "suspicious_payload";
|
|
36
|
+
}>;
|
|
37
|
+
description: import("zod/v4").ZodString;
|
|
38
|
+
matches: import("zod/v4").ZodArray<import("zod/v4").ZodObject<{
|
|
39
|
+
length: import("zod/v4").ZodNumber;
|
|
40
|
+
index: import("zod/v4").ZodNumber;
|
|
41
|
+
rule: import("zod/v4").ZodString;
|
|
42
|
+
}, import("zod/v4/core").$strip>>;
|
|
43
|
+
}, import("zod/v4/core").$strip>>;
|
|
44
|
+
scannerAvailable: import("zod/v4").ZodBoolean;
|
|
45
|
+
}, import("zod/v4/core").$strip>;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default _default;
|
|
49
|
+
//# sourceMappingURL=scan-input.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-input.descriptor.d.ts","sourceRoot":"","sources":["../../../src/tools/scan-input/scan-input.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAkBG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel/factory';
|
|
2
|
+
import { ScanInputInputSchema, ScanInputOutputSchema } from "./schemas.js";
|
|
3
|
+
export default createRuntimeAsset({
|
|
4
|
+
kind: 'tools/tool',
|
|
5
|
+
id: 'security.scan-input',
|
|
6
|
+
name: 'Scan Input Content',
|
|
7
|
+
description: 'Scan input content for threats, secrets, PII, and prompt injection patterns.',
|
|
8
|
+
mcpDescription: 'Scan input for threats. Ex: {content,options}; returns threats and scanner status.',
|
|
9
|
+
category: 'security',
|
|
10
|
+
subcategory: 'scanner',
|
|
11
|
+
hardware: ['consumer', 'cloud'],
|
|
12
|
+
purpose: ['direct', 'worker', 'agent'],
|
|
13
|
+
tags: ['security', 'scan', 'threats', 'secrets', 'pii'],
|
|
14
|
+
safety: 'read',
|
|
15
|
+
requiresApproval: false,
|
|
16
|
+
schemas: {
|
|
17
|
+
input: ScanInputInputSchema,
|
|
18
|
+
output: ScanInputOutputSchema,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=scan-input.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-input.descriptor.js","sourceRoot":"","sources":["../../../src/tools/scan-input/scan-input.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE3E,eAAe,kBAAkB,CAAC;IACjC,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,qBAAqB;IACzB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,8EAA8E;IAC3F,cAAc,EACb,oFAAoF;IACrF,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC;IACtC,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC;IACvD,MAAM,EAAE,MAAM;IACd,gBAAgB,EAAE,KAAK;IACvB,OAAO,EAAE;QACR,KAAK,EAAE,oBAAoB;QAC3B,MAAM,EAAE,qBAAqB;KAC7B;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ToolCallContext, VibesRuntime } from '@vibesdotdev/kernel';
|
|
2
|
+
import { type ScanInputInput, type ScanInputOutput } from './schemas.ts';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
execute(input: ScanInputInput, runtime: VibesRuntime, _ctx: ToolCallContext): Promise<ScanInputOutput>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=scan-input.impl.consumer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-input.impl.consumer.d.ts","sourceRoot":"","sources":["../../../src/tools/scan-input/scan-input.impl.consumer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAAwB,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;;mBAGzE,cAAc,WAAW,YAAY,QAAQ,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;;AAD7G,wBAkBE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SecurityScannerResultSchema } from "../../schemas/contracts/scanner.js";
|
|
2
|
+
import { ScanInputInputSchema } from "./schemas.js";
|
|
3
|
+
export default {
|
|
4
|
+
async execute(input, runtime, _ctx) {
|
|
5
|
+
const parsed = ScanInputInputSchema.parse(input);
|
|
6
|
+
if (!runtime.hasKind('security/scanner'))
|
|
7
|
+
return { threats: [], scannerAvailable: false };
|
|
8
|
+
const scanners = await runtime
|
|
9
|
+
.query('security/scanner')
|
|
10
|
+
.enabled()
|
|
11
|
+
.resolveAll();
|
|
12
|
+
const results = await Promise.all(scanners.map(async (scanner) => SecurityScannerResultSchema.parse(await scanner.scan(parsed.content, parsed.options))));
|
|
13
|
+
return {
|
|
14
|
+
threats: results.flatMap(result => result.threats.map(threat => ({
|
|
15
|
+
...threat,
|
|
16
|
+
matches: threat.matches.map(match => ({ rule: match.pattern, index: match.index, length: match.length }))
|
|
17
|
+
}))),
|
|
18
|
+
scannerAvailable: results.some(result => result.scanAvailable)
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=scan-input.impl.consumer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-input.impl.consumer.js","sourceRoot":"","sources":["../../../src/tools/scan-input/scan-input.impl.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAGjF,OAAO,EAAE,oBAAoB,EAA6C,MAAM,cAAc,CAAC;AAE/F,eAAe;IACd,KAAK,CAAC,OAAO,CAAC,KAAqB,EAAE,OAAqB,EAAE,IAAqB;QAChF,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC;YAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC;QAE1F,MAAM,QAAQ,GAAG,MAAM,OAAO;aAC5B,KAAK,CAAoD,kBAAkB,CAAC;aAC5E,OAAO,EAAE;aACT,UAAU,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAC,OAAO,EAAC,EAAE,CAAC,2BAA2B,CAAC,KAAK,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACxJ,OAAO;YACN,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBAChE,GAAG,MAAM;gBACT,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;aACzG,CAAC,CAAC,CAAC;YACJ,gBAAgB,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC;SAC9D,CAAC;IACH,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export { MAX_SCANNABLE_CONTENT_LENGTH } from '../../schemas/contracts/scanner.ts';
|
|
3
|
+
export declare const ScanInputInputSchema: z.ZodObject<{
|
|
4
|
+
content: z.ZodString;
|
|
5
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
6
|
+
detectSecrets: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
detectPII: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
detectPromptInjection: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type ScanInputInput = z.infer<typeof ScanInputInputSchema>;
|
|
12
|
+
export declare const ScanInputOutputSchema: z.ZodObject<{
|
|
13
|
+
threats: z.ZodArray<z.ZodObject<{
|
|
14
|
+
severity: z.ZodEnum<{
|
|
15
|
+
low: "low";
|
|
16
|
+
medium: "medium";
|
|
17
|
+
high: "high";
|
|
18
|
+
critical: "critical";
|
|
19
|
+
}>;
|
|
20
|
+
kind: z.ZodEnum<{
|
|
21
|
+
prompt_injection: "prompt_injection";
|
|
22
|
+
secret_leak: "secret_leak";
|
|
23
|
+
pii: "pii";
|
|
24
|
+
suspicious_payload: "suspicious_payload";
|
|
25
|
+
}>;
|
|
26
|
+
description: z.ZodString;
|
|
27
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
28
|
+
length: z.ZodNumber;
|
|
29
|
+
index: z.ZodNumber;
|
|
30
|
+
rule: z.ZodString;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
scannerAvailable: z.ZodBoolean;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type ScanInputOutput = z.infer<typeof ScanInputOutputSchema>;
|
|
36
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/tools/scan-input/schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,eAAO,MAAM,oBAAoB;;;;;;;iBAI/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;iBAKhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SecurityContentSchema, SecurityScannerOverridesSchema, SecurityScannerResultSchema, ThreatMatchSchema } from "../../schemas/scanner.js";
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
export { MAX_SCANNABLE_CONTENT_LENGTH } from "../../schemas/contracts/scanner.js";
|
|
4
|
+
export const ScanInputInputSchema = z.object({
|
|
5
|
+
content: SecurityContentSchema
|
|
6
|
+
.describe('Content to scan for threats'),
|
|
7
|
+
options: SecurityScannerOverridesSchema.optional(),
|
|
8
|
+
});
|
|
9
|
+
export const ScanInputOutputSchema = SecurityScannerResultSchema.omit({ scanAvailable: true }).extend({
|
|
10
|
+
threats: z.array(SecurityScannerResultSchema.shape.threats.element.extend({
|
|
11
|
+
matches: z.array(ThreatMatchSchema.omit({ pattern: true }).extend({ rule: z.string() }))
|
|
12
|
+
})),
|
|
13
|
+
scannerAvailable: z.boolean()
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=schemas.js.map
|