pulumi-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Pulumi Cloud webhooks. Use when setting up Pulumi webhook handlers, debugging Pulumi-Webhook-Signature verification, or handling…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Pulumi Webhooks
When to Use This Skill
- How do I receive Pulumi Cloud webhooks?
- How do I verify the
Pulumi-Webhook-Signatureheader? - How do I tell a
stack_updatefrom adeploymentordrift_detectionwebhook? - Why is my Pulumi webhook signature verification failing, or why is there no signature header at all?
Setup note
Set a shared secret on the Pulumi webhook. Without one, deliveries are unsigned and fail verification.
Essential Code (USE THIS)
Pulumi Cloud sends Pulumi-Webhook-Signature: <hex> only when the webhook has a shared secret. The value is the bare lowercase hex HMAC-SHA256 of the raw request body, keyed with the secret's UTF-8 bytes. There is no prefix and nothing else is signed (no timestamp, no id).
Verification (Node.js)
const crypto = require('crypto');
// rawBody: Buffer of the exact request bytes (express.raw({ type: '*/*' }), not express.json)
function verifyPulumi(rawBody, signature, secret) {
if (!secret || typeof signature !== 'string') return false;
// 64 hex chars first: Buffer.from(x, 'hex') silently drops invalid characters
if (!/^[0-9a-f]{64}$/i.test(signature)) return false;
const expected = Buffer.from(crypto.createHmac('sha256', secret).update(rawBody).digest('hex'));
return crypto.timingSafeEqual(Buffer.from(signature.toLowerCase()), expected);
}
Verification (Python)
import hashlib, hmac, re
def verify_pulumi(raw_body: bytes, signature, secret: str) -> bool:
if not secret or not signature or not re.fullmatch(r"[0-9a-fA-F]{64}", signature):
return False
expected = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest().encode()
# bytes on both sides: str arguments to compare_digest raise TypeError on non-ASCII
return hmac.compare_digest(signature.lower().encode(), expected)
Pulumi's own docs disagree with themselves: the header table and the JavaScript, TypeScript and Go snippets say hex, but the docs' Python snippet base64-encodes the digest, and the JavaScript snippet on the ESC webhooks page doesn't run as printed. Use hex, as above. A missing, empty or malformed header, or a mismatch, is a 401.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
No replay window
No timestamp is signed, so there is nothing to check for freshness, and the examples don't invent one from unsigned headers or body fields. Pulumi doesn't guarantee delivery order and doesn't describe automatic retries (failed deliveries can be redelivered unchanged from the console), so make handlers idempotent.
Event Types
The body has no event-name field. Dispatch on the Pulumi-Webhook-Kind header:
Pulumi-Webhook-Kind |
Body says what happened in | Notes |
|---|---|---|
stack |
action (for example created) |
Stack created or deleted |
stack_update |
kind (update, refresh, ...) and result (succeeded, failed) |
Has updateUrl, resourceChanges, isPreview |
stack_preview |
kind and result |
Same shape as stack_update with isPreview: true |
deployment |
status (for example running) |
Has deploymentUrl, version, operation |
drift_detection |
status, driftDetected |
Has driftRunId, resourceChanges, referenceUrl |
drift_remediation |
status |
Has resourceChanges, referenceUrl |
policy_violation |
The examples log it; add a case to handle it | |
environment, environment_revision, environment_revision_tag, environment_tag, imported_environment_changed, environment_rotation |
action (environment, revision and tag kinds) |
Pulumi ESC environment kinds, from organization or environment webhooks; same headers and signature. The examples log them |
The subscription filters you tick in Pulumi Cloud (21 for stacks and deployments, such as update_succeeded and deployment_failed, and 13 for ESC environments) are not sent as such: the filter only decides which deliveries you get, and within a kind the body tells you the outcome. See references/overview.md.
Important Headers
| Header | Description |
|---|---|
Pulumi-Webhook-Signature |
Hex HMAC-SHA256 of the raw body. Only set if the webhook has a shared secret |
Pulumi-Webhook-Kind |
The event kind (stack, stack_update, ...) |
Pulumi-Webhook-ID |
Unique ID for each delivery, shown in the webhook's delivery logs. The docs don't say whether a redelivery keeps it |
Environment Variables
PULUMI_WEBHOOK_SECRET=your_shared_secret # the secret you set on the Pulumi webhook
Local Development
# Start tunnel (no account needed)
npx hookdeck-cli listen 3000 pulumi --path /webhooks/pulumi
Reference Materials
- references/overview.md - Pulumi Cloud webhook concepts,
Установить pulumi-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл pulumi-webhooks?
Receive and verify Pulumi Cloud webhooks. Use when setting up Pulumi webhook handlers, debugging Pulumi-Webhook-Signature verification, or handling stack_update, deployment, drift_detection and policy_violation events.
Как установить скилл pulumi-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pulumi-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic