security: the renderer can start a shell and edit instructions without a native confirmation

Cerrado
#157 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
electron, typescript
Área
desktop, security

Línea de trabajo

Start by reading src/main/index.ts:350-356 for terminal IPC and index.ts:279 for instruction edits, then inspect settings_confirm.ts to understand how autoConfirmed is persisted. The issue proposes native confirmation or a main-process-visible user gesture for terminal startup, confirmation for instruction edits, and a fresh prompt whenever Auto mode is enabled. Done means all three paths require the described native user confirmation; runtime IPC validation is tracked separately in #32.

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

Descripción

enhancement priority: low security severity: low

Found in the 2026-10-07 security audit. No XSS path was found, so this is defense in depth.

Problem

The renderer is effectively fully trusted:

  • terminal:start/terminal:write give any renderer script a real, unsandboxed shell (src/main/index.ts:350-356).
  • project:set-instructions writes text into the system prompt without native confirmation (index.ts:279).
  • settings_confirm.ts remembers autoConfirmed, so the renderer can turn Auto mode back on later in the same session without a new dialog.

Runtime IPC argument validation is tracked in #32.

Fix

  • Start the terminal only after a user gesture the main process can see (for example a native menu item or an accelerator), or confirm the first terminal:start of each project natively.
  • Confirm instruction edits, or show them in a native dialog.
  • Ask again whenever Auto mode is turned on.
Lenguaje dominante
TypeScript
Estrellas
2
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

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.

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.