Security: git access token is printed into pod logs by the Argo Workflows executor
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Inizia da cmd/argoworkflow/main.go intorno alla riga 157, dove viene stampato pluginOption dopo l'unmarshal, e segui dove e.option.Token viene popolato dal flag --token. O elimina le stampe di debug oppure assegna a option un String()/MarshalJSON che maschera Token, e controlla il fmt.Println(string(body)) alla riga 329 nell'handler HTTP. Fatto significa che nessun materiale credenziale raggiunge stdout da questi percorsi e il plugin continua a decodificare correttamente le sue opzioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
cmd/argoworkflow/main.go:157 prints the whole option struct to stdout:
opt := &pluginOption{Option: e.option}
if err = json.Unmarshal(p, opt); err != nil {
return
}
fmt.Println("option is", *opt.Option)
option has no custom String() method and contains the Token field (fed from --token, in the documented deployment stored in the sidecar ConfigMap). This means the git personal access token is written into pod logs in plaintext, visible to anyone with log read access (and shipped to any log aggregation).
For comparison, fmt.Println("send status", repo) on line 204 is safe only because pkg.RepoInformation happens to implement String() returning the repo path.
While fixing this, please also review the other debug prints in the HTTP handler (fmt.Println(string(body)) on line 329 dumps the full request payload).
Suggested fix
- Remove the debug prints, or redact: implement a
String()onoptionthat masksToken(e.g. keep first/last 2 chars). - Consider a lint rule / review checklist item against printing structs that carry credentials.
- Lingua principale
- Go
- Stelle
- 19
- Fork
- 3
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di LinuxSuRen/gogit
-
Docs: replace the real-looking access token in README examples and fix build status help textsForse già presa @linuxsuren-fs l’ha presa 7 giorni fa. Apertadocumentation good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
LinuxSuRen/gogit#90 ·
-
Bug: --token file://… content is not trimmed, trailing newline breaks authenticationForse già presa @linuxsuren-fs l’ha presa 7 giorni fa. Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
LinuxSuRen/gogit#87 ·
-
Bug: gogit checkout robustness: remotes[0] panic, wrong error message, empty version output, non-idempotent 0444 writesForse già presa @linuxsuren-fs l’ha presa 7 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
LinuxSuRen/gogit#86 ·
-
Bug: gogit checkout fails on repositories whose default branch is not masterForse già presa @linuxsuren-fs l’ha presa 7 giorni fa. Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
LinuxSuRen/gogit#85 ·
-
Bug: DingTalk notification builds JSON by string concatenation, echoes the token, leaks resp.Body and swallows errorsForse già presa @linuxsuren-fs l’ha presa 7 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
LinuxSuRen/gogit#84 ·
Tutte le issue di LinuxSuRen/gogit
Issue simili
-
[Bug]: Agent editor shows empty MCP selection mode as "All" while the backend treats it as noneForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
agentscope-ai/AgentTeams#1707 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
blinklabs-io/dingo#6714 ·
I maintainer di solito rispondono entro 1 giorno
-
kind/cleanup
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
kubernetes-sigs/kueue#19407 ·
I maintainer di solito rispondono entro 1 giorno
-
flaky-test
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno