Add option to exclude packages introduced from a base layer
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 9.6k
- Forks
- 962
- Avg merge
- 23h 27m
- Merged PRs (30d)
- 48
Description
What would you like to be added:
further options on the scope flag.
Why is this needed:
First, I am not sure if I properly understood. When we speak about layer, do we speak about container layers, e.g. from docker?
If yes, I wish I could scan only the components of the 'latest' / 'top' layer of my docker images.
Indeed, in our team, I built a hierarchy of docker images, where the Dockerfile already start with
FROM {someBaseImage}
so that I share a common 'debian-base' as 'lowest' layer on all my images.
Currently, the Debian packages are duplicated in all the SBOM of all images.
I wish I could avoid this duplication.
A possible workaround is a postprocessing script filtering out components by their layerId, but it is a bit tricky to find out which layerId I want to keep!
Skipping completely the Debian registery is not a clean workaround since I might have a Debian package installed only on my 'top layer'.
Possible related issue: https://github.com/anchore/syft/issues/435
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the scope flag and the related discussion in issue #435, then verify how Docker base and top layers are represented in generated SBOMs. Done means an option can exclude packages inherited from a base layer while retaining packages installed on the selected top layer, without relying on manual layerId postprocessing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100