Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Passwords passed on the command line are not redacted

Aperta
#2,898 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
security

Direzione di ricerca

Start in the redact package and read TestString_MysqlShellShorthandIsNotRedacted, which the issue names as an existing test. Run that test and inspect how redact.String handles the command examples and pipeline segments. Done means the listed low-entropy passwords are redacted while the stated exceptions remain visible; the issue says a proposed fix already exists in a linked comparison, so check its status before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
What happened?

Low-entropy passwords given to clients on their command line reach the checkpoint unredacted, because they fall below the entropy threshold and no pattern layer matches them. TestString_MysqlShellShorthandIsNotRedacted already pins the --password= case as a known gap.

Examples that currently pass through redact.String unchanged:

  • mysql -u root -pSummer2026Release
  • docker login -u me -p Summer2026Release ghcr.io
  • sshpass -p Summer2026Release ssh user@host
  • redis-cli -a Summer2026Release
  • mongosh --password Summer2026Release
  • az login -p Summer2026Release
  • openssl enc -aes-256-cbc -pass pass:Summer2026Release
  • .netrc: machine host login me password Summer2026Release

Agents run commands like these constantly, so the password ends up in the transcript and then in the checkpoint.

I have a fix with tests here: https://github.com/entireio/cli/compare/main...DilpreetBansi:cli:redact-command-line-passwords

It redacts --password/--passwd/--pass on any command, the short password flags of the clients above (each anchored to its own command within one pipeline segment), and .netrc entry passwords. $PASSWORD, $(cat file), --password-stdin, placeholders, and unrelated flags like docker run -p or ssh -p stay visible. It also bumps configFingerprintVersion and updates docs/security-and-privacy.md. Happy to open a PR if this approach works for you.

Steps to reproduce
fmt.Println(redact.String("mysql -u root -pSummer2026Release mydb"))
// mysql -u root -pSummer2026Release mydb
fmt.Println(redact.String("docker login -u me -p Summer2026Release ghcr.io"))
// docker login -u me -p Summer2026Release ghcr.io
Entire CLI version

main @ 68c520d (built from source)

OS and architecture

No response

Agent

Any (the gap is in the redact package, independent of agent)

Terminal

No response

Logs / debug output

Additional context

No response

Lingua principale
Go
Stelle
5.1k
Fork
475
Merge medio
1g 17h
PR unite (30g)
212

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di entireio/cli

Tutte le issue di entireio/cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.