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

Open
#580 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, python
Domain
devtools, testing

Research direction

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.

Written by the indexing model from the issue text.

Description

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

Dominant language
Python
Stars
4
Forks
1
Avg merge
6h 31m
Merged PRs (30d)
238

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cpp-best-practices/project_validator

All issues in cpp-best-practices/project_validator

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.