Skip to content

Feishu support#325

Open
MrHeB wants to merge 4 commits intotiann:mainfrom
MrHeB:feishu-support
Open

Feishu support#325
MrHeB wants to merge 4 commits intotiann:mainfrom
MrHeB:feishu-support

Conversation

@MrHeB
Copy link

@MrHeB MrHeB commented Mar 20, 2026

No description provided.

lingxiyang and others added 4 commits March 18, 2026 21:12
增加飞书支持
- 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.
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review mode: initial
Issues found: hardcoded Feishu credentials in hub/test-feishu.sh; Feishu /bind token not validated.
Testing: Not run (automation).

fi

# Set environment variables for testing
export FEISHU_APP_ID="cli_a933a4feadb81cc9"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants