Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Attestation predicate reads `project_config.project_type`, which `ProjectConfig` does not define

Đang mở
#521 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@mlieberman85 đang làm issue này rồi.

Từ ngày 16/10/2026.

  • #614 của @mlieberman85 — đang mở

Đá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
62/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
security

Hướng nghiên cứu

Read packages/darnit-baseline/src/darnit_baseline/attestation/predicate.py alongside the ProjectConfig schema at packages/darnit/src/darnit/config/schema.py, then inspect the predicate callers and existing tests. Add coverage for building a predicate with a real ProjectConfig; done means the predicate no longer raises and its no-config type behavior is decided and documented in the predicate changelog.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

module-baseline quality

packages/darnit-baseline/src/darnit_baseline/attestation/predicate.py:147 builds the predicate with:

"project_type": project_config.project_type if project_config else "software",

ProjectConfig (packages/darnit/src/darnit/config/schema.py) has a type field, not project_type (create_minimal_config(..., project_type=...) maps its argument to type=). When a project configuration is passed (attestation/__init__.py:22, attestation/generator.py:92), this raises AttributeError instead of producing a predicate. It has gone unnoticed because the common paths pass None and fall back to "software".

Proposed fix:

  • Read project_config.type.
  • Decide whether the "software" fallback is right when no configuration exists: it states a project type nobody confirmed. Omitting the field, or recording it as unknown, may be more accurate. This is a predicate field, so the change is observable by attestation consumers and should be noted in the predicate's changelog.
  • Add a test that builds a predicate with a real ProjectConfig.
Ngôn ngữ chính
Python
Star
22
Fork
27
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
52

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của darnitdevorg/darnit

Tất cả issue của darnitdevorg/darnit

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.