Container audit loses the repository identity: git refuses the mounted repo (dubious ownership)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 22
- Fork
- 27
- Merge trung bình
- 2 ngày 28 phút
- Pull request đã merge (30 ngày)
- 40
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của darnitdevorg/darnit
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
darnitdevorg/darnit#589 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
darnitdevorg/darnit#587 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
darnitdevorg/darnit#585 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
darnitdevorg/darnit#523 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
darnitdevorg/darnit#516 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của darnitdevorg/darnit
Issue tương tự
-
SSM GetParameter throttling during concurrent workflow launchesCó thể đã có người làm @alexiswl đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
-
[Bug] Dev image build fails: `npm install` in the root Dockerfile runs out of memory (exit 134)Có thể đã có người làm @andest01 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Rename FunctionalRole BOT_DEV to DEV_STAFFCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
pesu-dev/discord_bot#97 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
gradio-app/gradio#13964 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày