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

Remediation trusts the audit cache regardless of framework, level, or tag filter

Đang mở
#542 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 1 ngày

@Marc-cn đang làm issue này rồi.

Từ ngày 3/10/2026.

  • #549 của @Marc-cn — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
tooling

Hướng nghiên cứu

Start with core/audit_cache.py and remediation/orchestrator.py, then trace how run_sieve_audit writes the cache and how [stores.cache] is configured. Check the existing cache and remediation tests. Done means cache reads reject mismatched framework or scope, filtered audits do not replace the unfiltered cache, and remediation reads from the configured store; an open linked pull request is already addressing this issue.

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

Mô tả

module-baseline module-core needs triage quality

Remediation uses cached audit results without checking that the cached audit covers what it is about to remediate.

remediation/orchestrator.py reads the cache with read_audit_cache(local_path) and remediates every cached result whose status is FAIL.

core/audit_cache.py checks only the TTL, the HEAD commit, and whether the working tree is dirty. The envelope records framework and level, but the read never compares them. A tag filter (audit_openssf_baseline(tags="domain=VM")) is not recorded at all.

What goes wrong:

  • A level 1 audit, a tag-filtered audit, or an audit of another framework (for example the reproducibility framework in the same checkout) leaves a cache that a later Baseline remediation treats as the full Baseline audit.
  • The remediation then fixes only the subset it sees, or nothing, and reports accordingly.
  • run_sieve_audit always wrote the cache, so any subset run replaced the full-audit cache. The 043 branch adds write_cache=False for its post-remediation re-check only; filtered audits still overwrite the cache.

Also: the orchestrator reads with the default cache store, ignoring an operator's [stores.cache] setting, which the audit honors when writing (feature 035).

Proposed fix:

  • Record the framework, level, and tag filter in the envelope.
  • Have read_audit_cache take the expected framework and scope, and treat a mismatch as a miss.
  • Don't let a filtered audit replace an unfiltered cache.
  • Read through the same configured store the audit writes to.
Ngôn ngữ chính
Python
Star
22
Fork
27
Merge trung bình
1 ngày 20 giờ
Pull request đã merge (30 ngày)
39

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.