-
Notifications
You must be signed in to change notification settings - Fork 697
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The SBOM generated for the MySQL:8.x container does not include the RPM packages. It seems that important package information is missing
the code for generating the SBOM:
func analyzeImageUsingSyft(l *logger.Logger, imageId string) (source.Source, *sbom.SBOM, error) {
img, err := stereoscope.GetImageFromSource(context.Background(), imageId, oci.Registry, stereoscope.WithPlatform("linux/amd64"))
if err != nil {
l.Error("Could not create image source object. err: %v", err)
return nil, nil, err
}
imageSource := stereoscopesource.New(img, stereoscopesource.ImageConfig{Reference: imageId})
if err != nil {
l.Error("Could not pull image: %s. err: %v", imageId, err)
return nil, nil, err
}
s, err := getSBOM(imageSource, true)
if err != nil {
l.Error("Could get image SBOM. image: %s. err: %v", imageId, err)
return nil, nil, err
}
return imageSource, &s, nil
}
func getSBOM(src source.Source, saveToFile bool) (sbom.SBOM, error) {
s, err := syft.CreateSBOM(context.Background(), src, cfg)
if err != nil {
return sbom.SBOM{}, err
}
return *s, nil
}
Other images with RPMs are getting scanned correctly, but this issue seems specific to MySQL:8.x.
Environment:
- syft version: 1.11.1
- OS: tested on Windows,Linux and macOS
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done