Open
Conversation
- Add explicit type definitions for Feishu events (ImMessageReceiveV1Data, CardActionEventData) - Fix type casting issues in bot.ts for better TypeScript compatibility - Remove debug console.log statements from eventParsing.ts - Add 'feishu' to sentFrom type in messageService.ts and syncEngine.ts - Remove obsolete Windows startup scripts (start-hub-feishu.bat/.ps1) - Update FEISHU_SETUP.md documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enhance Feishu bot workflows with sticky session reuse, slash command passthrough, and richer session metadata in replies to make multi-session Claude usage reliable.
| fi | ||
|
|
||
| # Set environment variables for testing | ||
| export FEISHU_APP_ID="cli_a933a4feadb81cc9" |
There was a problem hiding this comment.
[BLOCKER] Hardcoded Feishu credentials committed. Secrets must not live in repo.
Suggested fix:
: "${FEISHU_APP_ID:?Set FEISHU_APP_ID}"
: "${FEISHU_APP_SECRET:?Set FEISHU_APP_SECRET}"
: "${FEISHU_VERIFICATION_TOKEN:?Set FEISHU_VERIFICATION_TOKEN}"
export FEISHU_APP_ID FEISHU_APP_SECRET FEISHU_VERIFICATION_TOKEN| return | ||
| } | ||
|
|
||
| const token = args[0] |
There was a problem hiding this comment.
[MAJOR] /bind accepts any token and only extracts namespace. This bypasses CLI_API_TOKEN validation and allows unauthorized namespace binding.
Suggested fix:
import { parseAccessToken } from '../utils/accessToken'
import { constantTimeEquals } from '../utils/crypto'
import { configuration } from '../configuration'
const parsed = parseAccessToken(args[0])
if (!parsed || !constantTimeEquals(parsed.baseToken, configuration.cliApiToken)) {
await this.replyToMessage(messageId, 'Invalid token. Use /bind <token>')
return
}
const namespace = parsed.namespace
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.
No description provided.