Create a Threat Model and Security Policy for CPython
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Documentação
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- python
- Domínio
- documentation, security
Direção de pesquisa
Comece revisando a estrutura do Devguide, a página existente „Security Considerations“, o SECURITY.md e as políticas vinculadas do Django e do curl. Defina as novas seções „Security Policy“ e „Threat Model“ e, em seguida, mapeie os tópicos listados sobre o interpretador, a linguagem, C API, threading e a biblioteca padrão para as atualizações da documentação. O trabalho estará concluído quando a política, os links para o threat model, a cópia no repositório e os links de aviso relevantes estiverem documentados como estando no escopo.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.mdandpython.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.
- Document an overall threat model with high-level details about the Python interpreter (envvars, options, trusted code), the Python language features (
Describe alternatives you have considered
No response
Additional context
Prior art:
- Django security policy: https://docs.djangoproject.com/en/dev/internals/security/
- curl security policy: https://github.com/curl/curl/blob/master/docs/VULN-DISCLOSURE-POLICY.md
- Linguagem predominante
- Python
- Estrelas
- 2.1k
- Forks
- 1k
- Merge médio
- 2d 12h
- PRs com merge (30d)
- 12
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de python/devguide
-
type-feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
type-feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
topic-building python type-feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
needs: decision topic-test type-bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
topic-dev process type-feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Todas as issues de python/devguide
Issues semelhantes
-
documentation help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
simonw/sqlite-utils#872 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100