pySCG: Avoid pickle in most cases or at least warn
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 54/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- python
- Área
- documentation, security
Línea de trabajo
Start by finding the guide section that discusses pickle and compare its guidance with the linked Python documentation and the issue’s examples of safer alternatives. Add a clear warning about unpickling untrusted data and list practical alternatives or protections; done when readers can identify the risk and see safer options. The issue does not name a specific file or test.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The Python3 pickle documentation says the following:
The pickle module is not secure. Only unpickle data you trust. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling. Never unpickle data that could have come from an untrusted source, or that could have been tampered with. Consider signing data with hmac if you need to ensure that it has not been tampered with. Safer serialization formats such as json may be more appropriate if you are processing untrusted data. See Comparison with json.
However, many researchers and developers are quite clueless about the problem. Paws in the Pickle Jar: Risk & Vulnerability in the Model-sharing Ecosystem reports that, "Our analysis shows that more than 80% of the evaluated machine learning models in the ecosystem consist of pickle-serialized code, which is vulnerable to code injection / arbitrary code execution risks... The pickle module serializes the underlying source code into a byte stream that can’t be statically interpreted back to its true intention and functionality. This requires the user to implicitly trust the contents of the model file uploaded by the author. For this reason, HuggingFace encourages safe tensors as a replacement for PyTorch models, and Splunk supports import of ONNX-formatted models".
Providing a clear note about the problem, and listing several solutions, would be a big help.
- Lenguaje dominante
- Python
- Estrellas
- 2
- Forks
- 2
- Merge medio
- 11 min
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ossf/python-secure-coding-guide
-
pyscg-0051 should use a context managerPosiblemente ocupada @s19110 la tomó hace 8 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ossf/python-secure-coding-guide#1 · 4 comentarios · 1 asignado ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
ossf/python-secure-coding-guide#29 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Todos los issues de ossf/python-secure-coding-guide
Issues similares
-
README Quick Start query command fails, and doctor points to a missing Prerequisites sectionAbiertodocumentation type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
add entry to blockAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"Posiblemente ocupada @0z5a la tomó hoy. Abiertoneeds-triage
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
trace: Pi's 1-hour cache writes are priced at 1.25x, but billed at 2xPosiblemente ocupada @Shizoqua la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
microsoft/TokenEconomizer#221 ·
Los mantenedores suelen responder en 1 día
-
plot_graph crashes when a mesh node has no m2m edgePosiblemente ocupada @tygvi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
mllam/neural-lam#883 · 1 comentario ·
Los mantenedores suelen responder en 2 días