Add support for retrieving API token from secure storage (read from env var?)
还没有人认领这个 Issue。
评估
调研方向
首先检查 CLI 现有的令牌配置和获取流程,包括此处描述的配置文件和 configure 命令;issue 中没有指定文件或测试。确定通过环境变量或命令获取是否属于范围,然后为所选的优先级和安全存储行为补充覆盖测试。
由索引模型根据 Issue 内容生成。
描述
I like to store secrets in my password store, so that they're encrypted at rest.
The exercism CLI currently stores the user's token in plaintext in the user's config file.
A simple way to allow retrieving secrets from secure storage is to read the token from an env var if it's defined, falling back to reading it from local storage only when the env var is undefined. That would allow users to populate their secrets when and how they want, with whatever tools they like.
One idiom I often use is to prepend setting the secret env var to the command, which looks like this:
EXERCISM_API_TOKEN="$(pass show exercism_api_token)" exercism download --track javascript --exercise=factory-sensors
Another approach I've seen is to support configuring a command to retrieve the API token as needed, which allows for one-and-done configuration. That might look something like this:
exercism configure --token-cmd='pass show exercism_api_token'
Populating an env var is conceptually simpler and maybe more flexible, but puts more weight on the user to know how to use it. Users worrying about secure token storage are probably advanced, so the env var seems like the right answer to me.
Regardless of the exact approach, is there interest in adding support for secure API token storage?
- 主要语言
- Go
- 星标
- 1.4k
- 派生
- 364
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
exercism/cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 38/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 35/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
component/tests needs-triage
难度 2/5 1-3 小时 新手友好度 62/100
NVIDIA/nodewright#967 ·
维护者通常 1 天内回复
-
apm:ecosystem needs-triage
难度 2/5 1-3 小时 新手友好度 82/100
DataDog/dd-trace-go#5815 ·
维护者通常 2 天内回复
-
Build releases with Go 1.26.10+ for CVE-2026-111943 (eMudhra intermediate CA compromise)可能已有人在做 @zoezhangmattr 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 71/100
auth0/terraform-provider-auth0#1778 ·
维护者通常 2 天内回复
-
area:sampler tech-debt
难度 2/5 1-3 小时 新手友好度 72/100
jmbarzee/temporal-architect#302 ·
维护者通常 1 天内回复