python / python/devguide

Create a Threat Model and Security Policy for CPython

Đang mở
#1,803 2 bình luận 3 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

topic-psrt type-feature
Ngôn ngữ chính
Python
Star
2.1k
Fork
1k
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
12

Mô tả

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:

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng việc xem xét cấu trúc Devguide, trang „Security Considerations“ hiện có, SECURITY.md và các policy của Django và curl được liên kết. Xác định các phần mới „Security Policy“ và „Threat Model“, sau đó ánh xạ các chủ đề được liệt kê về interpreter, language, C API, threading và standard-library vào các cập nhật tài liệu. Công việc được coi là hoàn tất khi policy, các liên kết đến threat model, bản sao trong repository và các liên kết cảnh báo liên quan được ghi lại là nằm trong phạm vi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
documentation, security
Loại issue
Tài liệu
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.