syft/imgbom/catalog_image.go
2020-05-29 16:06:31 -04:00

21 lines
464 B
Go

package imgbom
import (
"github.com/anchore/imgbom/imgbom/analyzer"
"github.com/anchore/imgbom/imgbom/pkg"
"github.com/anchore/imgbom/imgbom/scope"
"github.com/anchore/stereoscope/pkg/image"
)
// TODO: add os detection results as return value
func CatalogImage(img *image.Image, o scope.Option) (*pkg.Catalog, error) {
s, err := scope.NewScope(img, o)
if err != nil {
return nil, err
}
// TODO: add OS detection here...
return analyzer.Analyze(s)
}