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

security: read tools and the code index follow hard links to files outside the project

Abierto
#288 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
4/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
security

Línea de trabajo

Start with the listed entry points: native/sandbox-helper/src/file_ops/windows.rs:323, src/main/tools/files.ts:166, symbols.ts:70, and code_index.ts:311; compare the read paths with write_file, which already refuses hard-linked targets. Reproduce the confirmed Windows case where a project hard link points outside the project, then check that reads and indexing no longer expose the outside content. The issue does not name tests, so inspect nearby coverage for these paths.

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

Descripción

priority: low security severity: low

Found in the Oct 11 audit (at c5f5641).

Where: read_file via the helper's regular(file, false) (native/sandbox-helper/src/file_ops/windows.rs:323); grep (src/main/tools/files.ts:166) and find_definition/find_references (symbols.ts:70), which use plain readFile; the code index (code_index.ts:311).

Evidence (confirmed on Windows): with Proj/hl.txt hard-linked to outside/s.txt, grep, find_references and read_file returned the outside content. write_file refuses it ("hard-linked target").

Impact: content outside the project can be read and, through indexing, sent to the embedding service. Git cannot carry hard links, so an attacker needs another way to create one.

Fix: apply the nlink == 1 check to reads too, or at least to indexing.

Lenguaje dominante
TypeScript
Estrellas
2
Forks
2
Merge medio
8 h 28 min
PR fusionados (30 d)
26

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 PierrunoYT/patch

Todos los issues de PierrunoYT/patch

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.