Audit CLI guardrails before GA
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 57/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- cli, documentation, security
调研方向
Start by locating where guardrails live: per-context commands.allowed/deny policies, the allow_context_override lock from #718, and the command_blocked error. Catalog them against the goal, then check docs/cli/configuration_reference.md, elastic help topics, and error/warning strings for language implying a security boundary. Done means each guardrail is classified enforceable/guardrail-only/misleading, docs say "guardrail", and follow-up issues or doc updates exist for anything misleading.
由索引模型根据 Issue 内容生成。
描述
The CLI ships several config-level guardrails, such as per-context command allow/deny policies and the allow_context_override lock proposed in #718. I'm concerned that they give CLI config authors a false sense of security.
The CLI runs as the same OS user as the caller, whether that caller is a person or an agent. Any control that lives in the CLI or its config file can be bypassed by someone with that access. The bypasses include:
- reading API keys straight from the config file and calling the API with
curl - setting
ELASTIC_CLI_CONFIG_FILE - writing a new config file
- editing the existing config file
Complete protection comes from outside the CLI:
- Server-side authorization: scope auth credentials to least privilege
- OS-level isolation: root-owned config files, containers, VMs. Credentials the caller shouldn't use don't belong in a file they can read.
Goal
Before the CLI reaches GA, we need to audit and discuss CLI guardrails that have been implemented to ensure:
- Every protection offered can be enforced, or is clearly documented as a guardrail only.
- No docs, help text, or error messages suggest a CLI-level control is a security boundary.
- Docs and error messages point CLI users to true security controls.
Non-goal: removing useful guardrails. They still help prevent mistakes. They just shouldn't be sold as any more than that. Anywhere guards introduce complexity increases the cost of maintenance.
Proposed work
- Catalog all guardrails the CLI provides.
- For each guardrail, decide which of these it is:
- Enforceable: it protects against something the CLI controls (input validation, confirmation).
- Guardrail only: prevents accidents or misuse, but can be bypassed by a caller with the same permissions.
- Misleading: its name or docs imply more than it delivers.
- Open issues with any fixes or improvements discovered in step 2.
- Add documentation encouraging security best practices, including:
- scoped API keys
- keeping creds for off-limits contexts where the user cannot reach them
- OS-level isolation
- Improve warnings and errors:
- Warn when a context with a
commands.allowedlist shares a config file with credentials for other contexts. - Link
command_blockederrors to the guidance above. - Update
elastic helptopics anddocs/cli/configuration_reference.mdto say "guardrail", not "security".
- Warn when a context with a
- Consider building a CLI helper for creating restricted API keys that can be stored in an isolated agent context, to promote more appropriate solutions to concerns like #700.
- 主要语言
- TypeScript
- 星标
- 51
- 派生
- 27
- 平均合并
- 1 天 19 分钟
- 30 天内合并 PR
- 50
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
elastic/cli 的其他 Issue
-
tracking
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
feat: ship skills/elastic/SKILL.md for agent invocation可能已有人在做 @onatozmenn 于 25 天前认领。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
tracking
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
Stale
难度 3/5 1-2 天 新手友好度 38/100
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
cloudscape-design/components#5184 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
JarX-Concepts/react-native-platform-components#130 ·
维护者通常 1 天内回复
-
fix(api): optimize-for-web /preview outer catches miss asDecoderOutOfMemory on V8 OOM and SIGKILL未关闭area: backend bug priority: low
难度 2/5 1-3 小时 新手友好度 83/100
snapotter-hq/SnapOtter#3773 ·
维护者通常 1 天内回复
-
ai-driven-qa ux-audit
难度 2/5 1-3 小时 新手友好度 78/100
linagora/twake-contacts-frontend#386 ·
维护者通常 1 天内回复
-
git: README should state plainly that without --repository every reachable repository is in scope未关闭documentation server-git v2
难度 1/5 1-3 小时 新手友好度 84/100
modelcontextprotocol/servers#5225 ·
维护者通常 1 天内回复