argo-cd-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and authenticate Argo CD notification webhooks. Use when setting up an endpoint for the Argo CD Notifications webhook service, adding a secret header…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Argo CD Webhooks
The Argo CD Notifications webhook service (service.webhook.<name> in argocd-notifications-cm)
sends a generic HTTP request when a trigger fires, for example a sync succeeds or an app's health
degrades. Requests are not signed, and there is no vendor event field: the body is whatever
your template renders. You authenticate a request with a header you add to the webhook service
(headers), and your endpoint compares it with the value you stored.
When to Use This Skill
- How do I receive Argo CD notification webhooks?
- Does Argo CD sign webhook requests? (No: use a shared secret header)
- How do I add a secret header in
argocd-notifications-cmand verify it? - Why does my Argo CD webhook arrive with no body? (The template's
bodyis empty, or Next.js dropped a GET body) - How do I handle sync-succeeded or health-degraded notifications?
Setup Note
Argo CD webhooks are not signed. Add a secret header to the webhook service (service.webhook.
Hookdeck's Argo CD source accepts only the methods you allow (custom methods): allow GET and POST, and PUT or PATCH if a template uses them. basicAuth on the Argo CD
service sends Authorization: Basic <base64(username:password)> on every request; to use it, enter
header name Authorization and the full Basic <base64> value.
Verification (core)
const crypto = require('crypto');
// Hash both sides: equal-length buffers, so timingSafeEqual never throws.
function safeEqual(a, b) {
const ha = crypto.createHash('sha256').update(String(a)).digest();
const hb = crypto.createHash('sha256').update(String(b)).digest();
return crypto.timingSafeEqual(ha, hb);
}
function verifyArgoCdRequest(
headers,
secret = process.env.ARGO_CD_WEBHOOK_SECRET,
headerName = process.env.ARGO_CD_WEBHOOK_HEADER || 'Authorization'
) {
if (!secret) return false; // never accept when unconfigured
const received = headers[headerName.toLowerCase()]; // exact, whole value (no Bearer parsing)
return Boolean(received) && safeEqual(received, secret);
}
- The header name is user-chosen (
service.webhook.<name>.headers). Read it fromARGO_CD_WEBHOOK_HEADER(defaultAuthorization); the expected value isARGO_CD_WEBHOOK_SECRET, the whole header value including anyBearerprefix you typed. Do not strip or parse the prefix. - Return
401for a missing header or a mismatch,400for a body that isn't a JSON object,200once handled. An empty body is a valid200. GET requests carry the template body too. - A static shared credential authenticates the sender, not the body, and gives no replay protection (no signature, no timestamp). Use HTTPS and rotate the credential if it leaks.
- Accept
GET,POST,PUT,PATCHandDELETEon the route and check the credential first for every method. Read the body raw (express.raw({ type: '*/*' })) and parse it only after the check.
For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.
Configuration Example
data:
service.webhook.deploy-events: |
url: https://your-app.example.com/webhooks/argo-cd
headers:
- name: Authorization
value: $webhook-secret # key in argocd-notifications-secret
template.sync-succeeded-webhook: |
webhook:
deploy-events:
method: POST
body: |
{"trigger": "on-sync-succeeded", "app": "{{.app.metadata.name}}",
"sync_status": "{{.app.status.sync.status}}", "health": "{{.app.status.health.status}}"}
trigger.on-sync-succeeded: |
- when: app.status.operationState.phase in ['Succeeded']
send: [sync-succeeded-webhook]
See references/setup.md for the Secret and the subscription annotation.
Illustrative Payload
Argo CD has no event field. The examples handle an illustrative payload whose trigger
field is written by your own template, so rename it to suit your setup.
trigger (illustrative) |
Sent When |
|---|---|
on-sync-succeeded |
The sync operation phase is Succeeded |
on-sync-failed |
The sync operation phase is Error or Failed |
on-health-degraded |
The app's health status is Degraded |
Environment Variables
ARGO_CD_WEBHOOK_HEADER=Authorization # header name you added to the webhook service
ARGO_CD_WEBHOOK_SECRET=Bearer your-shared-secret # exact, whole header value
Local Development
Argo CD can't reach localhost. Tunnel with the Hookdeck CLI (no account required):
npx hookdeck-cli listen 3000 argo-cd --path /webhooks/argo-cd
Use the printed URL as the
Установить argo-cd-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл argo-cd-webhooks?
Receive and authenticate Argo CD notification webhooks. Use when setting up an endpoint for the Argo CD Notifications webhook service, adding a secret header in argocd-notifications-cm, handling GET or POST requests with an empty or templated body, or debugging 401s for sync-succeeded and health-degraded notifications.
Как установить скилл argo-cd-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл argo-cd-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub