docker-hub-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive Docker Hub repository webhooks. Use when building a Docker Hub push webhook receiver, because Docker Hub webhooks are UNSIGNED — there is no signature…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Docker Hub Webhooks
Docker Hub (hub.docker.com) is Docker Inc.'s container image registry. A Docker Hub repository webhook is configured per repository (repository → Webhooks tab → name + destination URL → Create) and fires on a push to that repository.
Two things make Docker Hub unlike most providers in this repo, and both must be reflected in your handler:
- There is no signature verification. None. No signature header, no shared secret, no HMAC, no timestamp, no token field, no auth option. The create form takes exactly two inputs — a name and a destination URL. You cannot verify that a POST came from Docker Hub.
- There is no event type. Docker Hub webhooks have exactly one trigger —
a push — and the payload carries no
event,typeoractionfield, and the request carries noX-...-Eventheader. Do not writeswitch (event.type). Route onrepository.repo_nameandpush_data.tag.
Scope note: this skill covers Docker Hub repository webhooks only. It does
not cover Docker Build Cloud, Docker Scout integrations, the self-hosted
distribution registry's notifications: endpoints (a different envelope, with
its own optional custom headers), GitHub Container Registry registry_package
webhooks, or Docker Engine events. Do not borrow payloads or auth from those.
When to Use This Skill
- How do I receive Docker Hub webhooks?
- How do I verify a Docker Hub webhook signature? (You can't — there is none.)
- Is there an
X-Docker-Signature/X-Hub-Signatureheader on Docker Hub webhooks? (No.) - How do I secure an unsigned Docker Hub push webhook endpoint?
- How do I read
push_data.tag,push_data.pusherandrepository.repo_name? - Which Docker Hub webhook event types exist? (One trigger, no event field.)
- What do I do with
callback_url? (Nothing — it is legacy and unsupported.) - How do I handle
dhi_metadataon a mirrored Docker Hardened Image repository? - Where is the image digest in the payload? (Not there — look it up via the Hub API.)
Verification (core): there is none — use a secret URL token
Docker Hub does not sign webhooks. Do not write an HMAC verifier, a signature-header check, a timestamp/replay window, or a shared-secret comparison against anything Docker Hub sends — none of those inputs exist, and inventing one produces a handler that only pretends to check. Docker also publishes no source-IP allowlist, so do not fabricate one.
The closest available control is a long random token you put in the URL you
register, compared in constant time. This is a bearer secret in a URL: Docker
Hub sees it, and it can leak through logs and proxies — rotate it and keep it
out of access logs. A path segment and a ?token= query param are equally
visible to Docker Hub; the path segment is a style preference, not a security
gain. If the token env var is unset, fail closed (500) — never accept.
const crypto = require('crypto');
// NOT a Docker Hub signature — Docker Hub signs nothing. This is your own
// secret, placed in the URL you registered and echoed straight back to you.
function verifyUrlToken(provided, expected) {
if (!expected) return null; // unset => caller MUST fail closed (500)
if (typeof provided !== 'string') return false;
const a = Buffer.from(provided);
const b = Buffer.from(expected);
// Guard length first: timingSafeEqual throws on a length mismatch.
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Then layer on the controls that actually matter for an unsigned source:
- Treat the payload as an untrusted hint, not a fact. Before deploying,
promoting or pulling, re-confirm against Docker Hub itself:
GET https://hub.docker.com/v2/namespaces/{namespace}/repositories/{repository}/tags/{tag}(operationIdGetRepositoryTag) and check the tag exists and itstag_last_pushed/ imagedigestare what you expect — and/or pull by digest rather than by tag. Auth: no header at all for a public repository; for a private one, a JWT obtained fromPOST /v2/auth/tokenwith{"identifier": "<username or org>", "secret": "<PAT or OAT>"}— a raw PAT/OAT is not itself a bearer token for the Hub API, and an unrecognised bearer value turns a public repo's200into a401. - Validate the shape defensively — require
push_data.tagandrepository.repo_nameas non-empty strings, reject malformed bodies with 400. - Allowlist expected repositories (
DOCKER_HUB_ALLOWED_REPOS) so someone who learns the URL cannot trigger actions for arbitrary repos.
See references/verification.md for the full rationale, the Hub API re-check, and the Hookdeck note.
The Payload
Documented example (from the
Установить docker-hub-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл docker-hub-webhooks?
Receive Docker Hub repository webhooks. Use when building a Docker Hub push webhook receiver, because Docker Hub webhooks are UNSIGNED — there is no signature header, no shared secret, no HMAC, no timestamp and no auth option, so signature verification is impossible and must be replaced with a secret URL token plus a re-check against the Docker Hub API. Use when parsing the push_data.tag / push_data.pusher / repository.repo_name payload, when handling the dhi_metadata object on mirrored Docker Hardened Image repositories, when asking why there is no event type field to switch on, or when wondering what to do about the legacy callback_url field.
Как установить скилл docker-hub-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл docker-hub-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic