[FR] API Keys Management and Security Controls
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 20/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- typescript
调研方向
The issue names no files, tests, or entry points. Start by locating the existing API-key, role/permission, and audit-log implementations, then clarify which single control should be scoped first. Done requires agreed acceptance criteria for the selected management or security feature, including its permissions and audit behavior.
由索引模型根据 Issue 内容生成。
描述
API Keys Management and Security Controls
Description
We appreciate using SourceBot EE for its integration with LLMs and advanced code search capabilities. However, we have significant security concerns around API key management that increase the risk of unauthorized data access, exfiltration, and could lead to supply chain compromission.
Note: SourceBot already provides audit logs (see docs), but we request enhanced coverage for API key management and alerting hooks.
Context and Security Concerns
Current API key management in SourceBot presents several critical security issues:
- API key misuse – a leaked
SOURCEBOT_API_KEYgrants full access to all MCP tools, without granular restrictions. - Visibility of API keys – admins cannot view or centrally monitor all keys created by users, making leaks and misuse harder to detect.
- No expiration or rotation – API keys persist indefinitely, increasing the blast radius of any compromise.
- Lack of granular permissions – all API keys have the same level of access regardless of user role or need.
- No approval workflows – sensitive permissions can be granted without oversight.
These concerns mean that controlling API key creation and usage is critical to prevent unintentional data exposure and maintain least privilege.
Requested Features
We request the following features to improve API key management and security:
1. Admin Dashboard for API Keys
- View all API keys with metadata (owner, creation date, last usage, permissions).
- Ability to revoke keys centrally.
- Expiration & rotation: support for short-lived keys with automatic rotation.
- Real-time monitoring of key usage patterns.
2. RBAC Control on API Key Creation
- Restrict key generation by role.
- Add approval workflows for sensitive permissions.
- Require justification for high-privilege key creation.
3. Granular Admin Rules & Scopes
- Define which roles/people can create keys.
- Restrict keys to specific MCP tools (e.g., allow
list_reposbut notget_file_source). - Enforce repository and file-level access policies.
- Time-based access controls (e.g., keys only valid during business hours).
4. Enhanced Auditability & Alerting
- Extend existing audit logs with detailed API key usage events.
- Provide alerting hooks for suspicious activity (e.g., unusual usage patterns, bulk operations).
- Integration with SIEM systems for centralized monitoring.
5. Key Lifecycle Management
- Automatic key rotation based on organizational policies.
- Key expiration notifications and renewal workflows.
- Emergency key revocation capabilities.
- Key usage analytics and reporting.
Security Benefits
Implementing these features would provide:
- Reduced attack surface through granular permissions and time-limited access
- Better incident response with centralized key management and monitoring
- Compliance support for organizations requiring strict access controls
- Risk reduction through approval workflows and usage monitoring
- Operational efficiency with automated rotation and lifecycle management
Conclusion
Robust API key management is essential for secure SourceBot deployment in enterprise environments. The current all-or-nothing approach creates unnecessary risk and makes it difficult to maintain least privilege principles. We request these features to enable secure, auditable, and manageable API key usage across the platform.
- 主要语言
- TypeScript
- 星标
- 3.9k
- 派生
- 374
- 平均合并
- 21 小时 18 分钟
- 30 天内合并 PR
- 39
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sourcebot-dev/sourcebot 的其他 Issue
-
bug triage needed
难度 2/5 1-3 小时 新手友好度 84/100
sourcebot-dev/sourcebot#1681 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
sourcebot-dev/sourcebot#1633 ·
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
sourcebot-dev/sourcebot#1384 · 4 条评论 ·
-
ask_sb bug
难度 2/5 1-3 小时 新手友好度 76/100
sourcebot-dev/sourcebot#1137 · 4 条评论 ·
-
bug triage needed
难度 3/5 1-2 天 新手友好度 48/100
sourcebot-dev/sourcebot#1661 · 1 条评论 ·
查看 sourcebot-dev/sourcebot 的全部 Issue
相似的 Issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
Crush 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
ElementsProject/cln-application#167 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Quantco/pnpm-licenses#17 ·
-
难度 2/5 1-3 小时 新手友好度 75/100