Security Incident Workflow Schema (evals/workflow-authority-schema.ts)

mastra · templates/template-security-incident-triage/src/mastra/evals/workflow-authority-schema.ts · typescript · Apache-2.0
security, automation, lang:typescript, fw:zod, tag:validation

Defines Zod schemas for security incident containment and authorization workflows. Use this to validate approval processes and containment actions in incident response systems.

// Source: https://github.com/mastra-ai/mastra | License: Apache-2.0 | Copyright 2025 Kepler Software, Inc
// Provided via justclaw.it.com; keep this notice with the code.
import { z } from 'zod';
import { opaqueId, sha256, utcTimestamp } from '../../schemas/common.js';
import { ContainmentActionTypeSchema } from '../../schemas/containment.js';

const scope = { tenant_id: opaqueId, incident_id: opaqueId };
const actionScope = { ...scope, plan_id: opaqueId, action_id: opaqueId };
const action = {
  action_type: ContainmentActionTypeSchema,
  target_id: opaqueId,
  input_hash: sha256,
};
export const approvalRow = z
  .object({
    ...scope,
    id: opaqueId,
    plan_id: opaqueId,
    plan_hash_version: z.literal(1),
    plan_hash: sha256,
    requested_at: utcTimestamp,
    expires_at: utc

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key