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

Aberta
#952 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
68/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
rust
Domínio
cli, security

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
32.3k
Forks
2k
Merge médio
16h 3min
PRs com merge (30d)
1

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de googleworkspace/cli

Todas as issues de googleworkspace/cli

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.