GitHub review with DeepSeek Harness: DSH plugin webhook
The DeepSeek Harness github-review overlay adds a signed GitHub endpoint to dsh web: when a pull request in a configured repository moves from draft to ready for review, a rule creates a titled root Session under that repository's Web Workspace and starts a read-only review prompt — it listens on 127.0.0.1:3081 by default and authenticates with DSH_GITHUB_WEBHOOK_SECRET (source).
What the DeepSeek Harness GitHub review overlay is and what to prepare
This is an optional overlay that turns the "PR moves to formal review" event into an automatic read-only code review session; four prerequisites must be in place first (source). Check each one:
- Local checkout — prepare a repository directory that DeepSeek Harness can register as a Web Workspace. Expected: the overlay defaults to the launch directory as the Workspace, and you can also specify one explicitly.
- High-entropy webhook secret — generate a secret and reference it through the
DSH_GITHUB_WEBHOOK_SECRETcredential. Expected: the Secret on the GitHub side uses the same value. - Public entry point — prepare a TLS reverse proxy or tunnel that forwards a single public URL to the loopback listener. Expected: GitHub can reach your
/githubendpoint. - GitHub-side subscription — the webhook subscribes to the
Pull requestsevent with content typeapplication/json. Expected: only PR-related events are delivered.
Reviews read code and may use plugin capabilities. To give a review session plugins (skills or tools, for example), browse community plugins on DSH Plugin Hub, then merge them into the same profile as shown below.
Generate the secret, launch DeepSeek Harness, and expose the /github endpoint
Generate and fix the secret first, then launch with --patch to load the overlay; the main Web UI and /api stay on 3080 while the overlay attaches a second listener that registers only POST /github (source). Steps:
- Generate and save the secret — run
export DSH_GITHUB_WEBHOOK_SECRET="$(openssl rand -hex 32)", print it withprintf '%s\n' "$DSH_GITHUB_WEBHOOK_SECRET", and reuse the same value after a restart. Expected: a fixed secret makes signature verification stable. - Launch from a dev checkout — point
DSH_GITHUB_REVIEW_WORKSPACEat the repository, then runpnpm dsh web --patch apps/cli/config/examples/github-review/cordis.yml. Expected: the overlay loads and listens on 3081. - Use an absolute path for installed builds — run
dsh web --patch /absolute/path/to/github-review/cordis.yml. Expected: same result as the dev checkout. - Make it a permanent profile — put
github-ready-review-rule.mjsnext to$DSH_HOME/profiles/web/cordis.patch.yml, append the needed lines fromcordis.ymlinto that patch, then just rundsh web. Expected: the bundled CLI already includes both webhook packages, so only the overlay needs activating. - Expose the endpoint — the overlay mounts a second WebServer in an isolated realm, registering only
POST /githuband returning 404 elsewhere. Let a reverse proxy pass only that path, for example Caddy:
hooks.example.com {
route {
@github path /github
reverse_proxy @github 127.0.0.1:3081
respond 404
}
}
- Fill in the GitHub webhook — set Payload URL to
https://hooks.example.com/github, Content type toapplication/json, Secret to the value from the previous step, Events toPull requests, and turn Active on. Expected: the GitHub side is ready.
DeepSeek Harness GitHub review rule behavior and delivery semantics
The rule accepts only origin primary-github, repository deepseek-harness/deepseek-harness, event pull_request, and action ready_for_review; it passes the exact head SHA and selected PR fields to the review prompt and forbids changing files, branches, PRs, or GitHub state (source). Key points:
- Session parameters are read-only — the Session request selects the
standardagent preset and theread-onlypermission preset. Expected: the review reads but never writes, so it will not touch your code. - The workspace is normalized —
workspacePathis normalized throughWorkspaceRegistry.create(), and the first matching delivery creates the Workspace if it does not exist; later deliveries reuse it. Expected: the same repository reliably lands in the same workspace. 202is not a successful session — the HTTP response is deliberately weaker than the Agent result:202only means the signature and JSON were accepted and a rule invocation was scheduled in memory. Expected: do not read202as "Session created".- Delivery is stateless — the webhook runtime stores no delivery or execution state, so a duplicate delivery may create another Session, and a crash can lose a rule invocation that had not accepted a prompt. Expected: once the prompt is accepted, the work is owned by the normal Session logs, persistence, Workspace, and Agent lifecycle.
- It is programmable —
run()is ordinary trusted JavaScript that can query internal policy services before returning a Session request, or map a repository name to a different local path. Expected: useful for wiring in your own enterprise review policy.
Notes and common questions
- The secret is inbound-only:
DSH_GITHUB_WEBHOOK_SECRETverifies only data coming from GitHub; it grants no outbound GitHub access to rule code or the created Agent. Configure that separately if needed. - Watch for duplicate triggers: the stateless design means a redelivered event can add another session; mind GitHub's redeliveries.
- Keep ports apart: 3080 is the main Web UI and 3081 is the review overlay; use
DSH_GITHUB_WEBHOOK_PORTto change it. - Session logs and data location: review sessions are stored in the same session store; see Where DeepSeek Harness sessions are stored and how to query them.
- No outbound network: if DeepSeek Harness sits behind a proxy, both webhooks and model calls go through it; see Configure a network proxy for DeepSeek Harness.
Sources: Create review sessions via GitHub Webhook (official docs), dsh CLI README (official repo)
FAQ
DeepSeek Harness triggers GitHub auto-review through an optional overlay: when a pull request in a configured repository moves from draft to ready_for_review, a webhook rule creates a titled root Session under that repository's Web Workspace and starts a read-only review prompt.
Four prerequisites are needed for the DeepSeek Harness GitHub review setup: a local checkout that DeepSeek Harness can register as a Web Workspace, a high-entropy webhook secret stored as DSH_GITHUB_WEBHOOK_SECRET, a TLS reverse proxy or tunnel that forwards a public URL to the loopback listener, and a GitHub webhook subscribed to Pull requests with content type application/json.
The DeepSeek Harness GitHub review overlay defaults to the launch directory as the Workspace and listens on 127.0.0.1:3081 in an isolated realm, registering only POST /github; other paths return 404. The main Web UI and /api stay on 3080, and DSH_GITHUB_WEBHOOK_PORT or DSH_GITHUB_REVIEW_WORKSPACE can override.
No — a DeepSeek Harness webhook 202 only means the signature and JSON were accepted and a rule invocation was scheduled in memory. It does not mean the rule matched, and it does not mean a Session was created.
Yes — in DeepSeek Harness, the webhook runtime stores no delivery or execution state, so a duplicate delivery runs the rule again and may create another Session; a crash can also lose a rule invocation that had not accepted a prompt. Once the prompt is accepted, the work is owned by the normal Session lifecycle.
Related Terms
- overlay
- An overlay is a DeepSeek Harness configuration that adds capability without changing the main app; here it is the github-review config that adds a signed GitHub endpoint to dsh web.— DeepSeek Harness Documentation - Create review sessions via GitHub Webhook
- DSH_GITHUB_WEBHOOK_SECRET
- DSH_GITHUB_WEBHOOK_SECRET is the high-entropy secret DeepSeek Harness uses to verify inbound GitHub webhook signatures; export it in the launch environment and use the same value as GitHub's Secret. It only verifies inbound data and grants no outbound access.— DeepSeek Harness Documentation - Create review sessions via GitHub Webhook
- read-only permission preset
- The read-only permission preset is the DeepSeek Harness permission level that restricts the agent to reading; GitHub review sessions use it with the standard agent preset, forbidding changes to files, branches, PRs, or GitHub state.— DeepSeek Harness Documentation - Create review sessions via GitHub Webhook
- ready_for_review
- ready_for_review is a GitHub pull_request action meaning a PR moved from draft to ready for review; DeepSeek Harness rules accept only that action and check the repository and origin.— DeepSeek Harness Documentation - Create review sessions via GitHub Webhook
Sources
- DeepSeek Harness Documentation - Create review sessions via GitHub Webhook· deepseek-harness
- dsh CLI README· deepseek-ai