配置安全运行环境
这页带你从 initial access 走到 reviewed findings,以及 Codex Security 中的 remediation pull
这页带你从 initial access 走到 reviewed findings,以及 Codex Security 中的 remediation pull requests。
开始前,先确认已经设置 Codex Cloud。还没有的话,从 Codex Cloud 开始。
1. Access and Environment
Codex Security 会扫描通过 Codex Cloud connected 的 GitHub repositories。
先确认:
- workspace 已有 Codex Security access。
- 你想扫描的 repository 已在 Codex Cloud 中可用。
打开 Codex environments,检查该 repository 是否已有 environment。
如果没有,请先在那里创建 environment,再继续。
入口:
https://chatgpt.com/codex/settings/environments
2. New Security Scan
environment 存在后,打开 Create a security scan,并选择刚刚 connected 的 repository。
入口:
https://chatgpt.com/codex/security/scans/new
Codex Security 会先从 newest commits 往回扫描 repository。它用这种方式在 new commits 进入时构建和刷新 scan context。
配置 repository:
- 选择 GitHub organization。
- 选择 repository。
- 选择要 scan 的 branch。
- 选择 environment。
- 选择 history window。更长的 window 会提供更多 context,但 backfill 需要更长时间。
- 点击 Create。
3. Initial Scans Can Take a While
创建 scan 后,Codex Security 会先对 selected history window 运行 commit-level security pass。
initial backfill 可能需要几个小时,尤其是 larger repositories 或 longer windows。
如果 findings 没有立刻出现,这是 expected behavior。请等待 initial scan 完成后,再开 ticket 或 troubleshooting。
initial scan setup 是 automatic 且 thorough 的,可能需要几个小时。第一批 findings 延迟出现时,不需要紧张。
4. Review Scans and Improve the Threat Model
review scans 入口:
https://chatgpt.com/codex/security/scans
initial scan 完成后,打开 scan,review 自动生成的 threat model。
initial findings 出现后,更新 threat model,让它匹配你的 architecture、trust boundaries 和 business context。
这会帮助 Codex Security 为你的 team rank issues。
如果你希望 scan results 改变,可以编辑 threat model,更新 scope、priorities 和 assumptions。
initial findings 出现后,要 revisit model,让 scan guidance 持续对齐当前 priorities。
保持 threat model current,有助于 Codex Security 产出更好的 suggestions。
关于 threat models 如何影响 criticality 和 triage,见 Improving the threat model。
5. Review Findings and Patch
initial backfill 完成后,在 Findings view 中 review findings。
入口:
https://chatgpt.com/codex/security/findings
有两个 view:
- Recommended Findings:repo 中最 critical issues 的动态 top 10 list。
- All Findings:覆盖 repository 的 sortable、filterable findings table。
Recommended findings view:
https://developers.openai.com/codex/security/images/aardvark_recommended_findings.png
点击 finding 可以打开 detail page,其中包括:
- issue 的 concise description。
- commit details 和 file paths 等 key metadata。
- 关于 impact 的 contextual reasoning。
- relevant code excerpts。
- 可用时包含 call-path 或 data-flow context。
- validation steps 和 validation output。
你可以 review 每个 finding,并直接从 finding detail page 创建 PR。
review findings 并创建 PR 的入口:
https://chatgpt.com/codex/security/findings
相关文档
- Codex Security:product overview。
- FAQ:common questions。
- Improving the threat model:如何 improve scan context 和 finding prioritization。