boardx / boardx/boardx-dev-template

p30/F01 跟进:目录读面数据分级决策 + actor 自报/token_ref/测试host 加固

Open
#770 0 comments 0 reactions 0 assignees View on GitHub
area:coord
Dominant language
TypeScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

来源:#767 rev-security 审查(PASS,四条 🟡 非阻断)。

**需要人类拍板**(数据分级,非工程问题):任一单仓 scoped token 可读全平台 engineers(含 github_login)+ memberships 拓扑 + events 审计 payload,不按 `projects.visibility=private` 过滤。是否符合预期?若否需收窄读面。

**纵深防御跟进**(工程问题,不阻塞):
1. directory.\* 审计事件的 `actor` 字段由请求体自报、服务端零校验——当前单一 admin token 本就无法区分主体,但应在 schema/CHANGELOG 标注「不可信提示字段,非鉴权主体」;未来按人凭据接入后 actor 应从鉴权主体派生。
2. `enrollments.token_ref` 无格式校验,理论上可被误写入明文 token 并经读面回显——建议加长度上限/前缀格式校验,把「只存 hash 前缀」从注释变代码不变量。
3. `packages/coord-directory` 的独立测试 host(`src/index.ts`)对 `/directory/*` 写路径零鉴权直转 DO,仅靠注释约定「不会误部署到生产」——建议加 env 标志类 fail-closed 断言。

排入 p30 后续 sprint。

Contributor guide

No contributing guide indexed for this repository

Research direction

First resolve the data-classification question in the issue, since it determines whether the read surface should change. Then inspect the directory.* audit schema and CHANGELOG, enrollments.token_ref handling, and packages/coord-directory/src/index.ts; run the relevant package tests. Done means the trust boundary is documented, token references are constrained, and the test host fails closed when its deployment environment is unsafe.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design, security
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.