What is the problem?
给 AI 工具新手看的 Codex 密钥安全指南:如何识别密钥、脱敏材料、限制工具可见范围、检查 diff、处理提交记录,并在高风险操作前暂停让人工确认。
Quick solution
Treat this as a Codex tutorial issue. First confirm the environment, inputs, permissions, logs, and delivery boundary. Then use the linked deep guide for the full checklist before changing production code or promising a result.
Read the deep guideDetailed steps
- 先保存客户原始需求,但不要把敏感附件直接导入工具。
- 列出项目会接触的材料:仓库、报错、截图、配置、日志、后台权限、部署平台。
- 用文本替换把真实密钥改成 `<redacted>`,只保留变量名、文件路径、报错行号和复现步骤。
- 运行 `git status`,确认工作区状态,避免把客户已有改动混进你的交付。
- 只让 Codex 读取和任务有关的文件,不把整个项目无限制丢给工具。
- 修改后看 diff,重点检查 `.env`、配置、日志、测试数据和文档里有没有真实敏感内容。
Commands or code
请只分析下面脱敏后的报错和文件片段。
不要要求真实 API key、数据库密码、账号密码或生产环境 token。
如果需要密钥、登录或授权,请把它列为“需要客户确认的事项”,不要继续编造。
请输出:
1. 可能原因
2. 需要检查的文件
3. 可以本地验证的步骤
4. 不能在没有授权时执行的动作Risk notes
Confirm the real project environment, account permissions, platform rules, and output quality before delivery. Do not ship AI-generated changes without human review, and do not claim indexing, income, deployment success, or ranking improvements without measured evidence.