@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,166 @@
|
|
|
1
|
+
import { SecurityContentSchema, SecurityScannerOverridesSchema, SecurityScannerOptionsSchema } from "../schemas/contracts/scanner.js";
|
|
2
|
+
const SECRET_RULES = [
|
|
3
|
+
{
|
|
4
|
+
id: 'secret.named-credential',
|
|
5
|
+
source: '(?:api[_-]?key|secret[_-]?key|auth[_-]?token|access[_-]?token| bearer)\\s*[:=]\\s*[\'"]?[a-zA-Z0-9_-]{20,}[\'"]?',
|
|
6
|
+
flags: 'gi',
|
|
7
|
+
severity: 'critical',
|
|
8
|
+
kind: 'secret_leak',
|
|
9
|
+
description: 'Potential secret or API key detected'
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: 'secret.password',
|
|
13
|
+
source: '(?:password|passwd|pwd)\\s*[:=]\\s*[\'"]?[^\\s\'"]+[\'"]?',
|
|
14
|
+
flags: 'gi',
|
|
15
|
+
severity: 'critical',
|
|
16
|
+
kind: 'secret_leak',
|
|
17
|
+
description: 'Potential secret or API key detected'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 'secret.github-token',
|
|
21
|
+
source: '(?:ghp_|gho_|ghu_|ghs_|ghr_)[a-zA-Z0-9]{36}',
|
|
22
|
+
flags: 'g',
|
|
23
|
+
severity: 'critical',
|
|
24
|
+
kind: 'secret_leak',
|
|
25
|
+
description: 'Potential secret or API key detected'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'secret.provider-key',
|
|
29
|
+
source: '(?:sk-|pk_)[a-zA-Z0-9]{48}',
|
|
30
|
+
flags: 'g',
|
|
31
|
+
severity: 'critical',
|
|
32
|
+
kind: 'secret_leak',
|
|
33
|
+
description: 'Potential secret or API key detected'
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
const PII_RULES = [
|
|
37
|
+
{
|
|
38
|
+
id: 'pii.ssn',
|
|
39
|
+
source: '\\b\\d{3}[-.\\s]?\\d{2}[-.\\s]?\\d{4}\\b',
|
|
40
|
+
flags: 'g',
|
|
41
|
+
severity: 'medium',
|
|
42
|
+
kind: 'pii',
|
|
43
|
+
description: 'Potential PII detected (SSN, passport, email)'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'pii.passport',
|
|
47
|
+
source: '\\b[A-Z]{2}\\d{6,9}\\b',
|
|
48
|
+
flags: 'g',
|
|
49
|
+
severity: 'medium',
|
|
50
|
+
kind: 'pii',
|
|
51
|
+
description: 'Potential PII detected (SSN, passport, email)'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: 'pii.email',
|
|
55
|
+
// Both runs are bounded: an address has at most a 64-octet local part and
|
|
56
|
+
// a 126-octet domain (RFC 5321). An open `[...]+ ` local part made every
|
|
57
|
+
// start position backtrack across the whole input, so a long run of
|
|
58
|
+
// ordinary characters with no `@` anywhere cost O(n^2) — a paste of
|
|
59
|
+
// 200 KB stalled the scanner for seconds.
|
|
60
|
+
source: '[a-zA-Z0-9._%+-]{1,64}@[a-zA-Z0-9.-]{1,126}\\.[a-zA-Z]{2,}',
|
|
61
|
+
flags: 'g',
|
|
62
|
+
severity: 'medium',
|
|
63
|
+
kind: 'pii',
|
|
64
|
+
description: 'Potential PII detected (SSN, passport, email)'
|
|
65
|
+
}
|
|
66
|
+
];
|
|
67
|
+
const PROMPT_INJECTION_RULES = [
|
|
68
|
+
{
|
|
69
|
+
id: 'injection.instruction-override',
|
|
70
|
+
// The modifier is REPEATED, not optional: the canonical phrase is
|
|
71
|
+
// "ignore ALL PREVIOUS instructions", two words. An alternation of
|
|
72
|
+
// exactly one modifier never matched the phrase this rule exists to
|
|
73
|
+
// catch, so the detector reported a clean scan on the most obvious
|
|
74
|
+
// injection there is. `\s+` between repeats also keeps "ignore previous
|
|
75
|
+
// instructions" matching.
|
|
76
|
+
source: '\\b(?:ignore|disregard|forget)\\s+(?:(?:all\\s+)?(?:previous|prior|earlier)\\s+)+(?:instructions?|rules?|directives?|prompts?)\\b',
|
|
77
|
+
flags: 'gi',
|
|
78
|
+
severity: 'high',
|
|
79
|
+
kind: 'prompt_injection',
|
|
80
|
+
description: 'Potential prompt injection pattern detected'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'injection.persona-swap',
|
|
84
|
+
source: '\\b(?:you\\s+are\\s+now|act\\s+as|pretend\\s+to\\s+be|in\\s+the\\s+role\\s+of)\\b',
|
|
85
|
+
flags: 'gi',
|
|
86
|
+
severity: 'high',
|
|
87
|
+
kind: 'prompt_injection',
|
|
88
|
+
description: 'Potential prompt injection pattern detected'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 'injection.system-prompt',
|
|
92
|
+
source: 'system\\s*prompt\\s*(?:leak|extraction|injection)',
|
|
93
|
+
flags: 'gi',
|
|
94
|
+
severity: 'high',
|
|
95
|
+
kind: 'prompt_injection',
|
|
96
|
+
description: 'Potential prompt injection pattern detected'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 'injection.markup',
|
|
100
|
+
source: '<\\/?(?:script|style)[^>]*>',
|
|
101
|
+
flags: 'gi',
|
|
102
|
+
severity: 'high',
|
|
103
|
+
kind: 'prompt_injection',
|
|
104
|
+
description: 'Potential prompt injection pattern detected'
|
|
105
|
+
}
|
|
106
|
+
];
|
|
107
|
+
function scanWith(rules, content, into) {
|
|
108
|
+
for (const rule of rules) {
|
|
109
|
+
// A fresh RegExp per rule per call: a shared /g object carries lastIndex
|
|
110
|
+
// between calls, and a scanner that answers differently the second time
|
|
111
|
+
// is a scanner that stops finding the thing it exists to find.
|
|
112
|
+
// Markup consumes through the next terminator once. If none exists, stop:
|
|
113
|
+
// retrying [^>]* at every '<script' would rescan the same suffix.
|
|
114
|
+
if (rule.id === 'injection.markup') {
|
|
115
|
+
const opening = /<\/?(?:script|style)/gi;
|
|
116
|
+
let start;
|
|
117
|
+
while ((start = opening.exec(content)) !== null) {
|
|
118
|
+
const end = content.indexOf('>', opening.lastIndex);
|
|
119
|
+
if (end < 0)
|
|
120
|
+
break;
|
|
121
|
+
into.push({
|
|
122
|
+
severity: rule.severity, kind: rule.kind, description: rule.description,
|
|
123
|
+
matches: [{ pattern: rule.id, index: start.index, length: end + 1 - start.index }]
|
|
124
|
+
});
|
|
125
|
+
opening.lastIndex = end + 1;
|
|
126
|
+
}
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
const pattern = new RegExp(rule.source, rule.flags);
|
|
130
|
+
let match;
|
|
131
|
+
while ((match = pattern.exec(content)) !== null) {
|
|
132
|
+
into.push({
|
|
133
|
+
severity: rule.severity,
|
|
134
|
+
kind: rule.kind,
|
|
135
|
+
description: rule.description,
|
|
136
|
+
matches: [{ pattern: rule.id, index: match.index, length: match[0].length }]
|
|
137
|
+
});
|
|
138
|
+
if (match[0].length === 0)
|
|
139
|
+
pattern.lastIndex = match.index + 1;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function scanContent(content, options) {
|
|
144
|
+
const threats = [];
|
|
145
|
+
if (options?.detectSecrets ?? true)
|
|
146
|
+
scanWith(SECRET_RULES, content, threats);
|
|
147
|
+
if (options?.detectPII ?? true)
|
|
148
|
+
scanWith(PII_RULES, content, threats);
|
|
149
|
+
if (options?.detectPromptInjection ?? true)
|
|
150
|
+
scanWith(PROMPT_INJECTION_RULES, content, threats);
|
|
151
|
+
return threats;
|
|
152
|
+
}
|
|
153
|
+
export default class BuiltinScanner {
|
|
154
|
+
descriptor;
|
|
155
|
+
constructor(descriptor) {
|
|
156
|
+
this.descriptor = descriptor;
|
|
157
|
+
}
|
|
158
|
+
async scan(content, options) {
|
|
159
|
+
content = SecurityContentSchema.parse(content);
|
|
160
|
+
const overrides = SecurityScannerOverridesSchema.optional().parse(options) ?? {};
|
|
161
|
+
const supplied = Object.fromEntries(Object.entries(overrides).filter(([, value]) => value !== undefined));
|
|
162
|
+
const settings = SecurityScannerOptionsSchema.parse({ ...this.descriptor.options, ...supplied });
|
|
163
|
+
return { threats: scanContent(content, settings), scanAvailable: true };
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=scanner.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanner.impl.js","sourceRoot":"","sources":["../../src/implementations/scanner.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAwBtI,MAAM,YAAY,GAA0B;IAC3C;QACC,EAAE,EAAE,yBAAyB;QAC7B,MAAM,EAAE,kHAAkH;QAC1H,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,sCAAsC;KACnD;IACD;QACC,EAAE,EAAE,iBAAiB;QACrB,MAAM,EAAE,2DAA2D;QACnE,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,sCAAsC;KACnD;IACD;QACC,EAAE,EAAE,qBAAqB;QACzB,MAAM,EAAE,6CAA6C;QACrD,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,sCAAsC;KACnD;IACD;QACC,EAAE,EAAE,qBAAqB;QACzB,MAAM,EAAE,4BAA4B;QACpC,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,sCAAsC;KACnD;CACD,CAAC;AAEF,MAAM,SAAS,GAA0B;IACxC;QACC,EAAE,EAAE,SAAS;QACb,MAAM,EAAE,0CAA0C;QAClD,KA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CAAC;QACjF,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC;QAC1G,MAAM,QAAQ,GAAG,4BAA4B,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC;QACjG,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACzE,CAAC;CACD"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { ValidationError } from './implementations/errors.ts';
|
|
2
|
+
export { generateEncryptionKey, SecretEncryption } from './implementations/encryption.ts';
|
|
3
|
+
export { boundEncryptionKeyHex, readOrCreateKeyFile, resolveEncryptionKeyHex, resolveEncryptionKeyHexForBase, SECRET_ENCRYPTION_KEY_CREDENTIAL, type EncryptionKeyRuntime } from './implementations/keys.ts';
|
|
4
|
+
export type { EncryptedSecret } from './schemas/encryption.ts';
|
|
5
|
+
export { securityScannerKind, securityRedactorKind, securityPolicyKind, securityAuditorKind, securityDepScannerKind, securityIOCFeedKind, securityFreshnessPolicyKind, } from './kinds/index.ts';
|
|
6
|
+
export type { SecurityScannerDescriptor, SecurityScannerService, SecurityScannerOptions, SecurityScannerResult, ThreatMatch, } from './kinds/scanner.kind.ts';
|
|
7
|
+
export type { DepScannerDescriptor, DepScannerService, DepScanReport, IOCEntry, } from './kinds/dep-scanner.kind.ts';
|
|
8
|
+
export type { IOCFeedDescriptor, IOCFeedService, IOCFeedEntry, IOCFeedSyncStatus, } from './kinds/ioc-feed.kind.ts';
|
|
9
|
+
export type { FreshnessPolicyDescriptor, FreshnessPolicyService, FreshnessVerdict, } from './kinds/freshness-policy.kind.ts';
|
|
10
|
+
export type { SecurityRedactorDescriptor, SecurityRedactorService, SecurityRedactorResult, RedactionMatch, } from './kinds/redactor.kind.ts';
|
|
11
|
+
export type { SecurityPolicyDescriptor, SecurityPolicyService, PolicyOutcome, PolicyEvaluationContext, PolicyRule, } from './kinds/policy.kind.ts';
|
|
12
|
+
export type { SecurityAuditorDescriptor, SecurityAuditorService, AuditQueryOptions, } from './kinds/auditor.kind.ts';
|
|
13
|
+
export { SecurityPolicySchema, ThreatReportSchema, RedactionRuleSchema, AuditEventSchema, AuditQueryOptionsSchema, type SecurityPolicy, type ThreatReport, type RedactionRule, type AuditEvent, } from './schemas/index.ts';
|
|
14
|
+
export { matchesPattern, findMatches, isIpInRange, isIpPrivate, extensionToMime, mimeToExtensions, sanitizeFilename, constantTimeEqual, constantTimeEqualBytes, } from './helpers/index.ts';
|
|
15
|
+
export type { SecurityClient } from './security-client/index.ts';
|
|
16
|
+
export type { ScanInputInput, ScanInputOutput, RedactOutputInput, RedactOutputOutput, CheckPolicyInput, CheckPolicyOutput, ReportEventInput, ReportEventOutput, } from './tools/index.ts';
|
|
17
|
+
export type { CLIGroupAssetDescriptor, CLICommandAssetDescriptor, } from './cli/index.ts';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAC1F,OAAO,EACN,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,gCAAgC,EAChC,KAAK,oBAAoB,EACzB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,OAAO,EACN,mBAAmB,EACnB,oBAAoB,E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EAChB,iBAAiB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EACX,uBAAuB,EACvB,yBAAyB,GACzB,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Core security exports
|
|
2
|
+
export { ValidationError } from "./implementations/errors.js";
|
|
3
|
+
export { generateEncryptionKey, SecretEncryption } from "./implementations/encryption.js";
|
|
4
|
+
export { boundEncryptionKeyHex, readOrCreateKeyFile, resolveEncryptionKeyHex, resolveEncryptionKeyHexForBase, SECRET_ENCRYPTION_KEY_CREDENTIAL } from "./implementations/keys.js";
|
|
5
|
+
// Runtime kinds
|
|
6
|
+
export { securityScannerKind, securityRedactorKind, securityPolicyKind, securityAuditorKind, securityDepScannerKind, securityIOCFeedKind, securityFreshnessPolicyKind, } from "./kinds/index.js";
|
|
7
|
+
// Schemas
|
|
8
|
+
export { SecurityPolicySchema, ThreatReportSchema, RedactionRuleSchema, AuditEventSchema, AuditQueryOptionsSchema, } from "./schemas/index.js";
|
|
9
|
+
// Helpers
|
|
10
|
+
export { matchesPattern, findMatches, isIpInRange, isIpPrivate, extensionToMime, mimeToExtensions, sanitizeFilename, constantTimeEqual, constantTimeEqualBytes, } from "./helpers/index.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAC1F,OAAO,EACN,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,gCAAgC,EAEhC,MAAM,2BAA2B,CAAC;AAGnC,gBAAgB;AAChB,OAAO,EACN,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,2BAA2B,GAC3B,MAAM,kBAAkB,CAAC;AAiD1B,UAAU;AACV,OAAO,EACN,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,GAKvB,MAAM,oBAAoB,CAAC;AAE5B,UAAU;AACV,OAAO,EACN,cAAc,EACd,WAAW,EACX,WAAW,EACX,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,GACtB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type SecurityAuditorDescriptor, type SecurityAuditorService } from '../schemas/contracts/auditor.ts';
|
|
2
|
+
export { SecurityAuditorDescriptorSchema, type SecurityAuditorDescriptor, SecurityAuditorServiceSchema, type SecurityAuditorService } from '../schemas/contracts/auditor.ts';
|
|
3
|
+
import { type AuditEvent, type AuditQueryOptions } from '../schemas/AuditEvent.ts';
|
|
4
|
+
export { AuditEventSchema, type AuditEvent, type AuditQueryOptions } from '../schemas/AuditEvent.ts';
|
|
5
|
+
declare class DefaultSecurityAuditorService implements SecurityAuditorService {
|
|
6
|
+
readonly descriptor: SecurityAuditorDescriptor;
|
|
7
|
+
private readonly events;
|
|
8
|
+
constructor(descriptor: SecurityAuditorDescriptor);
|
|
9
|
+
emit(event: AuditEvent): Promise<void>;
|
|
10
|
+
query(options?: AuditQueryOptions): Promise<AuditEvent[]>;
|
|
11
|
+
}
|
|
12
|
+
declare function resolveAuditor(candidates: SecurityAuditorDescriptor[]): SecurityAuditorDescriptor | undefined;
|
|
13
|
+
export declare const securityAuditorKind: {
|
|
14
|
+
readonly id: "security/auditor";
|
|
15
|
+
readonly descriptorSchema: import("zod/v4").ZodObject<{
|
|
16
|
+
id: import("zod/v4").ZodString;
|
|
17
|
+
kind: import("zod/v4").ZodLiteral<"security/auditor">;
|
|
18
|
+
name: import("zod/v4").ZodString;
|
|
19
|
+
description: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
|
|
20
|
+
enabled: import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>;
|
|
21
|
+
tags: import("zod/v4").ZodOptional<import("zod/v4").ZodArray<import("zod/v4").ZodString>>;
|
|
22
|
+
hardware: import("zod/v4").ZodOptional<import("zod/v4").ZodArray<import("zod/v4").ZodEnum<{
|
|
23
|
+
consumer: "consumer";
|
|
24
|
+
cloud: "cloud";
|
|
25
|
+
}>>>;
|
|
26
|
+
}, import("zod/v4/core").$strip>;
|
|
27
|
+
readonly defaultImplementation: typeof DefaultSecurityAuditorService;
|
|
28
|
+
readonly resolve: typeof resolveAuditor;
|
|
29
|
+
readonly contexts: readonly [];
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=auditor.kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auditor.kind.d.ts","sourceRoot":"","sources":["../../src/kinds/auditor.kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,yBAAyB,EAAE,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC/I,OAAO,EAAE,+BAA+B,EAAE,KAAK,yBAAyB,EAAE,4BAA4B,EAAE,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAG7K,OAAO,EAA6C,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC9H,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAErG,cAAM,6BAA8B,YAAW,sBAAsB;IACpE,QAAQ,CAAC,UAAU,EAAE,yBAAyB,CAAC;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;gBAE/B,UAAU,EAAE,yBAAyB;IAI3C,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAItC,KAAK,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;CAgBnE;AAED,iBAAS,cAAc,CACtB,UAAU,EAAE,yBAAyB,EAAE,GACrC,yBAAyB,GAAG,SAAS,CAGvC;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;CAMgE,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { SecurityAuditorDescriptorSchema } from "../schemas/contracts/auditor.js";
|
|
2
|
+
export { SecurityAuditorDescriptorSchema, SecurityAuditorServiceSchema } from "../schemas/contracts/auditor.js";
|
|
3
|
+
import { AuditEventSchema, AuditQueryOptionsSchema } from "../schemas/AuditEvent.js";
|
|
4
|
+
export { AuditEventSchema } from "../schemas/AuditEvent.js";
|
|
5
|
+
class DefaultSecurityAuditorService {
|
|
6
|
+
descriptor;
|
|
7
|
+
events = [];
|
|
8
|
+
constructor(descriptor) {
|
|
9
|
+
this.descriptor = descriptor;
|
|
10
|
+
}
|
|
11
|
+
async emit(event) {
|
|
12
|
+
this.events.push(AuditEventSchema.parse(event));
|
|
13
|
+
}
|
|
14
|
+
async query(options = {}) {
|
|
15
|
+
options = AuditQueryOptionsSchema.parse(options);
|
|
16
|
+
const from = options.from ? Date.parse(options.from) : undefined;
|
|
17
|
+
const to = options.to ? Date.parse(options.to) : undefined;
|
|
18
|
+
const results = this.events.filter((event) => {
|
|
19
|
+
if (options.actor && event.actor !== options.actor)
|
|
20
|
+
return false;
|
|
21
|
+
if (options.action && event.action !== options.action)
|
|
22
|
+
return false;
|
|
23
|
+
if (options.resource && event.resource !== options.resource)
|
|
24
|
+
return false;
|
|
25
|
+
if (options.outcome && event.outcome !== options.outcome)
|
|
26
|
+
return false;
|
|
27
|
+
const timestamp = Date.parse(event.timestamp);
|
|
28
|
+
if (from !== undefined && timestamp < from)
|
|
29
|
+
return false;
|
|
30
|
+
if (to !== undefined && timestamp > to)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
});
|
|
34
|
+
return options.limit !== undefined ? results.slice(0, options.limit) : results;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function resolveAuditor(candidates) {
|
|
38
|
+
const enabled = candidates.filter((d) => d.enabled !== false);
|
|
39
|
+
return enabled[0];
|
|
40
|
+
}
|
|
41
|
+
export const securityAuditorKind = {
|
|
42
|
+
id: 'security/auditor',
|
|
43
|
+
descriptorSchema: SecurityAuditorDescriptorSchema,
|
|
44
|
+
defaultImplementation: DefaultSecurityAuditorService,
|
|
45
|
+
resolve: resolveAuditor,
|
|
46
|
+
contexts: [],
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=auditor.kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auditor.kind.js","sourceRoot":"","sources":["../../src/kinds/auditor.kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAA+D,MAAM,iCAAiC,CAAC;AAC/I,OAAO,EAAE,+BAA+B,EAAkC,4BAA4B,EAA+B,MAAM,iCAAiC,CAAC;AAG7K,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAA2C,MAAM,0BAA0B,CAAC;AAC9H,OAAO,EAAE,gBAAgB,EAA2C,MAAM,0BAA0B,CAAC;AAErG,MAAM,6BAA6B;IACzB,UAAU,CAA4B;IAC9B,MAAM,GAAiB,EAAE,CAAC;IAE3C,YAAY,UAAqC;QAChD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,KAAiB;QAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,UAA6B,EAAE;QAC1C,OAAO,GAAG,uBAAuB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC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AU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC;IAC9D,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC,EAAE,EAAE,kBAAkB;IACtB,gBAAgB,EAAE,+BAA+B;IACjD,qBAAqB,EAAE,6BAA6B;IACpD,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,EAAE;CACmF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type DepScanReport, type DepScannerDescriptor, type DepScannerService } from '../schemas/contracts/dep-scanner.ts';
|
|
2
|
+
export { IOCEntrySchema, type IOCEntry, DepScanReportSchema, type DepScanReport, DepScannerDescriptorSchema, type DepScannerDescriptor, DepScannerServiceSchema, type DepScannerService } from '../schemas/contracts/dep-scanner.ts';
|
|
3
|
+
declare class DefaultDepScannerService implements DepScannerService {
|
|
4
|
+
readonly descriptor: DepScannerDescriptor;
|
|
5
|
+
constructor(descriptor: DepScannerDescriptor);
|
|
6
|
+
scan(_manifest: string): Promise<DepScanReport>;
|
|
7
|
+
}
|
|
8
|
+
declare function resolveDepScanner(candidates: DepScannerDescriptor[]): DepScannerDescriptor | undefined;
|
|
9
|
+
export declare const securityDepScannerKind: {
|
|
10
|
+
readonly id: "security/dep-scanner";
|
|
11
|
+
readonly descriptorSchema: import("zod/v4").ZodObject<{
|
|
12
|
+
id: import("zod/v4").ZodString;
|
|
13
|
+
kind: import("zod/v4").ZodLiteral<"security/dep-scanner">;
|
|
14
|
+
name: import("zod/v4").ZodString;
|
|
15
|
+
description: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
|
|
16
|
+
enabled: import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>;
|
|
17
|
+
tags: import("zod/v4").ZodOptional<import("zod/v4").ZodArray<import("zod/v4").ZodString>>;
|
|
18
|
+
hardware: import("zod/v4").ZodOptional<import("zod/v4").ZodArray<import("zod/v4").ZodEnum<{
|
|
19
|
+
consumer: "consumer";
|
|
20
|
+
cloud: "cloud";
|
|
21
|
+
}>>>;
|
|
22
|
+
}, import("zod/v4/core").$strip>;
|
|
23
|
+
readonly defaultImplementation: typeof DefaultDepScannerService;
|
|
24
|
+
readonly resolve: typeof resolveDepScanner;
|
|
25
|
+
readonly contexts: readonly [];
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=dep-scanner.kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dep-scanner.kind.d.ts","sourceRoot":"","sources":["../../src/kinds/dep-scanner.kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAA8B,KAAK,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxJ,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,mBAAmB,EAAE,KAAK,aAAa,EAAE,0BAA0B,EAAE,KAAK,oBAAoB,EAAE,uBAAuB,EAAE,KAAK,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAGrO,cAAM,wBAAyB,YAAW,iBAAiB;IACzD,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;gBAE9B,UAAU,EAAE,oBAAoB;IAItC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAStD;AAED,iBAAS,iBAAiB,CACxB,UAAU,EAAE,oBAAoB,EAAE,GACjC,oBAAoB,GAAG,SAAS,CAGlC;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;CAMmD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DepScannerDescriptorSchema } from "../schemas/contracts/dep-scanner.js";
|
|
2
|
+
export { IOCEntrySchema, DepScanReportSchema, DepScannerDescriptorSchema, DepScannerServiceSchema } from "../schemas/contracts/dep-scanner.js";
|
|
3
|
+
class DefaultDepScannerService {
|
|
4
|
+
descriptor;
|
|
5
|
+
constructor(descriptor) {
|
|
6
|
+
this.descriptor = descriptor;
|
|
7
|
+
}
|
|
8
|
+
async scan(_manifest) {
|
|
9
|
+
return {
|
|
10
|
+
verdict: 'unknown',
|
|
11
|
+
findings: [],
|
|
12
|
+
scannedAt: new Date().toISOString(),
|
|
13
|
+
packagesChecked: 0,
|
|
14
|
+
scannerAvailable: false,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function resolveDepScanner(candidates) {
|
|
19
|
+
const enabled = candidates.filter((d) => d.enabled !== false);
|
|
20
|
+
return enabled[0];
|
|
21
|
+
}
|
|
22
|
+
export const securityDepScannerKind = {
|
|
23
|
+
id: 'security/dep-scanner',
|
|
24
|
+
descriptorSchema: DepScannerDescriptorSchema,
|
|
25
|
+
defaultImplementation: DefaultDepScannerService,
|
|
26
|
+
resolve: resolveDepScanner,
|
|
27
|
+
contexts: [],
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=dep-scanner.kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dep-scanner.kind.js","sourceRoot":"","sources":["../../src/kinds/dep-scanner.kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,0BAA0B,EAAqD,MAAM,qCAAqC,CAAC;AACxJ,OAAO,EAAE,cAAc,EAAiB,mBAAmB,EAAsB,0BAA0B,EAA6B,uBAAuB,EAA0B,MAAM,qCAAqC,CAAC;AAGrO,MAAM,wBAAwB;IACnB,UAAU,CAAuB;IAE1C,YAAY,UAAgC;QAC1C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,SAAiB;QAC1B,OAAO;YACL,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,eAAe,EAAE,CAAC;YAClB,gBAAgB,EAAE,KAAK;SACxB,CAAC;IACJ,CAAC;CACF;AAED,SAAS,iBAAiB,CACxB,UAAkC;IAElC,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC;IAC9D,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,EAAE,EAAE,sBAAsB;IAC1B,gBAAgB,EAAE,0BAA0B;IAC5C,qBAAqB,EAAE,wBAAwB;IAC/C,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,EAAE;CACwE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type FreshnessInput } from '../schemas/contracts/freshness-policy.ts';
|
|
2
|
+
import { type FreshnessVerdict, type FreshnessPolicyDescriptor, type FreshnessPolicyService } from '../schemas/contracts/freshness-policy.ts';
|
|
3
|
+
export { FreshnessVerdictSchema, type FreshnessVerdict, FreshnessPolicyDescriptorSchema, type FreshnessPolicyDescriptor, FreshnessPolicyServiceSchema, type FreshnessPolicyService } from '../schemas/contracts/freshness-policy.ts';
|
|
4
|
+
declare class DefaultFreshnessPolicyService implements FreshnessPolicyService {
|
|
5
|
+
readonly descriptor: FreshnessPolicyDescriptor;
|
|
6
|
+
constructor(descriptor: FreshnessPolicyDescriptor);
|
|
7
|
+
evaluate(packageName: string, version: string, publishedAt: string): Promise<FreshnessVerdict>;
|
|
8
|
+
private assess;
|
|
9
|
+
evaluateMany(packages: FreshnessInput[]): Promise<FreshnessVerdict[]>;
|
|
10
|
+
}
|
|
11
|
+
declare function resolveFreshnessPolicy(candidates: FreshnessPolicyDescriptor[]): FreshnessPolicyDescriptor | undefined;
|
|
12
|
+
export declare const securityFreshnessPolicyKind: {
|
|
13
|
+
readonly id: "security/freshness-policy";
|
|
14
|
+
readonly descriptorSchema: import("zod/v4").ZodObject<{
|
|
15
|
+
id: import("zod/v4").ZodString;
|
|
16
|
+
kind: import("zod/v4").ZodLiteral<"security/freshness-policy">;
|
|
17
|
+
name: import("zod/v4").ZodString;
|
|
18
|
+
description: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
|
|
19
|
+
enabled: import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>;
|
|
20
|
+
tags: import("zod/v4").ZodOptional<import("zod/v4").ZodArray<import("zod/v4").ZodString>>;
|
|
21
|
+
hardware: import("zod/v4").ZodOptional<import("zod/v4").ZodArray<import("zod/v4").ZodEnum<{
|
|
22
|
+
consumer: "consumer";
|
|
23
|
+
cloud: "cloud";
|
|
24
|
+
}>>>;
|
|
25
|
+
minAgeHours: import("zod/v4").ZodDefault<import("zod/v4").ZodOptional<import("zod/v4").ZodNumber>>;
|
|
26
|
+
maxAgeDays: import("zod/v4").ZodOptional<import("zod/v4").ZodNumber>;
|
|
27
|
+
allowlist: import("zod/v4").ZodOptional<import("zod/v4").ZodArray<import("zod/v4").ZodString>>;
|
|
28
|
+
breakglass: import("zod/v4").ZodDefault<import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>>;
|
|
29
|
+
}, import("zod/v4/core").$strip>;
|
|
30
|
+
readonly defaultImplementation: typeof DefaultFreshnessPolicyService;
|
|
31
|
+
readonly resolve: typeof resolveFreshnessPolicy;
|
|
32
|
+
readonly contexts: readonly [];
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=freshness-policy.kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freshness-policy.kind.d.ts","sourceRoot":"","sources":["../../src/kinds/freshness-policy.kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC5H,OAAO,EAAE,KAAK,gBAAgB,EAAmC,KAAK,yBAAyB,EAAE,KAAK,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAC/K,OAAO,EAAE,sBAAsB,EAAE,KAAK,gBAAgB,EAAE,+BAA+B,EAAE,KAAK,yBAAyB,EAAE,4BAA4B,EAAE,KAAK,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAGrO,cAAM,6BAA8B,YAAW,sBAAsB;IACnE,QAAQ,CAAC,UAAU,EAAE,yBAAyB,CAAC;gBAEnC,UAAU,EAAE,yBAAyB;IAI3C,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIpG,OAAO,CAAC,MAAM;IAqBR,YAAY,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAG5E;AAED,iBAAS,sBAAsB,CAC7B,UAAU,EAAE,yBAAyB,EAAE,GACtC,yBAAyB,GAAG,SAAS,CAGvC;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;CAMwD,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { FreshnessInputSchema, FreshnessInputsSchema } from "../schemas/contracts/freshness-policy.js";
|
|
2
|
+
import { FreshnessPolicyDescriptorSchema } from "../schemas/contracts/freshness-policy.js";
|
|
3
|
+
export { FreshnessVerdictSchema, FreshnessPolicyDescriptorSchema, FreshnessPolicyServiceSchema } from "../schemas/contracts/freshness-policy.js";
|
|
4
|
+
class DefaultFreshnessPolicyService {
|
|
5
|
+
descriptor;
|
|
6
|
+
constructor(descriptor) {
|
|
7
|
+
this.descriptor = descriptor;
|
|
8
|
+
}
|
|
9
|
+
async evaluate(packageName, version, publishedAt) {
|
|
10
|
+
return this.assess(FreshnessInputSchema.parse({ name: packageName, version, publishedAt }));
|
|
11
|
+
}
|
|
12
|
+
assess({ name: packageName, version, publishedAt }) {
|
|
13
|
+
const now = new Date();
|
|
14
|
+
const pub = new Date(publishedAt);
|
|
15
|
+
const ageHours = Math.floor((now.getTime() - pub.getTime()) / (1000 * 60 * 60));
|
|
16
|
+
const policy = {
|
|
17
|
+
minAgeHours: this.descriptor.minAgeHours,
|
|
18
|
+
maxAgeDays: this.descriptor.maxAgeDays,
|
|
19
|
+
};
|
|
20
|
+
const isAllowlisted = this.descriptor.allowlist?.includes(packageName) ?? false;
|
|
21
|
+
if (isAllowlisted) {
|
|
22
|
+
return { packageName, version, publishedAt, ageHours, verdict: 'fresh', policy };
|
|
23
|
+
}
|
|
24
|
+
if (ageHours < this.descriptor.minAgeHours) {
|
|
25
|
+
return { packageName, version, publishedAt, ageHours, verdict: 'stale', policy };
|
|
26
|
+
}
|
|
27
|
+
if (this.descriptor.maxAgeDays && ageHours > this.descriptor.maxAgeDays * 24) {
|
|
28
|
+
return { packageName, version, publishedAt, ageHours, verdict: 'stale', policy };
|
|
29
|
+
}
|
|
30
|
+
return { packageName, version, publishedAt, ageHours, verdict: 'fresh', policy };
|
|
31
|
+
}
|
|
32
|
+
async evaluateMany(packages) {
|
|
33
|
+
return FreshnessInputsSchema.parse(packages).map(input => this.assess(input));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function resolveFreshnessPolicy(candidates) {
|
|
37
|
+
const enabled = candidates.filter((d) => d.enabled !== false);
|
|
38
|
+
return enabled[0];
|
|
39
|
+
}
|
|
40
|
+
export const securityFreshnessPolicyKind = {
|
|
41
|
+
id: 'security/freshness-policy',
|
|
42
|
+
descriptorSchema: FreshnessPolicyDescriptorSchema,
|
|
43
|
+
defaultImplementation: DefaultFreshnessPolicyService,
|
|
44
|
+
resolve: resolveFreshnessPolicy,
|
|
45
|
+
contexts: [],
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=freshness-policy.kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freshness-policy.kind.js","sourceRoot":"","sources":["../../src/kinds/freshness-policy.kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAuB,MAAM,0CAA0C,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annerResult, type ThreatMatch, } from './scanner.kind.ts';
|
|
2
|
+
export { securityRedactorKind, type SecurityRedactorDescriptor, type SecurityRedactorService, type SecurityRedactorResult, type RedactionMatch, type RedactionRule, } from './redactor.kind.ts';
|
|
3
|
+
export { securityPolicyKind, type SecurityPolicyDescriptor, type SecurityPolicyService, type PolicyOutcome, type PolicyEvaluationContext, type PolicyRule, } from './policy.kind.ts';
|
|
4
|
+
export { securityAuditorKind, type SecurityAuditorDescriptor, type SecurityAuditorService, type AuditEvent, type AuditQueryOptions, } from './auditor.kind.ts';
|
|
5
|
+
export { AuditEventSchema } from './auditor.kind.ts';
|
|
6
|
+
export { securityDepScannerKind, type DepScannerDescriptor, type DepScannerService, type DepScanReport, type IOCEntry, } from './dep-scanner.kind.ts';
|
|
7
|
+
export { securityIOCFeedKind, type IOCFeedDescriptor, type IOCFeedService, type IOCFeedEntry, type IOCFeedSyncStatus, } from './ioc-feed.kind.ts';
|
|
8
|
+
export { securityFreshnessPolicyKind, type FreshnessPolicyDescriptor, type FreshnessPolicyService, type FreshnessVerdict, } from './freshness-policy.kind.ts';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kinds/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,WAAW,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,oBAAoB,EACpB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,aAAa,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,UAAU,GACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,mBAAmB,EACnB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,iBAAiB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EACN,sBAAsB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,QAAQ,GACb,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACN,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,iBAAiB,GACtB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,2BAA2B,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,GACrB,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { securityScannerKind, } from "./scanner.kind.js";
|
|
2
|
+
export { securityRedactorKind, } from "./redactor.kind.js";
|
|
3
|
+
export { securityPolicyKind, } from "./policy.kind.js";
|
|
4
|
+
export { securityAuditorKind, } from "./auditor.kind.js";
|
|
5
|
+
export { AuditEventSchema } from "./auditor.kind.js";
|
|
6
|
+
export { securityDepScannerKind, } from "./dep-scanner.kind.js";
|
|
7
|
+
export { securityIOCFeedKind, } from "./ioc-feed.kind.js";
|
|
8
|
+
export { securityFreshnessPolicyKind, } from "./freshness-policy.kind.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/kinds/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,mBAAmB,GAMnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,oBAAoB,GAMpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,kBAAkB,GAMlB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,mBAAmB,GAKnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EACN,sBAAsB,GAKtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACN,mBAAmB,GAKnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,2BAA2B,GAI3B,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type IOCFeedEntry, type IOCFeedSyncStatus, type IOCFeedDescriptor, type IOCFeedService } from '../schemas/contracts/ioc-feed.ts';
|
|
2
|
+
export { IOCFeedEntrySchema, type IOCFeedEntry, IOCFeedSyncStatusSchema, type IOCFeedSyncStatus, IOCFeedDescriptorSchema, type IOCFeedDescriptor, IOCFeedServiceSchema, type IOCFeedService } from '../schemas/contracts/ioc-feed.ts';
|
|
3
|
+
declare class DefaultIOCFeedService implements IOCFeedService {
|
|
4
|
+
readonly descriptor: IOCFeedDescriptor;
|
|
5
|
+
constructor(descriptor: IOCFeedDescriptor);
|
|
6
|
+
sync(): Promise<IOCFeedSyncStatus>;
|
|
7
|
+
query(_packageName: string, _version: string): Promise<IOCFeedEntry[]>;
|
|
8
|
+
getStatus(): Promise<IOCFeedSyncStatus>;
|
|
9
|
+
}
|
|
10
|
+
declare function resolveIOCFeed(candidates: IOCFeedDescriptor[]): IOCFeedDescriptor | undefined;
|
|
11
|
+
export declare const securityIOCFeedKind: {
|
|
12
|
+
readonly id: "security/ioc-feed";
|
|
13
|
+
readonly descriptorSchema: import("zod/v4").ZodObject<{
|
|
14
|
+
id: import("zod/v4").ZodString;
|
|
15
|
+
kind: import("zod/v4").ZodLiteral<"security/ioc-feed">;
|
|
16
|
+
name: import("zod/v4").ZodString;
|
|
17
|
+
description: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
|
|
18
|
+
enabled: import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>;
|
|
19
|
+
tags: import("zod/v4").ZodOptional<import("zod/v4").ZodArray<import("zod/v4").ZodString>>;
|
|
20
|
+
hardware: import("zod/v4").ZodOptional<import("zod/v4").ZodArray<import("zod/v4").ZodEnum<{
|
|
21
|
+
consumer: "consumer";
|
|
22
|
+
cloud: "cloud";
|
|
23
|
+
}>>>;
|
|
24
|
+
maxStaleness: import("zod/v4").ZodDefault<import("zod/v4").ZodOptional<import("zod/v4").ZodNumber>>;
|
|
25
|
+
trustTier: import("zod/v4").ZodDefault<import("zod/v4").ZodOptional<import("zod/v4").ZodEnum<{
|
|
26
|
+
low: "low";
|
|
27
|
+
medium: "medium";
|
|
28
|
+
high: "high";
|
|
29
|
+
}>>>;
|
|
30
|
+
}, import("zod/v4/core").$strip>;
|
|
31
|
+
readonly defaultImplementation: typeof DefaultIOCFeedService;
|
|
32
|
+
readonly resolve: typeof resolveIOCFeed;
|
|
33
|
+
readonly contexts: readonly [];
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=ioc-feed.kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ioc-feed.kind.d.ts","sourceRoot":"","sources":["../../src/kinds/ioc-feed.kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAA2B,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACnK,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,uBAAuB,EAAE,KAAK,iBAAiB,EAAE,uBAAuB,EAAE,KAAK,iBAAiB,EAAE,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGtO,cAAM,qBAAsB,YAAW,cAAc;IACnD,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;gBAE3B,UAAU,EAAE,iBAAiB;IAInC,IAAI,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAMlC,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAMtE,SAAS,IAAI,OAAO,CAAC,iBAAiB,CAAC;CAK9C;AAED,iBAAS,cAAc,CACrB,UAAU,EAAE,iBAAiB,EAAE,GAC9B,iBAAiB,GAAG,SAAS,CAG/B;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;CAMgD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IOCFeedDescriptorSchema } from "../schemas/contracts/ioc-feed.js";
|
|
2
|
+
export { IOCFeedEntrySchema, IOCFeedSyncStatusSchema, IOCFeedDescriptorSchema, IOCFeedServiceSchema } from "../schemas/contracts/ioc-feed.js";
|
|
3
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
4
|
+
class DefaultIOCFeedService {
|
|
5
|
+
descriptor;
|
|
6
|
+
constructor(descriptor) {
|
|
7
|
+
this.descriptor = descriptor;
|
|
8
|
+
}
|
|
9
|
+
async sync() {
|
|
10
|
+
throw new CapabilityError('Compose an IOC feed implementation to access indicators.', 'UNAVAILABLE', {
|
|
11
|
+
reason: 'ioc-feed-unavailable',
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
async query(_packageName, _version) {
|
|
15
|
+
throw new CapabilityError('Compose an IOC feed implementation to access indicators.', 'UNAVAILABLE', {
|
|
16
|
+
reason: 'ioc-feed-unavailable',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async getStatus() {
|
|
20
|
+
throw new CapabilityError('Compose an IOC feed implementation to access indicators.', 'UNAVAILABLE', {
|
|
21
|
+
reason: 'ioc-feed-unavailable',
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function resolveIOCFeed(candidates) {
|
|
26
|
+
const enabled = candidates.filter((d) => d.enabled !== false);
|
|
27
|
+
return enabled[0];
|
|
28
|
+
}
|
|
29
|
+
export const securityIOCFeedKind = {
|
|
30
|
+
id: 'security/ioc-feed',
|
|
31
|
+
descriptorSchema: IOCFeedDescriptorSchema,
|
|
32
|
+
defaultImplementation: DefaultIOCFeedService,
|
|
33
|
+
resolve: resolveIOCFeed,
|
|
34
|
+
contexts: [],
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=ioc-feed.kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ioc-feed.kind.js","sourceRoot":"","sources":["../../src/kinds/ioc-feed.kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,uBAAuB,EAA+C,MAAM,kCAAkC,CAAC;AACnK,OAAO,EAAE,kBAAkB,EAAqB,uBAAuB,EAA0B,uBAAuB,EAA0B,oBAAoB,EAAuB,MAAM,kCAAkC,CAAC;AACtO,OAAO,EAAE,eAAe,EAAiC,MAAM,qBAAqB,CAAC;AAErF,MAAM,qBAAqB;IAChB,UAAU,CAAoB;IAEvC,YAAY,UAA6B;QACvC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,eAAe,CAAC,0DAA0D,EAAE,aAAa,EAAE;YACnG,MAAM,EAAE,sBAAsB;SAC/B,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,YAAoB,EAAE,QAAgB;QAChD,MAAM,IAAI,eAAe,CAAC,0DAA0D,EAAE,aAAa,EAAE;YACnG,MAAM,EAAE,sBAAsB;SAC/B,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,SAAS;QACb,MAAM,IAAI,eAAe,CAAC,0DAA0D,EAAE,aAAa,EAAE;YACnG,MAAM,EAAE,sBAAsB;SAC/B,CAAC,CAAC;IACL,CAAC;CACF;AAED,SAAS,cAAc,CACrB,UAA+B;IAE/B,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,C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