feat(forest mcp): make the mcp server ready to be used as a route instead of standalone#1350
Conversation
1 new issue
|
|
Total Coverage: Coverage tags mismatch: head has [] but base only has [] 🚦 See full report on Qlty Cloud »🛟 Help
|
ee18cdb to
7041221
Compare
|
|
||
| // Mount authorization and token handlers | ||
| app.use('/oauth/authorize', authorizationHandler({ provider: oauthProvider })); | ||
| // Body parsers MUST come before OAuth handlers because the token handler |
There was a problem hiding this comment.
this change do move the parser before oauth handlers, is that ok ?
PR Review SummaryOverviewThis PR introduces a new Critical Issues (4 found - Must Fix)
Important Issues (8 found - Should Fix)
Test Coverage Gaps (7 found)
Documentation Issues (3 found)
Strengths ✓
Recommended Fixes1. Fix Critical Issues First// forest-oauth-provider.ts:193 - Fix unsafe error access
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
throw new InvalidRequestError(`Failed to exchange authorization code: ${message}`);
}
// agent-caller.ts:9-15 - Add validation
const token = request.authInfo?.token;
const url = request.authInfo?.extra?.environmentApiEndpoint;
if (!token) throw new Error('Authentication token is missing');
if (!url || typeof url !== 'string') throw new Error('Environment API endpoint is missing');2. Address Security Issues
3. Add Missing TestsFocus on error paths with criticality ≥ 7/10 4. Update Documentation
🤖 Generated with Claude Code |
78510aa to
8bccafa
Compare
c059ee7 to
587c67d
Compare
…tead of standalone (#1350)
Definition of Done
General
Security