python / python/devguide

Create a Threat Model and Security Policy for CPython

未关闭
#1,803 2 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

topic-psrt type-feature
主要语言
Python
星标
2.1k
派生
1k
平均合并
2 天 12 小时
30 天内合并 PR
12

描述

Describe the enhancement or feature you would like

The Python Security Response Team is receiving higher volumes of reports, many of which are invalid or intensive to triage. We believe many of these reports use LLMs or security researchers not familiar with a programming language threat model, so more context would help in having fewer low-quality reports.

  • Create a new top-level "Security Policy and Threat Model" section to Devguide.
  • Security Policy
    • Document the expectations of security researchers submitting reports to the PSRT. Basic information, what to include (simple POC, optional fix).
    • Ask reporters to disclose what LLM model used, if any, to find the vulnerability. This informs us about how "public" this vulnerability may already be or whether a vulnerability is likely to be reported as a duplicate.
    • Explicitly note that security reports, even when private, the PSF Code of Conduct still applies for all communications and that this will be prioritized over technical merit of a vulnerability report.
    • Document a policy for using LLMs, such as requiring that prior to reporting all potential findings must be cross-checked against the threat model.
    • Failure to follow the security policy may result in reports not being accepted, regardless of technical merit.
    • Duplicate a general version of the security policy in SECURITY.md and python.org/dev/security.
  • Threat Model
    • Document an overall threat model with high-level details about the Python interpreter (envvars, options, trusted code), the Python language features (eval), C API, threading. This threat model will be duplicated in the main CPython repository (.github/THREAT_MODEL.md?) This file will also link out to the "Threat Model" devguide section.
    • For each standard library module of security-relevance, document an individual threat model where appropriate. Many standard library modules that are not intended for "production usage" will not accept security reports.
    • Update warning admonitions in the docs for each standard library module to link to their threat model page.
    • In the "Security Considerations" page for the Python standard library, move this content to the threat model and update links. This page feels like it wants to be both a threat model AND a "secure deployment" page. Maybe a future addition to the Python documentation.
Describe alternatives you have considered

No response

Additional context

Prior art:

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先查看 Devguide 的结构、现有的“Security Considerations”页面、SECURITY.md,以及链接的 Django 和 curl policy。定义新的“Security Policy”和“Threat Model”章节,然后将列出的 interpreter、language、C API、threading 和 standard-library 主题映射到文档更新。完成的标准是:已将 policy、Threat Model 链接、repository 副本和相关警告链接记录为属于范围内。

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

评估

技术栈
python
领域
documentation, security
Issue 类型
文档
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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