registrystack / registrystack/registry-stack
bregctl refuses symlinked destinations such as macOS /tmp without naming the symlink
- 主要语言
- Rust
- 星标
- 2
- 派生
- 0
- 平均合并
- 2 小时 55 分钟
- 30 天内合并 PR
- 130
描述
Found while writing the public tutorial `Review BReg changes in Casework`.
## What Happened
`bregctl dev export-client --output ` refused a destination under `/tmp` on macOS:
```
path traverses a symbolic link
```
`/tmp` is a symlink to `/private/tmp` on macOS, so any temporary directory fails. `bregctl init` refuses the same destinations for the same reason (`crates/registry-bregctl/src/safe_path.rs`).
## Expected Behavior
If refusing symlinked paths is deliberate (it looks like a safety rule for files holding credentials), the message should name the component that is a symlink and the resolved path, so a macOS reader knows to use `/private/tmp` or a directory under `$HOME`. If it is not deliberate, canonicalise the destination parent before the check.
## Environment
Registry Stack 0.30.0 release binaries, macOS.
Triage: later.
贡献指南
调研方向
从 crates/registry-bregctl/src/safe_path.rs 开始,使用 bregctl dev export-client 和 bregctl init,并指定 macOS /tmp 下的目标来复现该失败。确定拒绝包含符号链接的路径是否是有意为之;完成的标准是错误信息列出符号链接和解析后的路径,或者在检查之前对目标的父目录进行规范化。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- cli, security
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100