Container audit loses the repository identity: git refuses the mounted repo (dubious ownership)
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
- 52/100
Línea de trabajo
Start with the container setup in the image built from the #519 branch and docs/install/container.md; reproduce the documented docker run command and check how the audit obtains the mounted repository’s Git remote as uid 10001. Compare the confirmed safe.directory=/repo workaround with running as the host uid, and review the ownership implications before choosing a fix. Done means the documented container command identifies the repository and platform checks use its owner and name.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
With the documented command, docker run --rm -v "$PWD:/repo" <image> audit, on Linux:
Platform API call /repos//repo/releases?per_page=5 could not be measured (unavailable)
handler github_branch_protection needs owner/repo (from context or config)
Trust: unknown repository untrusted (no repository identity)
The owner is empty and the name is the mount directory (repo), so every platform check fails.
The cause is the container runs as uid 10001. The mounted repository belongs to the host user. git refuses it:
$ git -C /repo remote get-url origin
fatal: detected dubious ownership in repository at '/repo'
Confirmed workaround
docker run --rm -v "$PWD:/repo" \
-e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory -e GIT_CONFIG_VALUE_0=/repo \
<image> audit
With this, git returns the remote and the audit calls /repos/darnitdevorg/darnit/....
Possible fix
Set safe.directory=/repo in the image (Dockerfile ENV or the entrypoint). This turns off git's ownership check for the mounted repo, so it is worth a short look at what a hostile .git/config could do inside the container. The alternative is to document --user "$(id -u):$(id -g)", which I have not tested.
Related
- #579 stops the
/repos//namecall when the identity is empty. It does not give the container the identity. docs/install/container.mddoes not say that platform checks need-e GH_TOKEN.
Seen on RHEL 10 with podman (rootful), image built from the #519 branch.
- Lenguaje dominante
- Python
- Estrellas
- 22
- Forks
- 27
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 39
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de darnitdevorg/darnit
-
needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
darnitdevorg/darnit#589 ·
Los mantenedores suelen responder en 1 día
-
needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
darnitdevorg/darnit#587 ·
Los mantenedores suelen responder en 1 día
-
needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
darnitdevorg/darnit#585 ·
Los mantenedores suelen responder en 1 día
-
quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
darnitdevorg/darnit#523 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
darnitdevorg/darnit#516 ·
Los mantenedores suelen responder en 1 día
Todos los issues de darnitdevorg/darnit
Issues similares
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunkPosiblemente ocupada @rodricksz4h5 la tomó hoy. Abiertoarea/streaming comp/gateway P2 type/security
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NousResearch/hermes-agent#138245 ·
Los mantenedores suelen responder en 1 día
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS stepPosiblemente ocupada @github-actions la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
correction metadata
Dificultad 2/5 Menos de una hora Aptitud para principiantes 68/100
acl-org/acl-anthology#10378 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom namePosiblemente ocupada @12YYCCYY16 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
prowler-cloud/prowler#13033 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
graygarbage/HermesKey#23 ·