Redact smb://, sftp:// and ssh:// paths in the trace scrub

Abierto Apto para principiantes
#853 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
83/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
security, testing

Línea de trabajo

Lee dokimi/repos/host_fingerprint.py e inspecciona _PATH; luego busca las pruebas existentes de saneamiento de rutas. Añade casos para smb://, sftp:// y ssh:// que cubran rutas simples, rutas entre comillas con espacios y esquemas en mayúsculas; conserva cada esquema y reemplaza su ruta por <path>. Ejecuta las pruebas pertinentes y confirma que todos los casos pasan.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

#781 redacts file: URLs and UNC paths in error text (_PATH in dokimi/repos/host_fingerprint.py). The trace scrub still lets other URL schemes through.

Probe on the _PATH regex from #781 (its sub with <path>):

  • cp smb://fileserver/share/Jane/secret.txt here is unchanged.
  • sftp://jdoe@host/home/jdoe/key is unchanged.
  • ssh://jdoe@host/home/jdoe/x is unchanged.
  • file:///home/jdoe/x becomes <path>, and so does \\srv\share\x.

The absolute-path branch excludes a / after : (the scheme: before //), and the UNC branch needs // not preceded by :, so the host and path after smb://, sftp:// and ssh:// are not redacted.

Ask: redact smb://, sftp:// and ssh:// paths in the trace scrub the way file:// is redacted (the scheme kept, the path replaced by <path>), with a test per scheme for a plain path, a quoted path with a space, and an uppercase scheme.

Follow-up to #781 (its path scrub handles file: and UNC only).

Lenguaje dominante
Python
Estrellas
39
Forks
13
Merge medio
1 d 10 h
PR fusionados (30 d)
519

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de intel/dokimi

Todos los issues de intel/dokimi

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.