github / github/copilot-cli

Undocumented `logs/security/.security-key` file created in every working directory on startup

未关闭
#4,314 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:configuration area:sessions
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

# Description

Copilot CLI creates a `logs/security/.security-key` file in the current working directory as soon as a session starts. This happens in every directory, including a brand-new empty one, so it appears to be unconditional CLI startup behavior rather than something tied to a specific repo or project config.

I can't find this documented anywhere - not in the CLI config-directory reference, the command reference, or recent changelogs (checked back through v1.0.76). Filing this to understand what the file is for and whether it's expected to live in the project directory rather than `~/.copilot/`.

# Steps to reproduce

```bash
mkdir /tmp/test-copilot && cd /tmp/test-copilot && copilot
# exit the session
ls -la logs/security/
```

# Observed

```bash
harshit@Harshits-MacBook-Pro /tmp/test-copilot » ls -la logs/security
total 8
drwxr-xr-x@ 3 harshit wheel 96 Jul 31 10:52 .
drwxr-xr-x@ 3 harshit wheel 96 Jul 31 10:52 ..
-rw-------@ 1 harshit wheel 32 Jul 31 10:52 .security-key
```

The file contains 32 bytes of what appears to be binary/random data (confirmed via xxd), not human-readable text.

# Questions

1. What is this file used for (e.g., local encryption of session state, sandbox integrity verification, telemetry)?
2. Is it intentional that it's written under `/logs/security/` rather than under `~/.copilot/`? This means every project directory a user runs copilot in accumulates this file, which could easily get committed to version control if not gitignored.
3. Should this path be added to a default `.gitignore` suggestion, or documented in the config-directory reference alongside the other `~/.copilot/` contents?

# Environment

- Copilot CLI version: GitHub Copilot CLI 1.0.77
- OS: macOS 26.4 (25E246)
- Install method: I don't remember, I have been using copilot for a while now. The only change that happened is I recently updated the version.

贡献指南

打开贡献指南

调研方向

在空目录中运行提供的 mkdir、cd、copilot 和 ls 复现步骤,然后跟踪创建 logs/security/.security-key 的 CLI 启动路径。阅读报告中提到的 CLI 配置目录参考、命令参考和 changelog。完成的标准是确定该文件的用途和预期位置,并将相关行为修复或记录,同时提供任何 gitignore 指引。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli, documentation
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。