Skip to main content
← Back to list
01Issue
FeatureOpenSwamp CLI
AssigneesNone

Relationships

#1632 swamp serve: webhook secrets should support @vault= resolution

Opened by stack72 · 8/13/2026

Problem

swamp serve webhook configuration supports @env= and @file= for secret resolution, but not @vault=. This means webhook HMAC secrets must be managed as raw environment variables or files on disk, bypassing the vault infrastructure that the rest of swamp uses for secret management.

When running swamp serve as a daemon, this forces operators to either manage env vars in launchd/systemd unit files or write raw secrets to the filesystem — both of which the vault system was designed to avoid.

Current behavior

In .swamp/serve.yaml:

webhooks:
  - route: /hooks/forgejo
    workflow: ci-dispatcher
    secret: "@env=FORGEJO_WEBHOOK_SECRET"  # works
    # secret: "@file=/etc/swamp/secret"    # works
    # secret: "@vault=forgejo:webhook-secret"  # not supported

The resolveSecret() function in src/serve/webhook.ts only handles @env= and @file= prefixes.

Proposed behavior

Add @vault=<vault-name>:<key> support to resolveSecret(), resolving the secret from the repo's vault at serve startup. Example:

webhooks:
  - route: /hooks/forgejo
    workflow: ci-dispatcher
    secret: "@vault=forgejo:webhook-secret"
    scheme: github

The vault infrastructure is already available at serve startup time — it just isn't wired into the webhook secret resolver.

Context

Discovered while building swamp workflows to replace Forgejo CI runners. The workflow expressions can already reference vault secrets via ${{ vault.get('forgejo', 'bot-token') }}, but the serve-layer webhook config cannot — creating an inconsistency where some secrets are vault-managed and others require separate file/env management on the host.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

8/13/2026, 1:47:28 AM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.