Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Same unconfined `predictions/<item_id>` path pattern remains in four benchmark rollouts

Abierto
#306 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@adongwanai ya está trabajando en esto.

Desde el 8/10/2026.

  • #309 de @adongwanai — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
security

Línea de trabajo

Start with the merged reference implementation in skillopt/envs/spreadsheetbench/rollout.py (_is_safe_task_id(), _confined_task_out_dir()), then decide whether to lift them into a shared helper. Apply the pattern to the listed call sites in skillopt/envs/docvqa/rollout.py:173,:232, livemathematicianbench/rollout.py:144, searchqa/rollout.py:204, and officeqa/rollout.py:530, keeping in mind livemathematicianbench's colon-shaped ids need an id-to-safe-dirname mapping rather than validation-and-reject. Any mapping must be applied on the read side too: skillopt/optimizer/slow_update.py:113 reads predictions/<task_id>/conversation.json. Done when ids like ../../x cannot escape out_root and existing rollouts plus the reader still resolve their own outputs.

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

Descripción

Follow-up from #264 (now merged). That PR validated the SpreadsheetBench task identifier and confined its persistent output directory. The same unconfined pattern remains in four other benchmark rollouts:

  • skillopt/envs/docvqa/rollout.py:173 and :232
  • skillopt/envs/livemathematicianbench/rollout.py:144
  • skillopt/envs/searchqa/rollout.py:204
  • skillopt/envs/officeqa/rollout.py:530

Each is os.path.join(out_root, "predictions", item_id), where item_id comes straight from the dataset item — no validation of the identifier and no containment check on the destination. An id such as ../../x therefore derives a destination outside out_root and processing continues into the model / code-execution path. skillopt/envs/spreadsheetbench/rollout.py now has _is_safe_task_id() and _confined_task_out_dir(), which could be lifted into a shared helper.

Two caveats are why this is filed rather than sent as a direct port:

  1. A charset validator is not sufficient for livemathematicianbench. Its ids are colon-shaped (202602:12), so all 177 ids across the shipped splits would be rejected by the SpreadsheetBench rule. Those runs need confinement by construction (map an id to a safe directory name) rather than validate-and-reject. Separately, an id containing : cannot be a Windows directory name at all, so those runs are already broken on Windows for an unrelated reason.

  2. Renaming the directory is not free. Readers look the task up by its raw id — skillopt/optimizer/slow_update.py:113 reads predictions/<task_id>/conversation.json — so any id-to-dirname mapping has to be applied on the read side too.

docvqa (63180), searchqa (hex) and officeqa (UID0003) use ids that are already safe shapes, so for those three the SpreadsheetBench approach can be applied as-is.

Filed separately because it is outside #264's reviewed scope.

Lenguaje dominante
Python
Estrellas
18.2k
Forks
1.7k
Merge medio
4 d 1 h
PR fusionados (30 d)
10

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 microsoft/SkillOpt

Todos los issues de microsoft/SkillOpt

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.