A trivy scan of an image the project doesn't build earns nothing

Đang mở
#580 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

Chưa có ai nhận issue này.

Đá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
48/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ệ
docker, python
Lĩnh vực
devtools, testing

Hướng nghiên cứu

Read the dependency-audit implementation and its tests, then trace how it decides which image a Trivy scan covers. The issue leaves the project-image definition open: CI-built images, Dockerfile base images, or images published under the repository name. Once that rule is settled, add coverage showing an unrelated image earns no credit with a reason, and pin the stated hadolint --no-fail and trivy --exit-code 0 cases.

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

Mô tả

question

Problem

trivy image alpine:3.23 --exit-code 1 makes dependency-audit pass, though the project neither builds nor ships that image. #533 and #554 both list this as left.

Also: hadolint --no-fail and trivy … --exit-code 0 behave correctly, but no test pins them.

Decision needed

What counts as the project's image:

  • an image CI builds (docker build -t X, a build action's tags);
  • the Dockerfile's FROM base (in linuxserver/docker-baseimage-alpine, alpine:3.23 is the project's own base, so scanning it is arguably related);
  • an image published under the repository's name.

Done when

A scan of an unrelated image earns nothing, with a reason, and tests pin hadolint --no-fail and trivy --exit-code 0.

Split from #477. Checked against main at 4b4dbb6c on 2026-12-03: the cases above were reproduced with small fixtures or found in the code.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

Ngôn ngữ chính
Python
Star
4
Fork
1
Merge trung bình
6 giờ 31 phút
Pull request đã merge (30 ngày)
238

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 cpp-best-practices/project_validator

Tất cả issue của cpp-best-practices/project_validator

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.