filecache: TestGetFileToPublishedCopyIsWriteProtected fails when tests run as root
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #2703 di @cloudonly — chiusa senza merge
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 65/100
Direzione di ricerca
Il test che fallisce è TestGetFileToPublishedCopyIsWriteProtected nel pacchetto filecache. Controlla come i test fratelli TestEvictUnusedRemovalFailureIsNotCountedFreed e TestEvictUnusedRetireFailureIsNotCountedFreed vengono saltati quando os.Geteuid() è 0, e aggiungi la stessa protezione. Il lavoro è completo quando il test viene saltato sotto root e continua a passare se eseguito da un utente senza privilegi. La issue #2703 è indicata come correzione, quindi verifica che non sia già in corso prima di iniziare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
TestGetFileToPublishedCopyIsWriteProtected asserts that a write through the consumer's hard link to a published cache entry fails. That depends on the published copy's mode bits, which root ignores, so the write succeeds and the test fails even though the tripwire is intact.
The sibling tests that depend on the same property already skip in this case (TestEvictUnusedRemovalFailureIsNotCountedFreed and TestEvictUnusedRetireFailureIsNotCountedFreed in the same package, plus the permission-sensitive tests in cmd/atelet). This one was missed.
GitHub Actions runs the unit tests as the unprivileged runner user, so CI stays green. The failure shows up anywhere go test runs as root: a root developer machine, or the common case of running the tests inside a container image that defaults to root.
The proposed fix is the same three-line os.Geteuid() == 0 skip the sibling tests use. I verified it on a Linux host: the test is skipped as root, and it still passes (the write is rejected) when run as an unprivileged user.
Fix: #2703
- Lingua principale
- Go
- Stelle
- 5.7k
- Fork
- 612
- Merge medio
- 2g 14h
- PR unite (30g)
- 533
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la 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 agent-substrate/substrate
-
[Low] CSI plugin builds staging directories from storage_volume_id without a containment checkApertaarea/security kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
agent-substrate/substrate#2935 ·
I maintainer di solito rispondono entro 1 giorno
-
area/security kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
agent-substrate/substrate#2932 ·
I maintainer di solito rispondono entro 1 giorno
-
[Low] guestVolumeSource can map host paths containing ".." outside the microVM guest shareForse già presa @jiayimeow l’ha presa 1 giorno fa. Apertaarea/security kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
agent-substrate/substrate#2920 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Low] setupImageVolumes builds host mount paths from vol.Name without a containment checkForse già presa @abhisheksharma2411 l’ha presa 1 giorno fa. Apertaarea/security kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
agent-substrate/substrate#2919 ·
I maintainer di solito rispondono entro 1 giorno
-
[Low] ate-api-server accepts client certificates chained to system roots when --pod-identity-ca-certs is unsetForse già presa @abhisheksharma2411 l’ha presa 1 giorno fa. Apertaarea/security kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
agent-substrate/substrate#2918 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di agent-substrate/substrate
Issue simili
-
automation models
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
mvanhorn/cli-printing-press#5146 ·
I maintainer di solito rispondono entro 1 giorno
-
.jsonc files are skippedApertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
alibaba/open-code-review#1800 ·
I maintainer di solito rispondono entro 1 giorno
-
kind/engineering needs-triage pulumi/registry R2 S2 Task
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno