webhook
webhook is a lightweight Go server for creating HTTP endpoints that trigger scripts or shell commands with rule-based request validation.
webhook is a lightweight, configurable server that exposes HTTP endpoints (hooks) which execute predefined commands on your machine. It is designed to receive a request, extract data from it, validate it against rules, and then run a command with arguments or environment variables derived from the request.
Key Features
- Configurable hooks via JSON or YAML files
- Pass request data (headers, query params, body/payload) to commands as arguments or environment variables
- Rule-based triggering to restrict when a hook runs (for example secrets, header/value matches)
- Supports GET/POST requests and limited multipart form-data parsing
- Optional HTTPS/TLS support via provided certificate and key
- Can parse the hook configuration file as a template
- Can run behind a reverse proxy and supports systemd socket activation
Use Cases
- Trigger deployments or build scripts from Git hosting events (for example push events)
- Run operational automation from chat tools via slash commands/outgoing webhooks
- Provide simple HTTP-to-script integrations for internal tooling
Limitations and Considerations
- Executes arbitrary commands by design; secure configuration and strict trigger rules are essential
- IP-based allowlisting may require enforcement at the reverse proxy when deployed behind one
webhook is a minimal, practical building block for automation where you want HTTP requests to safely trigger scripts. It fits well in CI/CD glue workflows and lightweight operational integrations without requiring a full workflow engine.




