Read --json from stdin or a file, so request bodies stay out of process arguments

Abierto
#952 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
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
cli, security

Línea de trabajo

Start at the CLI argument handling for --json and --params, then reproduce the calendar command with stdin and a file input. Check how current JSON arguments are parsed and how CLI tests cover request bodies. Done means - reads stdin, @path reads a file, existing inline input still works, and request contents no longer appear in process arguments.

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

Descripción

Request bodies go in --json '<string>', so while the command runs, whatever is in them shows to every user on the machine through ps or /proc/<pid>/cmdline. For a calendar event that's the title, the description and the guest emails.

Could --json (and ideally --params) accept - to read from stdin, or @path to read a file, like curl's -d @file?

gws calendar events insert --params '{"calendarId": "primary"}' --json - < event.json

Context: I maintain an Omarchy calendar plugin that creates and edits events through gws, and a marketplace security review flagged this. I checked 0.13.2 and the changelog up to 0.22.5 and couldn't find a way around it, only the modelarmor helper reads stdin. If that approach works for you I can open a PR.

Lenguaje dominante
Rust
Estrellas
32.3k
Forks
2k
Merge medio
16 h 3 min
PR fusionados (30 d)
1

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 googleworkspace/cli

Todos los issues de googleworkspace/cli

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.