Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

drata-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and authenticate Drata workflow webhooks sent by the "Send webhook" step. Use when building a Drata webhook receiver, securing it with a shared secret…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

Drata Webhooks

Drata doesn't have webhook subscriptions. A webhook is a step inside a Drata workflow: Settings → Workflows → Create Workflow → add a "Send webhook" step. When the workflow's trigger fires (for example, evidence linked to a control), Drata sends a POST to the URL you entered, with the headers and properties you configured.

This differs from most providers in three ways:

  1. There is no documented signature. Drata's help center describes authentication "as custom headers" and nothing else. It mentions that Drata uses Svix to send webhooks, but it documents no svix-* headers and no whsec_ signing secret, so don't build verification around them.
  2. You choose what's in the body. You pick the control and trigger properties to include. Every body has the base properties event_type, timestamp, organization_id and workspace.
  3. You choose the headers. Auth headers and extra context headers are set per step.

When to Use This Skill

  • How do I receive Drata webhooks?
  • How do I verify Drata webhook signatures? (You can't. Send a shared secret in a custom header instead.)
  • How do I set up the "Send webhook" step in a Drata workflow?
  • What does a Drata webhook payload look like? (event_type, timestamp, control_* fields.)
  • How do I handle CONTROL_EVIDENCE_LINKED or CONTROL_TEST_CHANGED_TO_FAIL?
  • Why does my Drata webhook arrive more than once? (Failed steps are retried up to three times.)

Verification (core): a shared secret custom header

In the Send webhook step, add a custom header with a long random value:

X-Webhook-Secret: 3f9c0e...a long random hex value...

The header name is your choice. Check it in constant time before you parse the body:

const crypto = require('crypto');

// NOT a Drata signature. This is a secret YOU put in the step's custom headers.
function verifyDrataSecret(headerValue) {
  const expected = process.env.DRATA_WEBHOOK_SECRET;
  if (!expected) throw new Error('DRATA_WEBHOOK_SECRET is not set'); // fail closed
  if (typeof headerValue !== 'string') return false;
  const a = Buffer.from(headerValue);
  const b = Buffer.from(expected);
  // Length check first: timingSafeEqual throws on a length mismatch.
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

// Express: verifyDrataSecret(req.get('X-Webhook-Secret'))

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Return 401 for a missing or wrong secret and 500 when the secret isn't configured, so the endpoint never accepts everything by accident. Read the body raw (express.raw({ type: '*/*' })) and parse JSON only after the check. See references/verification.md.

Payload

Drata documents the body as three groups of properties:

  • Base (always): event_type, timestamp, organization_id, workspace
  • Control properties (the ones you select): control_name, control_code, control_id, control_owners, control_readiness, control_description, control_approval_status, control_approvers, control_mapped_requirements, control_mapped_tests, control_evidence, control_policies, control_notes, control_custom_fields, control_workspace_name, control_workspace_id
  • Trigger-specific: e.g. evidence_name and linked_by for CONTROL_EVIDENCE_LINKED, test_name for CONTROL_TEST_CHANGED_TO_FAIL

Dates are ISO strings, booleans are true/false, and arrays (owners, etc.) are JSON. Drata's help center doesn't show a full example body, so treat any field you didn't select as absent.

Events (event_type values for control workflows)

event_type Fires when
CONTROL_DETAILS_UPDATED Control details are edited (updated_by)
CONTROL_READINESS_CHANGED_TO_NOT_READY A control becomes Not ready (date_changed)
CONTROL_READINESS_CHANGED_TO_READY A control becomes Ready (date_changed)
CONTROL_EVIDENCE_LINKED / CONTROL_EVIDENCE_UNLINKED Evidence is linked or unlinked
CONTROL_POLICY_LINKED / CONTROL_POLICY_UNLINKED A policy is linked or unlinked
CONTROL_TEST_MAPPED / CONTROL_TEST_UNMAPPED A test is mapped or unmapped
CONTROL_REQUIREMENT_MAPPED / CONTROL_REQUIREMENT_UNMAPPED A requirement is mapped or unmapped
CONTROL_TEST_CHANGED_TO_PASS / CONTROL_TEST_CHANGED_TO_FAIL A mapped test starts passing or failing
CONTROL_OWNER_UPDATED The control owner changes (new_control_owner, old_control_owner, updated_by)
CONTROL_MARKED_IN_SCOPE / CONTROL_MARKED_OUT_OF_SCOPE Scope changes (changed_by, date_changed)

Workflows for evidence, personnel and risks list their own trigger names: NEW_ARTIFACT_UPLOADED, LINKED_TO_CONTROL, UNLINKED_FROM_CONTROL, RENEWAL_PAST_DUE and UPCOMING_RENEWAL (evidence), `OUT_OF_COMPLIA

Полный SKILL.md на GitHub

Установить drata-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/webhooks/drata/route.tsexamples/nextjs/package.jsonexamples/nextjs/tsconfig.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл drata-webhooks?

Receive and authenticate Drata workflow webhooks sent by the "Send webhook" step. Use when building a Drata webhook receiver, securing it with a shared secret custom header (Drata documents no signing secret), handling event_type values like CONTROL_EVIDENCE_LINKED, CONTROL_READINESS_CHANGED_TO_NOT_READY or CONTROL_TEST_CHANGED_TO_FAIL, or debugging Drata compliance automation webhook deliveries.

Как установить скилл drata-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл drata-webhooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить drata-webhooks с