MCPcopy Create free account
hub / github.com/ShipSecAI/studio / analyticsResultSchema

Function analyticsResultSchema

packages/component-sdk/src/analytics.ts:17–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15export const severitySchema = z.enum(['critical', 'high', 'medium', 'low', 'info', 'none']);
16
17export const analyticsResultSchema = () =>
18 withPortMeta(
19 z
20 .object({
21 scanner: z.string().describe('Scanner/component that produced this result'),
22 finding_hash: z.string().describe('Stable 16-char hash for deduplication'),
23 severity: severitySchema.describe('Finding severity level, use "none" if not applicable'),
24 asset_key: z
25 .string()
26 .optional()
27 .describe('Primary asset identifier (auto-detected if missing)'),
28 })
29 .passthrough(), // Allow scanner-specific fields
30 { schemaName: analyticsResultContractName }
31 );
32
33export type AnalyticsResult = z.infer<ReturnType<typeof analyticsResultSchema>>;
34export type Severity = z.infer<typeof severitySchema>;

Callers 15

abuseipdb.tsFile · 0.90
nuclei.tsFile · 0.90
subfinder.tsFile · 0.90
prowler-scan.tsFile · 0.90
dnsx.tsFile · 0.90
virustotal.tsFile · 0.90
httpx.tsFile · 0.90
naabu.tsFile · 0.90
trufflehog.tsFile · 0.90
amass.tsFile · 0.90

Calls 1

withPortMetaFunction · 0.90

Tested by

no test coverage detected