OpenAI 开源 Codex Security 代码扫描工具
OpenAI just open-sourced Codex Security
OpenAI 正式开源了 Codex Security,这是一个用于发现、验证和审查代码安全问题的 CLI 工具及 TypeScript SDK。开发者只需拥有 OpenAI 账号或 API 密钥,即可在 macOS、Linux 和 Windows 上运行扫描。该工具支持通过 gpt-5.6-sol 等模型进行深度推理,能识别 SQL 注入等漏洞,并支持将结果导出为 SARIF、CSV 或 JSON 格式。无论是本地开发还是 CI/CD 流程,Codex Security 都能集成其中,甚至提供 Docker 镜像以支持大规模批量扫描。它不仅能扫描整个仓库,还能针对特定路径或代码差异进行分析,帮助团队在提交前拦截高危问题。
Codex Security 是一个开源 CLI 和 TypeScript SDK,用于查找、验证和审查你拥有或有权评估的代码中的安全问题。
HN 评论区
25- dangelosaurus
Hey HN,我是 Michael,Promptfoo 的联合创始人,也是 OpenAI Codex Security CLI 项目的核心开发者之一。
感谢大家的关注以及对认证问题的反馈。我们刚刚开源了该项目,还有很多需要改进的地方。产品将会快速迭代。
如果你试用了它,非常希望能听到你的反馈:哪些地方做得好,哪些地方需要改进。欢迎在此提问。
CLI 文档:https://learn.chatgpt.com/docs/security/cli
编辑:如果你想帮助我们做得更好,我们正在招聘:https://openai.com/careers/full-stack-software-engineer-cybe...
- gregwebs
刚在一个小仓库上跑了一下。跑了快一个小时,然后被中断了。直接耗掉了我 Pro 套餐一半的周额度。
npx codex-security scan .
[00:00] Preparing scan
[00:00] Authentication: stored Codex credentials.
[00:03] Preparing scan
[01:20] Running scan
[01:20] Preflight: worker delegation supported (up to 8 worker slots).
[52:47] Running scan
codex-security: Could not save the Codex Security scan: Repository HEAD changed while the scan was running. Start a new scan.
codex-security: Partial output was kept at ...
- ryanto
嘿,看起来挺酷。我试着在一个小型开源库上跑了一下,结果如下:
$ codex-security scan .
[00:00] Preparing scan
[00:00] Authentication: stored Codex credentials.
[00:01] Preparing scan
[00:42] Running scan
[00:42] Preflight: worker delegation supported (up to 8 worker slots).
[41:03] Running scan
codex-security: This content was flagged for possible cybersecurity risk. If this seems wrong, try rephrasing your request. To get authorized for security work, join the Trusted Access for Cyber program: https://chatgpt.com/cyber
codex-security: Partial output was kept at /Users/ryan/.codex/state/plugins/codex-security/scans/framework/codex-security-framework-z7eNfr.
一点反馈:它跑了 40 多分钟,期间我完全不知道它在干什么,以为卡死了或者处于异常状态。而且,它消耗了我 25% 的周额度 :(
- punnerud
很少见到有公司专门提及 HN,感谢你们:“我们悄悄发布了开源版 Codex Security CLI,但在我们有机会在这里分享之前,Hacker News 的用户就已经发现了它……
- schrodinger
稍微跑个题,如果你愿意听的话……
我注意到,很多一年前会用 Python 或 Node 写的项目,现在都开始转向 Go、Rust 等语言了。
我的理论是:大家意识到 Python 对 Agent 来说优势不大。正如 Zep 所写,
- luciana1u
AI 公司出的安全工具,感觉就像纵火犯开的消防队。确实有用,但你难免会注意到,是谁从这些“火灾”中受益。
- varenc
这里非常有意思的一点是,大部分价值在于提供告诉 LLM 该做什么的英文 Skill 定义:https://github.com/openai/codex-security/tree/main/sdk/types...
其中的一些方法在其他场景下也可能有用。OAI 拥有足够的算力去尝试不同的 Prompt,我预计这些 Prompt 已经过了一定程度的优化。
- bakigul
更新:据我了解,这之前就已经作为 Codex 插件存在了。主要的新闻是 OpenAI 现在把它开源了,而且开发迭代速度依然很快。