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

Aperta
#580 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, python
Ambito
devtools, testing

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
4
Fork
1
Merge medio
6h 31m
PR unite (30g)
238

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cpp-best-practices/project_validator

Tutte le issue di cpp-best-practices/project_validator

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.