fix: require bearer token auth on /trigger endpoint#11
Merged
mcheemaa merged 1 commit intoghostwright:mainfrom Mar 31, 2026
Merged
fix: require bearer token auth on /trigger endpoint#11mcheemaa merged 1 commit intoghostwright:mainfrom
mcheemaa merged 1 commit intoghostwright:mainfrom
Conversation
The /trigger endpoint accepted unauthenticated requests, allowing anyone with network access to port 3100 to submit arbitrary tasks and deliver responses to any Slack channel or user. Reuse the existing MCP AuthMiddleware to require operator scope, consistent with how /mcp and /webhook are protected. Closes ghostwright#9
mcheemaa
approved these changes
Mar 31, 2026
Member
mcheemaa
left a comment
There was a problem hiding this comment.
Clean fix, good test coverage. Thank you for catching this and putting together the PR. Merging now.
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/triggerendpoint, reusing the existingAuthMiddlewarefrom the MCP moduleoperatorscope (same asphantom_ask), returning 401 for missing/invalid tokens and 403 for insufficient scopeCloses #9
Test plan
tsc --noEmit)biome check)curl -X POST http://localhost:3100/trigger -d '{"task":"test"}' -H 'Content-Type: application/json'returns 401