darnit audit silently resolves upstream and never prints the audited repo
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cli, github, python
- Lĩnh vực
- cli, developer-experience
Hướng nghiên cứu
Bắt đầu với packages/darnit/src/darnit/core/utils.py, đặc biệt là detect_repo_from_git và detect_owner_repo, sau đó tìm cmd_audit và nhật ký kiểm tra hiện tại của nó. Giữ lại nguồn remote đã phát hiện khi phân giải repository và đưa owner/repo đã phân giải cùng nguồn vào đầu ra kiểm tra. Chạy các bài kiểm thử CLI kiểm tra liên quan; hoàn tất khi người dùng có thể biết repository và remote nào đã được kiểm tra.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
darnit audit <path> auto-detects owner/repo preferring the upstream remote, and never prints which owner/repo it resolved. On a fork checkout (both origin and upstream present), the live checks target upstream — potentially a different repo than the one the user is working in — with no indication in the output.
Steps to Reproduce
- Clone a fork so the checkout has both
origin(your fork) andupstreamremotes. - Run
darnit audit <path>with authenticatedgh. - Inspect which
owner/repothe livegh apichecks target.
Expected Behavior
The audit output states the resolved owner/repo and which remote it came from, so it's obvious which repository was audited.
Actual Behavior
The checks target upstream silently; the CLI logs only Auditing {path} with {N} controls. Details:
packages/darnit/src/darnit/core/utils.py:186, :302—prefer_upstream: bool = True.utils.py:231—remotes = ["upstream", "origin"] if prefer_upstream else ["origin", "upstream"].cmd_auditcallsdetect_owner_repo(str(repo_path))with no override and prints no repo identity.
The information already exists internally: detect_repo_from_git returns a source field (utils.py:263, 275), but the detect_owner_repo wrapper (:299) collapses it to (owner, repo) and the CLI discards it.
Environment
- darnit version:
main@86f9cfa - Python version: 3.12 (uv-managed)
- OS: any
Additional Context
Suggested fix (visibility only): print the resolved owner/repo + source remote at the top of audit output. A new --owner/--repo flag is likely unnecessary — the origin-preference path (prefer_upstream=False) already resolves origin correctly.
- Ngôn ngữ chính
- Python
- Star
- 22
- Fork
- 27
- Merge trung bình
- 4 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 75
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
-
ci needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
darnitdevorg/darnit#607 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
good first issue maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
darnitdevorg/darnit#587 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Container image has no zizmor, so OSPS-AC-04.02 always reports missing_toolCó thể đã có người làm @mlieberman85 đã nhận 20 ngày trước. Đang mởinfrastructure module-baseline
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
darnitdevorg/darnit#585 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
documentation module-core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
darnitdevorg/darnit#196 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
module-core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
darnitdevorg/darnit#195 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của darnitdevorg/darnit
Issue tương tự
-
docs size:S
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
strawberry-graphql/strawberry#4794 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dataforgoodfr/cetolog#21 ·
-
security_citations_test fails against ecc 2026.11.6: SECURITY.md quotes ecc v2026.11.2's linesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
btclib-org/btclib#2932 ·
Maintainer thường phản hồi trong vòng 1 ngày