Skip to content

Commit b332f51

Browse files
tae2089claude
andcommitted
Require bearer auth on /status
/status serializes sync-queue repo names, branches, and raw error strings; it was registered without the auth middleware that protects /mcp and /wiki/api/. /health and /ready stay open for probes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 448485d commit b332f51

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

internal/server/serve.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ func RunStreamableHTTP(rt *core.Runtime, srv *mcpgo.MCPServer, cfg Config, cache
112112
}
113113
return nil
114114
}))
115-
mux.Handle("/status", StatusHandler(dbReadyCheck, cfg.WebhookAttemptTimeout, func() *webhook.SyncQueue {
115+
// /status exposes repo names, branches, and raw error strings from the sync queue,
116+
// so it requires the same bearer auth as /mcp; /health and /ready stay open for probes.
117+
mux.Handle("/status", MCPAuthMiddleware(cfg.HTTPBearerToken, StatusHandler(dbReadyCheck, cfg.WebhookAttemptTimeout, func() *webhook.SyncQueue {
116118
return syncQueue
117-
}, postprocessSummary))
119+
}, postprocessSummary)))
118120

119121
if cfg.WikiDir != "" {
120122
wiki, err := wikiserver.New(wikiserver.Config{

0 commit comments

Comments
 (0)