diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c3406f20..7750faaf0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,16 +85,16 @@ jobs: - restore_cache: keys: - - unit-test-java-cache-{{ checksum "imgbom/cataloger/java/test-fixtures/java-builds/packages.fingerprint" }} + - unit-test-java-cache-{{ checksum "syft/cataloger/java/test-fixtures/java-builds/packages.fingerprint" }} - run: name: run unit tests command: make unit - save_cache: - key: unit-test-java-cache-{{ checksum "imgbom/cataloger/java/test-fixtures/java-builds/packages.fingerprint" }} + key: unit-test-java-cache-{{ checksum "syft/cataloger/java/test-fixtures/java-builds/packages.fingerprint" }} paths: - - "imgbom/cataloger/java/test-fixtures/java-builds/packages" + - "syft/cataloger/java/test-fixtures/java-builds/packages" - run: name: build hash key for integration test-fixtures blobs diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f8010cd7c..93477accf 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,5 +1,5 @@ builds: - - binary: imgbom + - binary: syft env: - CGO_ENABLED=0 goos: @@ -15,15 +15,15 @@ builds: -w -s -extldflags '-static' - -X github.com/anchore/imgbom/internal/version.version={{.Version}} - -X github.com/anchore/imgbom/internal/version.gitCommit={{.Commit}} - -X github.com/anchore/imgbom/internal/version.buildDate={{.Date}} - -X github.com/anchore/imgbom/internal/version.gitTreeState={{.Env.BUILD_GIT_TREE_STATE}} + -X github.com/anchore/syft/internal/version.version={{.Version}} + -X github.com/anchore/syft/internal/version.gitCommit={{.Commit}} + -X github.com/anchore/syft/internal/version.buildDate={{.Date}} + -X github.com/anchore/syft/internal/version.gitTreeState={{.Env.BUILD_GIT_TREE_STATE}} nfpms: - license: "Apache 2.0" maintainer: "Anchore, Inc" - homepage: &website "https://github.com/anchore/imgbom" + homepage: &website "https://github.com/anchore/syft" description: &description "A tool that generates a Software Bill Of Materials (SBOM) from container images and filesystems" formats: - rpm @@ -32,7 +32,7 @@ nfpms: brews: - tap: owner: anchore - name: homebrew-imgbom + name: homebrew-syft homepage: *website description: *description diff --git a/Makefile b/Makefile index d4b9a6bc2..52c290b85 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -BIN = imgbom +BIN = syft TEMPDIR = ./.tmp RESULTSDIR = $(TEMPDIR)/results COVER_REPORT = $(RESULTSDIR)/cover.report @@ -129,7 +129,7 @@ test/integration/test-fixtures/tar-cache.key, integration-fingerprint: .PHONY: java-packages-fingerprint java-packages-fingerprint: - @cd imgbom/cataloger/java/test-fixtures/java-builds && \ + @cd syft/cataloger/java/test-fixtures/java-builds && \ make packages.fingerprint .PHONY: clear-test-cache diff --git a/README.md b/README.md index 6396bd80b..cd4784625 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# imgbom (TBD Name) +# syft + +A CLI tool and go library for generating a Software Bill of Materials from container images and filesystems. diff --git a/cmd/cmd.go b/cmd/cmd.go index fb3a2ba59..b8569126f 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -6,15 +6,15 @@ import ( "github.com/spf13/cobra" - "github.com/anchore/imgbom/imgbom/presenter" - "github.com/anchore/imgbom/imgbom/scope" + "github.com/anchore/syft/syft/presenter" + "github.com/anchore/syft/syft/scope" - "github.com/anchore/imgbom/imgbom" - "github.com/anchore/imgbom/internal/config" - "github.com/anchore/imgbom/internal/format" - "github.com/anchore/imgbom/internal/log" - "github.com/anchore/imgbom/internal/logger" "github.com/anchore/stereoscope" + "github.com/anchore/syft/internal/config" + "github.com/anchore/syft/internal/format" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/internal/logger" + "github.com/anchore/syft/syft" "github.com/spf13/viper" "github.com/wagoodman/go-partybus" "gopkg.in/yaml.v2" @@ -99,7 +99,7 @@ func initLogging() { } logWrapper := logger.NewZapLogger(config) - imgbom.SetLogger(logWrapper) + syft.SetLogger(logWrapper) stereoscope.SetLogger(logWrapper) } @@ -118,5 +118,5 @@ func initEventBus() { eventSubscription = eventBus.Subscribe() stereoscope.SetBus(eventBus) - imgbom.SetBus(eventBus) + syft.SetBus(eventBus) } diff --git a/cmd/root.go b/cmd/root.go index 07d921635..1ab8e1243 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,14 +4,14 @@ import ( "fmt" "os" - "github.com/anchore/imgbom/imgbom" - "github.com/anchore/imgbom/imgbom/event" - "github.com/anchore/imgbom/imgbom/presenter" - "github.com/anchore/imgbom/internal" - "github.com/anchore/imgbom/internal/bus" - "github.com/anchore/imgbom/internal/log" - "github.com/anchore/imgbom/internal/ui" - "github.com/anchore/imgbom/internal/version" + "github.com/anchore/syft/internal" + "github.com/anchore/syft/internal/bus" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/internal/ui" + "github.com/anchore/syft/internal/version" + "github.com/anchore/syft/syft" + "github.com/anchore/syft/syft/event" + "github.com/anchore/syft/syft/presenter" "github.com/spf13/cobra" "github.com/wagoodman/go-partybus" ) @@ -58,7 +58,7 @@ func startWorker(userInput string) <-chan error { } } - catalog, scope, _, err := imgbom.Catalog(userInput, appConfig.ScopeOpt) + catalog, scope, _, err := syft.Catalog(userInput, appConfig.ScopeOpt) if err != nil { errs <- fmt.Errorf("failed to catalog input: %+v", err) return diff --git a/cmd/version.go b/cmd/version.go index 01f434ed8..a9e967cca 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -3,8 +3,8 @@ package cmd import ( "fmt" - "github.com/anchore/imgbom/internal" - "github.com/anchore/imgbom/internal/version" + "github.com/anchore/syft/internal" + "github.com/anchore/syft/internal/version" "github.com/spf13/cobra" ) diff --git a/go.mod b/go.mod index 4e0d465e4..0b12539a4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/anchore/imgbom +module github.com/anchore/syft go 1.14 diff --git a/internal/config/config.go b/internal/config/config.go index a7b69edea..dd8a8c57d 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -6,9 +6,9 @@ import ( "strings" "github.com/adrg/xdg" - "github.com/anchore/imgbom/imgbom/presenter" - "github.com/anchore/imgbom/imgbom/scope" - "github.com/anchore/imgbom/internal" + "github.com/anchore/syft/internal" + "github.com/anchore/syft/syft/presenter" + "github.com/anchore/syft/syft/scope" "github.com/mitchellh/go-homedir" "github.com/spf13/viper" "go.uber.org/zap/zapcore" diff --git a/internal/constants.go b/internal/constants.go index f762798ce..dbc53e21c 100644 --- a/internal/constants.go +++ b/internal/constants.go @@ -1,4 +1,4 @@ package internal // note: must be a single word, all lowercase -const ApplicationName = "imgbom" +const ApplicationName = "syft" diff --git a/internal/file/zip_file_manifest.go b/internal/file/zip_file_manifest.go index 133757dfc..d479ad716 100644 --- a/internal/file/zip_file_manifest.go +++ b/internal/file/zip_file_manifest.go @@ -6,9 +6,9 @@ import ( "os" "sort" - "github.com/anchore/imgbom/internal" + "github.com/anchore/syft/internal" - "github.com/anchore/imgbom/internal/log" + "github.com/anchore/syft/internal/log" ) type ZipFileManifest map[string]os.FileInfo diff --git a/internal/file/zip_file_traversal.go b/internal/file/zip_file_traversal.go index c54567809..7a016bd87 100644 --- a/internal/file/zip_file_traversal.go +++ b/internal/file/zip_file_traversal.go @@ -11,7 +11,7 @@ import ( "path/filepath" "strings" - "github.com/anchore/imgbom/internal/log" + "github.com/anchore/syft/internal/log" ) const ( diff --git a/internal/file/zip_file_traversal_test.go b/internal/file/zip_file_traversal_test.go index 6c4c6e41f..037d5466a 100644 --- a/internal/file/zip_file_traversal_test.go +++ b/internal/file/zip_file_traversal_test.go @@ -67,7 +67,7 @@ func equal(r1, r2 io.Reader) (bool, error) { } func TestUnzipToDir(t *testing.T) { - archivePrefix, err := ioutil.TempFile("", "imgbom-ziputil-archive-TEST-") + archivePrefix, err := ioutil.TempFile("", "syft-ziputil-archive-TEST-") if err != nil { t.Fatalf("unable to create tempfile: %+v", err) } @@ -79,7 +79,7 @@ func TestUnzipToDir(t *testing.T) { generateFixture(t, archivePrefix.Name()) - contentsDir, err := ioutil.TempDir("", "imgbom-ziputil-contents-TEST-") + contentsDir, err := ioutil.TempDir("", "syft-ziputil-contents-TEST-") if err != nil { t.Fatalf("unable to create tempdir: %+v", err) } @@ -162,7 +162,7 @@ func TestUnzipToDir(t *testing.T) { } func TestExtractFilesFromZipFile(t *testing.T) { - archivePrefix, err := ioutil.TempFile("", "imgbom-ziputil-archive-TEST-") + archivePrefix, err := ioutil.TempFile("", "syft-ziputil-archive-TEST-") if err != nil { t.Fatalf("unable to create tempfile: %+v", err) } @@ -211,7 +211,7 @@ func TestExtractFilesFromZipFile(t *testing.T) { } func TestZipFileManifest(t *testing.T) { - archivePrefix, err := ioutil.TempFile("", "imgbom-ziputil-archive-TEST-") + archivePrefix, err := ioutil.TempFile("", "syft-ziputil-archive-TEST-") if err != nil { t.Fatalf("unable to create tempfile: %+v", err) } diff --git a/internal/log/log.go b/internal/log/log.go index d7b609443..acf6ab49e 100644 --- a/internal/log/log.go +++ b/internal/log/log.go @@ -1,6 +1,6 @@ package log -import "github.com/anchore/imgbom/imgbom/logger" +import "github.com/anchore/syft/syft/logger" var Log logger.Logger = &nopLogger{} diff --git a/internal/logger/zap.go b/internal/logger/zap.go index 219ba5519..272932f5c 100644 --- a/internal/logger/zap.go +++ b/internal/logger/zap.go @@ -3,7 +3,7 @@ package logger import ( "os" - "github.com/anchore/imgbom/internal/format" + "github.com/anchore/syft/internal/format" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) diff --git a/internal/ui/common/event_handlers.go b/internal/ui/common/event_handlers.go index 75f688010..7cdc090b5 100644 --- a/internal/ui/common/event_handlers.go +++ b/internal/ui/common/event_handlers.go @@ -4,13 +4,13 @@ import ( "fmt" "os" - imgbomEventParsers "github.com/anchore/imgbom/imgbom/event/parsers" + syftEventParsers "github.com/anchore/syft/syft/event/parsers" "github.com/wagoodman/go-partybus" ) func CatalogerFinishedHandler(event partybus.Event) error { // show the report to stdout - pres, err := imgbomEventParsers.ParseCatalogerFinished(event) + pres, err := syftEventParsers.ParseCatalogerFinished(event) if err != nil { return fmt.Errorf("bad CatalogerFinished event: %w", err) } diff --git a/internal/ui/etui/ephemeral_tui.go b/internal/ui/etui/ephemeral_tui.go index 14124f30f..eea3bec91 100644 --- a/internal/ui/etui/ephemeral_tui.go +++ b/internal/ui/etui/ephemeral_tui.go @@ -6,10 +6,10 @@ import ( "os" "sync" - imgbomEvent "github.com/anchore/imgbom/imgbom/event" - "github.com/anchore/imgbom/internal/log" - "github.com/anchore/imgbom/internal/ui/common" stereoscopeEvent "github.com/anchore/stereoscope/pkg/event" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/internal/ui/common" + syftEvent "github.com/anchore/syft/syft/event" "github.com/wagoodman/go-partybus" "github.com/wagoodman/jotframe/pkg/frame" ) @@ -68,7 +68,7 @@ eventLoop: break eventLoop } switch e.Type { - case imgbomEvent.AppUpdateAvailable: + case syftEvent.AppUpdateAvailable: err = appUpdateAvailableHandler(ctx, fr, e, wg) if err != nil { log.Errorf("unable to show AppUpdateAvailable event: %+v", err) @@ -86,12 +86,12 @@ eventLoop: log.Errorf("unable to show FetchImage event: %+v", err) } - case imgbomEvent.CatalogerStarted: + case syftEvent.CatalogerStarted: err = catalogerStartedHandler(ctx, fr, e, wg) if err != nil { log.Errorf("unable to show CatalogerStarted event: %+v", err) } - case imgbomEvent.CatalogerFinished: + case syftEvent.CatalogerFinished: // we may have other background processes still displaying progress, wait for them to // finish before discontinuing dynamic content and showing the final report wg.Wait() diff --git a/internal/ui/etui/event_handlers.go b/internal/ui/etui/event_handlers.go index 61538f9e5..948a8afe1 100644 --- a/internal/ui/etui/event_handlers.go +++ b/internal/ui/etui/event_handlers.go @@ -7,8 +7,8 @@ import ( "sync" "time" - imgbomEventParsers "github.com/anchore/imgbom/imgbom/event/parsers" stereoEventParsers "github.com/anchore/stereoscope/pkg/event/parsers" + syftEventParsers "github.com/anchore/syft/syft/event/parsers" "github.com/gookit/color" "github.com/wagoodman/go-partybus" "github.com/wagoodman/go-progress" @@ -111,7 +111,7 @@ func imageReadHandler(ctx context.Context, fr *frame.Frame, event partybus.Event } func catalogerStartedHandler(ctx context.Context, fr *frame.Frame, event partybus.Event, wg *sync.WaitGroup) error { - monitor, err := imgbomEventParsers.ParseCatalogerStarted(event) + monitor, err := syftEventParsers.ParseCatalogerStarted(event) if err != nil { return fmt.Errorf("bad CatalogerStarted event: %w", err) } @@ -145,7 +145,7 @@ func catalogerStartedHandler(ctx context.Context, fr *frame.Frame, event partybu } func appUpdateAvailableHandler(_ context.Context, fr *frame.Frame, event partybus.Event, _ *sync.WaitGroup) error { - newVersion, err := imgbomEventParsers.ParseAppUpdateAvailable(event) + newVersion, err := syftEventParsers.ParseAppUpdateAvailable(event) if err != nil { return fmt.Errorf("bad AppUpdateAvailable event: %w", err) } diff --git a/internal/ui/logger_output.go b/internal/ui/logger_output.go index 51f5081a6..960799b55 100644 --- a/internal/ui/logger_output.go +++ b/internal/ui/logger_output.go @@ -1,9 +1,9 @@ package ui import ( - imgbomEvent "github.com/anchore/imgbom/imgbom/event" - "github.com/anchore/imgbom/internal/log" - "github.com/anchore/imgbom/internal/ui/common" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/internal/ui/common" + syftEvent "github.com/anchore/syft/syft/event" "github.com/wagoodman/go-partybus" ) @@ -23,7 +23,7 @@ eventLoop: } // ignore all events except for the final event - if e.Type == imgbomEvent.CatalogerFinished { + if e.Type == syftEvent.CatalogerFinished { err := common.CatalogerFinishedHandler(e) if err != nil { log.Errorf("unable to show catalog image finished event: %+v", err) diff --git a/internal/ui/select.go b/internal/ui/select.go index 2d77435c9..7d4b3a82e 100644 --- a/internal/ui/select.go +++ b/internal/ui/select.go @@ -4,7 +4,7 @@ import ( "os" "runtime" - "github.com/anchore/imgbom/internal/ui/etui" + "github.com/anchore/syft/internal/ui/etui" "golang.org/x/crypto/ssh/terminal" ) diff --git a/internal/version/update.go b/internal/version/update.go index 9c078a099..fea56b63e 100644 --- a/internal/version/update.go +++ b/internal/version/update.go @@ -15,7 +15,7 @@ var latestAppVersionURL = struct { }{ // TODO: set me to release host/path before release host: "https://anchore.io", - path: "/imgbom/releases/latest/VERSION", + path: "/syft/releases/latest/VERSION", } func IsUpdateAvailable() (bool, string, error) { diff --git a/main.go b/main.go index f3e8a8004..b512bb116 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/anchore/imgbom/cmd" + "github.com/anchore/syft/cmd" ) func main() { diff --git a/imgbom/cataloger/apkdb/cataloger.go b/syft/cataloger/apkdb/cataloger.go similarity index 83% rename from imgbom/cataloger/apkdb/cataloger.go rename to syft/cataloger/apkdb/cataloger.go index 27121937a..6170e497d 100644 --- a/imgbom/cataloger/apkdb/cataloger.go +++ b/syft/cataloger/apkdb/cataloger.go @@ -1,10 +1,10 @@ package apkdb import ( - "github.com/anchore/imgbom/imgbom/cataloger/common" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/cataloger/common" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Cataloger struct { diff --git a/imgbom/cataloger/apkdb/parse_apk_db.go b/syft/cataloger/apkdb/parse_apk_db.go similarity index 98% rename from imgbom/cataloger/apkdb/parse_apk_db.go rename to syft/cataloger/apkdb/parse_apk_db.go index 03a19f816..31e4317a1 100644 --- a/imgbom/cataloger/apkdb/parse_apk_db.go +++ b/syft/cataloger/apkdb/parse_apk_db.go @@ -9,7 +9,7 @@ import ( "github.com/mitchellh/mapstructure" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) func parseApkDB(_ string, reader io.Reader) ([]pkg.Package, error) { diff --git a/imgbom/cataloger/apkdb/parse_apk_db_test.go b/syft/cataloger/apkdb/parse_apk_db_test.go similarity index 99% rename from imgbom/cataloger/apkdb/parse_apk_db_test.go rename to syft/cataloger/apkdb/parse_apk_db_test.go index 1de4fe007..1023737d6 100644 --- a/imgbom/cataloger/apkdb/parse_apk_db_test.go +++ b/syft/cataloger/apkdb/parse_apk_db_test.go @@ -7,7 +7,7 @@ import ( "github.com/go-test/deep" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) func TestSinglePackage(t *testing.T) { diff --git a/imgbom/cataloger/apkdb/test-fixtures/multiple b/syft/cataloger/apkdb/test-fixtures/multiple similarity index 100% rename from imgbom/cataloger/apkdb/test-fixtures/multiple rename to syft/cataloger/apkdb/test-fixtures/multiple diff --git a/imgbom/cataloger/apkdb/test-fixtures/single b/syft/cataloger/apkdb/test-fixtures/single similarity index 100% rename from imgbom/cataloger/apkdb/test-fixtures/single rename to syft/cataloger/apkdb/test-fixtures/single diff --git a/imgbom/cataloger/bundler/cataloger.go b/syft/cataloger/bundler/cataloger.go similarity index 83% rename from imgbom/cataloger/bundler/cataloger.go rename to syft/cataloger/bundler/cataloger.go index 1c954f599..af7c9f7c6 100644 --- a/imgbom/cataloger/bundler/cataloger.go +++ b/syft/cataloger/bundler/cataloger.go @@ -1,10 +1,10 @@ package bundler import ( - "github.com/anchore/imgbom/imgbom/cataloger/common" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/cataloger/common" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Cataloger struct { diff --git a/imgbom/cataloger/bundler/parse_gemfile_lock.go b/syft/cataloger/bundler/parse_gemfile_lock.go similarity index 93% rename from imgbom/cataloger/bundler/parse_gemfile_lock.go rename to syft/cataloger/bundler/parse_gemfile_lock.go index 4064c3bb4..ae22565d9 100644 --- a/imgbom/cataloger/bundler/parse_gemfile_lock.go +++ b/syft/cataloger/bundler/parse_gemfile_lock.go @@ -5,8 +5,8 @@ import ( "io" "strings" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/internal" + "github.com/anchore/syft/internal" + "github.com/anchore/syft/syft/pkg" ) var sectionsOfInterest = internal.NewStringSetFromSlice([]string{"GEM"}) diff --git a/imgbom/cataloger/bundler/parse_gemfile_lock_test.go b/syft/cataloger/bundler/parse_gemfile_lock_test.go similarity index 98% rename from imgbom/cataloger/bundler/parse_gemfile_lock_test.go rename to syft/cataloger/bundler/parse_gemfile_lock_test.go index 404ce3fad..cc17ad0af 100644 --- a/imgbom/cataloger/bundler/parse_gemfile_lock_test.go +++ b/syft/cataloger/bundler/parse_gemfile_lock_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) var expected = map[string]string{ diff --git a/imgbom/cataloger/bundler/test-fixtures/Gemfile.lock b/syft/cataloger/bundler/test-fixtures/Gemfile.lock similarity index 100% rename from imgbom/cataloger/bundler/test-fixtures/Gemfile.lock rename to syft/cataloger/bundler/test-fixtures/Gemfile.lock diff --git a/imgbom/cataloger/cataloger.go b/syft/cataloger/cataloger.go similarity index 84% rename from imgbom/cataloger/cataloger.go rename to syft/cataloger/cataloger.go index e3e0174d6..1304e1caa 100644 --- a/imgbom/cataloger/cataloger.go +++ b/syft/cataloger/cataloger.go @@ -1,9 +1,9 @@ package cataloger import ( - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Cataloger interface { diff --git a/imgbom/cataloger/common/generic_cataloger.go b/syft/cataloger/common/generic_cataloger.go similarity index 96% rename from imgbom/cataloger/common/generic_cataloger.go rename to syft/cataloger/common/generic_cataloger.go index b3c0d77be..1a048540e 100644 --- a/imgbom/cataloger/common/generic_cataloger.go +++ b/syft/cataloger/common/generic_cataloger.go @@ -3,10 +3,10 @@ package common import ( "strings" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" - "github.com/anchore/imgbom/internal/log" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) // GenericCataloger implements the Catalog interface and is responsible for dispatching the proper parser function for diff --git a/imgbom/cataloger/common/generic_cataloger_test.go b/syft/cataloger/common/generic_cataloger_test.go similarity index 97% rename from imgbom/cataloger/common/generic_cataloger_test.go rename to syft/cataloger/common/generic_cataloger_test.go index b797b0188..849c0e820 100644 --- a/imgbom/cataloger/common/generic_cataloger_test.go +++ b/syft/cataloger/common/generic_cataloger_test.go @@ -6,9 +6,9 @@ import ( "io/ioutil" "testing" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/internal" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/internal" + "github.com/anchore/syft/syft/pkg" ) type testResolver struct { diff --git a/imgbom/cataloger/common/parser.go b/syft/cataloger/common/parser.go similarity index 87% rename from imgbom/cataloger/common/parser.go rename to syft/cataloger/common/parser.go index 83fa15084..15ca17d11 100644 --- a/imgbom/cataloger/common/parser.go +++ b/syft/cataloger/common/parser.go @@ -3,7 +3,7 @@ package common import ( "io" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) // ParserFn standardizes a function signature for parser functions that accept the virtual file path (not usable for file reads) and contents and return any discovered packages from that file diff --git a/imgbom/cataloger/controller.go b/syft/cataloger/controller.go similarity index 82% rename from imgbom/cataloger/controller.go rename to syft/cataloger/controller.go index 3c6976edb..14c0ce735 100644 --- a/imgbom/cataloger/controller.go +++ b/syft/cataloger/controller.go @@ -1,20 +1,20 @@ package cataloger import ( - "github.com/anchore/imgbom/imgbom/cataloger/apkdb" - "github.com/anchore/imgbom/imgbom/cataloger/bundler" - "github.com/anchore/imgbom/imgbom/cataloger/dpkg" - golang "github.com/anchore/imgbom/imgbom/cataloger/golang" - "github.com/anchore/imgbom/imgbom/cataloger/java" - "github.com/anchore/imgbom/imgbom/cataloger/npm" - "github.com/anchore/imgbom/imgbom/cataloger/python" - "github.com/anchore/imgbom/imgbom/cataloger/rpmdb" - "github.com/anchore/imgbom/imgbom/event" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" - "github.com/anchore/imgbom/internal/bus" - "github.com/anchore/imgbom/internal/log" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/internal/bus" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/syft/cataloger/apkdb" + "github.com/anchore/syft/syft/cataloger/bundler" + "github.com/anchore/syft/syft/cataloger/dpkg" + golang "github.com/anchore/syft/syft/cataloger/golang" + "github.com/anchore/syft/syft/cataloger/java" + "github.com/anchore/syft/syft/cataloger/npm" + "github.com/anchore/syft/syft/cataloger/python" + "github.com/anchore/syft/syft/cataloger/rpmdb" + "github.com/anchore/syft/syft/event" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" "github.com/hashicorp/go-multierror" "github.com/wagoodman/go-partybus" "github.com/wagoodman/go-progress" diff --git a/imgbom/cataloger/dpkg/cataloger.go b/syft/cataloger/dpkg/cataloger.go similarity index 83% rename from imgbom/cataloger/dpkg/cataloger.go rename to syft/cataloger/dpkg/cataloger.go index f1df32598..d397db830 100644 --- a/imgbom/cataloger/dpkg/cataloger.go +++ b/syft/cataloger/dpkg/cataloger.go @@ -1,10 +1,10 @@ package dpkg import ( - "github.com/anchore/imgbom/imgbom/cataloger/common" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/cataloger/common" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Cataloger struct { diff --git a/imgbom/cataloger/dpkg/parse_dpkg_status.go b/syft/cataloger/dpkg/parse_dpkg_status.go similarity index 98% rename from imgbom/cataloger/dpkg/parse_dpkg_status.go rename to syft/cataloger/dpkg/parse_dpkg_status.go index 88873f5b0..92c40b8d0 100644 --- a/imgbom/cataloger/dpkg/parse_dpkg_status.go +++ b/syft/cataloger/dpkg/parse_dpkg_status.go @@ -6,7 +6,7 @@ import ( "io" "strings" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" "github.com/mitchellh/mapstructure" ) diff --git a/imgbom/cataloger/dpkg/parse_dpkg_status_test.go b/syft/cataloger/dpkg/parse_dpkg_status_test.go similarity index 98% rename from imgbom/cataloger/dpkg/parse_dpkg_status_test.go rename to syft/cataloger/dpkg/parse_dpkg_status_test.go index 776f11811..bec3e5920 100644 --- a/imgbom/cataloger/dpkg/parse_dpkg_status_test.go +++ b/syft/cataloger/dpkg/parse_dpkg_status_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" "github.com/go-test/deep" ) diff --git a/imgbom/cataloger/dpkg/test-fixtures/multiple b/syft/cataloger/dpkg/test-fixtures/multiple similarity index 100% rename from imgbom/cataloger/dpkg/test-fixtures/multiple rename to syft/cataloger/dpkg/test-fixtures/multiple diff --git a/imgbom/cataloger/dpkg/test-fixtures/single b/syft/cataloger/dpkg/test-fixtures/single similarity index 100% rename from imgbom/cataloger/dpkg/test-fixtures/single rename to syft/cataloger/dpkg/test-fixtures/single diff --git a/imgbom/cataloger/golang/cataloger.go b/syft/cataloger/golang/cataloger.go similarity index 82% rename from imgbom/cataloger/golang/cataloger.go rename to syft/cataloger/golang/cataloger.go index 33f0de80a..762663f5b 100644 --- a/imgbom/cataloger/golang/cataloger.go +++ b/syft/cataloger/golang/cataloger.go @@ -1,10 +1,10 @@ package golang import ( - "github.com/anchore/imgbom/imgbom/cataloger/common" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/cataloger/common" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Cataloger struct { diff --git a/imgbom/cataloger/golang/parse_go_mod.go b/syft/cataloger/golang/parse_go_mod.go similarity index 96% rename from imgbom/cataloger/golang/parse_go_mod.go rename to syft/cataloger/golang/parse_go_mod.go index 4ce327333..690d5ae3b 100644 --- a/imgbom/cataloger/golang/parse_go_mod.go +++ b/syft/cataloger/golang/parse_go_mod.go @@ -8,7 +8,7 @@ import ( "github.com/rogpeppe/go-internal/modfile" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) func parseGoMod(path string, reader io.Reader) ([]pkg.Package, error) { diff --git a/imgbom/cataloger/golang/parse_go_mod_test.go b/syft/cataloger/golang/parse_go_mod_test.go similarity index 98% rename from imgbom/cataloger/golang/parse_go_mod_test.go rename to syft/cataloger/golang/parse_go_mod_test.go index dff7a366e..292107ef6 100644 --- a/imgbom/cataloger/golang/parse_go_mod_test.go +++ b/syft/cataloger/golang/parse_go_mod_test.go @@ -6,7 +6,7 @@ import ( "github.com/go-test/deep" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) func TestParseGoMod(t *testing.T) { diff --git a/imgbom/cataloger/golang/test-fixtures/many-packages b/syft/cataloger/golang/test-fixtures/many-packages similarity index 95% rename from imgbom/cataloger/golang/test-fixtures/many-packages rename to syft/cataloger/golang/test-fixtures/many-packages index d1c417880..f748cb574 100644 --- a/imgbom/cataloger/golang/test-fixtures/many-packages +++ b/syft/cataloger/golang/test-fixtures/many-packages @@ -1,5 +1,5 @@ module ( - github.com/anchore/imgbom + github.com/anchore/syft ) go 1.14 diff --git a/imgbom/cataloger/golang/test-fixtures/one-package b/syft/cataloger/golang/test-fixtures/one-package similarity index 64% rename from imgbom/cataloger/golang/test-fixtures/one-package rename to syft/cataloger/golang/test-fixtures/one-package index 93da53fdf..4edcf7e8b 100644 --- a/imgbom/cataloger/golang/test-fixtures/one-package +++ b/syft/cataloger/golang/test-fixtures/one-package @@ -1,4 +1,4 @@ -module github.com/anchore/imgbom +module github.com/anchore/syft go 1.14 diff --git a/imgbom/cataloger/java/archive_filename.go b/syft/cataloger/java/archive_filename.go similarity index 95% rename from imgbom/cataloger/java/archive_filename.go rename to syft/cataloger/java/archive_filename.go index 8d1c1a465..e64690584 100644 --- a/imgbom/cataloger/java/archive_filename.go +++ b/syft/cataloger/java/archive_filename.go @@ -5,9 +5,9 @@ import ( "regexp" "strings" - "github.com/anchore/imgbom/internal/log" + "github.com/anchore/syft/internal/log" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) // match examples: diff --git a/imgbom/cataloger/java/archive_filename_test.go b/syft/cataloger/java/archive_filename_test.go similarity index 98% rename from imgbom/cataloger/java/archive_filename_test.go rename to syft/cataloger/java/archive_filename_test.go index 0f9b9528a..db79e61d9 100644 --- a/imgbom/cataloger/java/archive_filename_test.go +++ b/syft/cataloger/java/archive_filename_test.go @@ -1,7 +1,7 @@ package java import ( - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" "github.com/sergi/go-diff/diffmatchpatch" "testing" ) diff --git a/imgbom/cataloger/java/archive_parser.go b/syft/cataloger/java/archive_parser.go similarity index 98% rename from imgbom/cataloger/java/archive_parser.go rename to syft/cataloger/java/archive_parser.go index 7047cc449..5481eb76e 100644 --- a/imgbom/cataloger/java/archive_parser.go +++ b/syft/cataloger/java/archive_parser.go @@ -5,9 +5,9 @@ import ( "io" "strings" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/internal" - "github.com/anchore/imgbom/internal/file" + "github.com/anchore/syft/internal" + "github.com/anchore/syft/internal/file" + "github.com/anchore/syft/syft/pkg" ) var archiveFormatGlobs = []string{ diff --git a/imgbom/cataloger/java/archive_parser_test.go b/syft/cataloger/java/archive_parser_test.go similarity index 99% rename from imgbom/cataloger/java/archive_parser_test.go rename to syft/cataloger/java/archive_parser_test.go index 5d6241500..3a3cac129 100644 --- a/imgbom/cataloger/java/archive_parser_test.go +++ b/syft/cataloger/java/archive_parser_test.go @@ -11,9 +11,9 @@ import ( "syscall" "testing" - "github.com/anchore/imgbom/internal" + "github.com/anchore/syft/internal" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" "github.com/go-test/deep" "github.com/gookit/color" ) diff --git a/imgbom/cataloger/java/cataloger.go b/syft/cataloger/java/cataloger.go similarity index 84% rename from imgbom/cataloger/java/cataloger.go rename to syft/cataloger/java/cataloger.go index 45ebffa39..a7b3cb322 100644 --- a/imgbom/cataloger/java/cataloger.go +++ b/syft/cataloger/java/cataloger.go @@ -1,10 +1,10 @@ package java import ( - "github.com/anchore/imgbom/imgbom/cataloger/common" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/cataloger/common" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Cataloger struct { diff --git a/imgbom/cataloger/java/java_manifest.go b/syft/cataloger/java/java_manifest.go similarity index 98% rename from imgbom/cataloger/java/java_manifest.go rename to syft/cataloger/java/java_manifest.go index b94c71617..26eb27dc2 100644 --- a/imgbom/cataloger/java/java_manifest.go +++ b/syft/cataloger/java/java_manifest.go @@ -6,7 +6,7 @@ import ( "io" "strings" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" "github.com/mitchellh/mapstructure" ) diff --git a/imgbom/cataloger/java/java_manifest_test.go b/syft/cataloger/java/java_manifest_test.go similarity index 98% rename from imgbom/cataloger/java/java_manifest_test.go rename to syft/cataloger/java/java_manifest_test.go index ec5e97cc5..5f30d840f 100644 --- a/imgbom/cataloger/java/java_manifest_test.go +++ b/syft/cataloger/java/java_manifest_test.go @@ -2,7 +2,7 @@ package java import ( "encoding/json" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" "github.com/go-test/deep" "os" "testing" diff --git a/imgbom/cataloger/java/pom_properties.go b/syft/cataloger/java/pom_properties.go similarity index 96% rename from imgbom/cataloger/java/pom_properties.go rename to syft/cataloger/java/pom_properties.go index 170109857..36169802a 100644 --- a/imgbom/cataloger/java/pom_properties.go +++ b/syft/cataloger/java/pom_properties.go @@ -6,7 +6,7 @@ import ( "io" "strings" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" "github.com/mitchellh/mapstructure" ) diff --git a/imgbom/cataloger/java/pom_properties_test.go b/syft/cataloger/java/pom_properties_test.go similarity index 97% rename from imgbom/cataloger/java/pom_properties_test.go rename to syft/cataloger/java/pom_properties_test.go index 05831d716..d8d3dde33 100644 --- a/imgbom/cataloger/java/pom_properties_test.go +++ b/syft/cataloger/java/pom_properties_test.go @@ -2,7 +2,7 @@ package java import ( "encoding/json" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" "github.com/go-test/deep" "os" "testing" diff --git a/imgbom/cataloger/java/save_archive_to_tmp.go b/syft/cataloger/java/save_archive_to_tmp.go similarity index 90% rename from imgbom/cataloger/java/save_archive_to_tmp.go rename to syft/cataloger/java/save_archive_to_tmp.go index 4b6c1e01a..2400e5a7d 100644 --- a/imgbom/cataloger/java/save_archive_to_tmp.go +++ b/syft/cataloger/java/save_archive_to_tmp.go @@ -7,11 +7,11 @@ import ( "os" "path/filepath" - "github.com/anchore/imgbom/internal/log" + "github.com/anchore/syft/internal/log" ) func saveArchiveToTmp(reader io.Reader) (string, string, func(), error) { - tempDir, err := ioutil.TempDir("", "imgbom-jar-contents-") + tempDir, err := ioutil.TempDir("", "syft-jar-contents-") if err != nil { return "", "", func() {}, fmt.Errorf("unable to create tempdir for jar processing: %w", err) } diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/.gitignore b/syft/cataloger/java/test-fixtures/java-builds/.gitignore similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/.gitignore rename to syft/cataloger/java/test-fixtures/java-builds/.gitignore diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/Makefile b/syft/cataloger/java/test-fixtures/java-builds/Makefile similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/Makefile rename to syft/cataloger/java/test-fixtures/java-builds/Makefile diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/build-example-java-app-gradle.sh b/syft/cataloger/java/test-fixtures/java-builds/build-example-java-app-gradle.sh similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/build-example-java-app-gradle.sh rename to syft/cataloger/java/test-fixtures/java-builds/build-example-java-app-gradle.sh diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/build-example-java-app-maven.sh b/syft/cataloger/java/test-fixtures/java-builds/build-example-java-app-maven.sh similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/build-example-java-app-maven.sh rename to syft/cataloger/java/test-fixtures/java-builds/build-example-java-app-maven.sh diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/build-example-jenkins-plugin.sh b/syft/cataloger/java/test-fixtures/java-builds/build-example-jenkins-plugin.sh similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/build-example-jenkins-plugin.sh rename to syft/cataloger/java/test-fixtures/java-builds/build-example-jenkins-plugin.sh diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/build-example-sb-app-nestedjar.sh b/syft/cataloger/java/test-fixtures/java-builds/build-example-sb-app-nestedjar.sh similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/build-example-sb-app-nestedjar.sh rename to syft/cataloger/java/test-fixtures/java-builds/build-example-sb-app-nestedjar.sh diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-java-app/.gitignore b/syft/cataloger/java/test-fixtures/java-builds/example-java-app/.gitignore similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-java-app/.gitignore rename to syft/cataloger/java/test-fixtures/java-builds/example-java-app/.gitignore diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-java-app/build.gradle b/syft/cataloger/java/test-fixtures/java-builds/example-java-app/build.gradle similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-java-app/build.gradle rename to syft/cataloger/java/test-fixtures/java-builds/example-java-app/build.gradle diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-java-app/pom.xml b/syft/cataloger/java/test-fixtures/java-builds/example-java-app/pom.xml similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-java-app/pom.xml rename to syft/cataloger/java/test-fixtures/java-builds/example-java-app/pom.xml diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-java-app/src/main/java/hello/Greeter.java b/syft/cataloger/java/test-fixtures/java-builds/example-java-app/src/main/java/hello/Greeter.java similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-java-app/src/main/java/hello/Greeter.java rename to syft/cataloger/java/test-fixtures/java-builds/example-java-app/src/main/java/hello/Greeter.java diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-java-app/src/main/java/hello/HelloWorld.java b/syft/cataloger/java/test-fixtures/java-builds/example-java-app/src/main/java/hello/HelloWorld.java similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-java-app/src/main/java/hello/HelloWorld.java rename to syft/cataloger/java/test-fixtures/java-builds/example-java-app/src/main/java/hello/HelloWorld.java diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/pom.xml b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/pom.xml similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/pom.xml rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/pom.xml diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/java/io/jenkins/plugins/sample/HelloWorldBuilder.java b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/java/io/jenkins/plugins/sample/HelloWorldBuilder.java similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/java/io/jenkins/plugins/sample/HelloWorldBuilder.java rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/java/io/jenkins/plugins/sample/HelloWorldBuilder.java diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/index.jelly b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/index.jelly similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/index.jelly rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/index.jelly diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config.jelly b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config.jelly similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config.jelly rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config.jelly diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config.properties b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config.properties similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config.properties rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config.properties diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config_fr.properties b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config_fr.properties similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config_fr.properties rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/config_fr.properties diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-name.html b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-name.html similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-name.html rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-name.html diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-name_fr.html b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-name_fr.html similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-name_fr.html rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-name_fr.html diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-useFrench.html b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-useFrench.html similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-useFrench.html rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-useFrench.html diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-useFrench_fr.html b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-useFrench_fr.html similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-useFrench_fr.html rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/HelloWorldBuilder/help-useFrench_fr.html diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/Messages.properties b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/Messages.properties similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/Messages.properties rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/Messages.properties diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/Messages_fr.properties b/syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/Messages_fr.properties similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/Messages_fr.properties rename to syft/cataloger/java/test-fixtures/java-builds/example-jenkins-plugin/src/main/resources/io/jenkins/plugins/sample/Messages_fr.properties diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/.gitignore b/syft/cataloger/java/test-fixtures/java-builds/example-sb-app/.gitignore similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/.gitignore rename to syft/cataloger/java/test-fixtures/java-builds/example-sb-app/.gitignore diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/pom.xml b/syft/cataloger/java/test-fixtures/java-builds/example-sb-app/pom.xml similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/pom.xml rename to syft/cataloger/java/test-fixtures/java-builds/example-sb-app/pom.xml diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/src/main/java/com/example/springboot/Application.java b/syft/cataloger/java/test-fixtures/java-builds/example-sb-app/src/main/java/com/example/springboot/Application.java similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/src/main/java/com/example/springboot/Application.java rename to syft/cataloger/java/test-fixtures/java-builds/example-sb-app/src/main/java/com/example/springboot/Application.java diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/src/main/java/com/example/springboot/HelloController.java b/syft/cataloger/java/test-fixtures/java-builds/example-sb-app/src/main/java/com/example/springboot/HelloController.java similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/src/main/java/com/example/springboot/HelloController.java rename to syft/cataloger/java/test-fixtures/java-builds/example-sb-app/src/main/java/com/example/springboot/HelloController.java diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/src/test/java/com/example/springboot/HelloControllerIT.java b/syft/cataloger/java/test-fixtures/java-builds/example-sb-app/src/test/java/com/example/springboot/HelloControllerIT.java similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/src/test/java/com/example/springboot/HelloControllerIT.java rename to syft/cataloger/java/test-fixtures/java-builds/example-sb-app/src/test/java/com/example/springboot/HelloControllerIT.java diff --git a/imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/src/test/java/com/example/springboot/HelloControllerTest.java b/syft/cataloger/java/test-fixtures/java-builds/example-sb-app/src/test/java/com/example/springboot/HelloControllerTest.java similarity index 100% rename from imgbom/cataloger/java/test-fixtures/java-builds/example-sb-app/src/test/java/com/example/springboot/HelloControllerTest.java rename to syft/cataloger/java/test-fixtures/java-builds/example-sb-app/src/test/java/com/example/springboot/HelloControllerTest.java diff --git a/imgbom/cataloger/java/test-fixtures/manifest/continuation b/syft/cataloger/java/test-fixtures/manifest/continuation similarity index 100% rename from imgbom/cataloger/java/test-fixtures/manifest/continuation rename to syft/cataloger/java/test-fixtures/manifest/continuation diff --git a/imgbom/cataloger/java/test-fixtures/manifest/extra-info b/syft/cataloger/java/test-fixtures/manifest/extra-info similarity index 100% rename from imgbom/cataloger/java/test-fixtures/manifest/extra-info rename to syft/cataloger/java/test-fixtures/manifest/extra-info diff --git a/imgbom/cataloger/java/test-fixtures/manifest/small b/syft/cataloger/java/test-fixtures/manifest/small similarity index 100% rename from imgbom/cataloger/java/test-fixtures/manifest/small rename to syft/cataloger/java/test-fixtures/manifest/small diff --git a/imgbom/cataloger/java/test-fixtures/manifest/standard-info b/syft/cataloger/java/test-fixtures/manifest/standard-info similarity index 100% rename from imgbom/cataloger/java/test-fixtures/manifest/standard-info rename to syft/cataloger/java/test-fixtures/manifest/standard-info diff --git a/imgbom/cataloger/java/test-fixtures/manifest/version-with-date b/syft/cataloger/java/test-fixtures/manifest/version-with-date similarity index 100% rename from imgbom/cataloger/java/test-fixtures/manifest/version-with-date rename to syft/cataloger/java/test-fixtures/manifest/version-with-date diff --git a/imgbom/cataloger/java/test-fixtures/pom/extra.pom.properties b/syft/cataloger/java/test-fixtures/pom/extra.pom.properties similarity index 100% rename from imgbom/cataloger/java/test-fixtures/pom/extra.pom.properties rename to syft/cataloger/java/test-fixtures/pom/extra.pom.properties diff --git a/imgbom/cataloger/java/test-fixtures/pom/small.pom.properties b/syft/cataloger/java/test-fixtures/pom/small.pom.properties similarity index 100% rename from imgbom/cataloger/java/test-fixtures/pom/small.pom.properties rename to syft/cataloger/java/test-fixtures/pom/small.pom.properties diff --git a/imgbom/cataloger/npm/cataloger.go b/syft/cataloger/npm/cataloger.go similarity index 83% rename from imgbom/cataloger/npm/cataloger.go rename to syft/cataloger/npm/cataloger.go index d3ebc7647..f39a6db90 100644 --- a/imgbom/cataloger/npm/cataloger.go +++ b/syft/cataloger/npm/cataloger.go @@ -1,10 +1,10 @@ package npm import ( - "github.com/anchore/imgbom/imgbom/cataloger/common" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/cataloger/common" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Cataloger struct { diff --git a/imgbom/cataloger/npm/parse_package_lock.go b/syft/cataloger/npm/parse_package_lock.go similarity index 96% rename from imgbom/cataloger/npm/parse_package_lock.go rename to syft/cataloger/npm/parse_package_lock.go index 4181cfa25..7374530bd 100644 --- a/imgbom/cataloger/npm/parse_package_lock.go +++ b/syft/cataloger/npm/parse_package_lock.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) type PackageLock struct { diff --git a/imgbom/cataloger/npm/parse_package_lock_test.go b/syft/cataloger/npm/parse_package_lock_test.go similarity index 98% rename from imgbom/cataloger/npm/parse_package_lock_test.go rename to syft/cataloger/npm/parse_package_lock_test.go index 1ad1bb7a2..cff7bff4e 100644 --- a/imgbom/cataloger/npm/parse_package_lock_test.go +++ b/syft/cataloger/npm/parse_package_lock_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) func assertPkgsEqual(t *testing.T, actual []pkg.Package, expected map[string]pkg.Package) { diff --git a/imgbom/cataloger/npm/test-fixtures/pkg-lock/package-lock.json b/syft/cataloger/npm/test-fixtures/pkg-lock/package-lock.json similarity index 100% rename from imgbom/cataloger/npm/test-fixtures/pkg-lock/package-lock.json rename to syft/cataloger/npm/test-fixtures/pkg-lock/package-lock.json diff --git a/imgbom/cataloger/python/cataloger.go b/syft/cataloger/python/cataloger.go similarity index 85% rename from imgbom/cataloger/python/cataloger.go rename to syft/cataloger/python/cataloger.go index 81342ff5c..4cd13d540 100644 --- a/imgbom/cataloger/python/cataloger.go +++ b/syft/cataloger/python/cataloger.go @@ -1,10 +1,10 @@ package python import ( - "github.com/anchore/imgbom/imgbom/cataloger/common" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/cataloger/common" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Cataloger struct { diff --git a/imgbom/cataloger/python/parse_requirements.go b/syft/cataloger/python/parse_requirements.go similarity index 97% rename from imgbom/cataloger/python/parse_requirements.go rename to syft/cataloger/python/parse_requirements.go index decf25d88..60c38518d 100644 --- a/imgbom/cataloger/python/parse_requirements.go +++ b/syft/cataloger/python/parse_requirements.go @@ -6,7 +6,7 @@ import ( "io" "strings" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) func parseRequirementsTxt(_ string, reader io.Reader) ([]pkg.Package, error) { diff --git a/imgbom/cataloger/python/parse_requirements_test.go b/syft/cataloger/python/parse_requirements_test.go similarity index 94% rename from imgbom/cataloger/python/parse_requirements_test.go rename to syft/cataloger/python/parse_requirements_test.go index 2b980751d..96fd429af 100644 --- a/imgbom/cataloger/python/parse_requirements_test.go +++ b/syft/cataloger/python/parse_requirements_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) func TestParseRequirementsTxt(t *testing.T) { diff --git a/imgbom/cataloger/python/parse_wheel_egg.go b/syft/cataloger/python/parse_wheel_egg.go similarity index 98% rename from imgbom/cataloger/python/parse_wheel_egg.go rename to syft/cataloger/python/parse_wheel_egg.go index 91004e4ae..4cde82ebc 100644 --- a/imgbom/cataloger/python/parse_wheel_egg.go +++ b/syft/cataloger/python/parse_wheel_egg.go @@ -6,7 +6,7 @@ import ( "io" "strings" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) func parseWheelMetadata(_ string, reader io.Reader) ([]pkg.Package, error) { diff --git a/imgbom/cataloger/python/parse_wheel_egg_test.go b/syft/cataloger/python/parse_wheel_egg_test.go similarity index 98% rename from imgbom/cataloger/python/parse_wheel_egg_test.go rename to syft/cataloger/python/parse_wheel_egg_test.go index bd268c636..86bcd8639 100644 --- a/imgbom/cataloger/python/parse_wheel_egg_test.go +++ b/syft/cataloger/python/parse_wheel_egg_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" ) func assertPkgsEqual(t *testing.T, actual []pkg.Package, expected map[string]pkg.Package) { diff --git a/imgbom/cataloger/python/test-fixtures/dist-info/METADATA b/syft/cataloger/python/test-fixtures/dist-info/METADATA similarity index 100% rename from imgbom/cataloger/python/test-fixtures/dist-info/METADATA rename to syft/cataloger/python/test-fixtures/dist-info/METADATA diff --git a/imgbom/cataloger/python/test-fixtures/egg-info/PKG-INFO b/syft/cataloger/python/test-fixtures/egg-info/PKG-INFO similarity index 100% rename from imgbom/cataloger/python/test-fixtures/egg-info/PKG-INFO rename to syft/cataloger/python/test-fixtures/egg-info/PKG-INFO diff --git a/imgbom/cataloger/python/test-fixtures/requires/requirements.txt b/syft/cataloger/python/test-fixtures/requires/requirements.txt similarity index 100% rename from imgbom/cataloger/python/test-fixtures/requires/requirements.txt rename to syft/cataloger/python/test-fixtures/requires/requirements.txt diff --git a/imgbom/cataloger/rpmdb/cataloger.go b/syft/cataloger/rpmdb/cataloger.go similarity index 83% rename from imgbom/cataloger/rpmdb/cataloger.go rename to syft/cataloger/rpmdb/cataloger.go index 0f11d3718..7083639c2 100644 --- a/imgbom/cataloger/rpmdb/cataloger.go +++ b/syft/cataloger/rpmdb/cataloger.go @@ -1,10 +1,10 @@ package rpmdb import ( - "github.com/anchore/imgbom/imgbom/cataloger/common" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/cataloger/common" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Cataloger struct { diff --git a/imgbom/cataloger/rpmdb/parse_rpmdb.go b/syft/cataloger/rpmdb/parse_rpmdb.go similarity index 89% rename from imgbom/cataloger/rpmdb/parse_rpmdb.go rename to syft/cataloger/rpmdb/parse_rpmdb.go index a524ce3a0..8c9189856 100644 --- a/imgbom/cataloger/rpmdb/parse_rpmdb.go +++ b/syft/cataloger/rpmdb/parse_rpmdb.go @@ -6,9 +6,9 @@ import ( "io/ioutil" "os" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/internal" - "github.com/anchore/imgbom/internal/log" + "github.com/anchore/syft/internal" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/syft/pkg" rpmdb "github.com/wagoodman/go-rpmdb/pkg" ) diff --git a/imgbom/cataloger/rpmdb/parse_rpmdb_test.go b/syft/cataloger/rpmdb/parse_rpmdb_test.go similarity index 95% rename from imgbom/cataloger/rpmdb/parse_rpmdb_test.go rename to syft/cataloger/rpmdb/parse_rpmdb_test.go index c38d13e9d..2ff8e5273 100644 --- a/imgbom/cataloger/rpmdb/parse_rpmdb_test.go +++ b/syft/cataloger/rpmdb/parse_rpmdb_test.go @@ -1,7 +1,7 @@ package rpmdb import ( - "github.com/anchore/imgbom/imgbom/pkg" + "github.com/anchore/syft/syft/pkg" "github.com/go-test/deep" "os" "testing" diff --git a/imgbom/cataloger/rpmdb/test-fixtures/Packages b/syft/cataloger/rpmdb/test-fixtures/Packages similarity index 100% rename from imgbom/cataloger/rpmdb/test-fixtures/Packages rename to syft/cataloger/rpmdb/test-fixtures/Packages diff --git a/imgbom/cataloger/rpmdb/test-fixtures/generate-fixture.sh b/syft/cataloger/rpmdb/test-fixtures/generate-fixture.sh similarity index 100% rename from imgbom/cataloger/rpmdb/test-fixtures/generate-fixture.sh rename to syft/cataloger/rpmdb/test-fixtures/generate-fixture.sh diff --git a/imgbom/distro/distro.go b/syft/distro/distro.go similarity index 100% rename from imgbom/distro/distro.go rename to syft/distro/distro.go diff --git a/imgbom/distro/distro_test.go b/syft/distro/distro_test.go similarity index 100% rename from imgbom/distro/distro_test.go rename to syft/distro/distro_test.go diff --git a/imgbom/distro/identify.go b/syft/distro/identify.go similarity index 96% rename from imgbom/distro/identify.go rename to syft/distro/identify.go index 548e9ff49..2199577af 100644 --- a/imgbom/distro/identify.go +++ b/syft/distro/identify.go @@ -4,9 +4,9 @@ import ( "regexp" "strings" - "github.com/anchore/imgbom/imgbom/scope" - "github.com/anchore/imgbom/internal/log" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/syft/scope" ) // returns a distro or nil diff --git a/imgbom/distro/identify_test.go b/syft/distro/identify_test.go similarity index 98% rename from imgbom/distro/identify_test.go rename to syft/distro/identify_test.go index 549f552b8..2dcbd9ce9 100644 --- a/imgbom/distro/identify_test.go +++ b/syft/distro/identify_test.go @@ -6,9 +6,9 @@ import ( "os" "testing" - "github.com/anchore/imgbom/internal" + "github.com/anchore/syft/internal" - "github.com/anchore/imgbom/imgbom/scope" + "github.com/anchore/syft/syft/scope" ) func TestIdentifyDistro(t *testing.T) { diff --git a/imgbom/distro/test-fixtures/bad-id b/syft/distro/test-fixtures/bad-id similarity index 100% rename from imgbom/distro/test-fixtures/bad-id rename to syft/distro/test-fixtures/bad-id diff --git a/imgbom/distro/test-fixtures/bad-version b/syft/distro/test-fixtures/bad-version similarity index 100% rename from imgbom/distro/test-fixtures/bad-version rename to syft/distro/test-fixtures/bad-version diff --git a/imgbom/distro/test-fixtures/centos-8 b/syft/distro/test-fixtures/centos-8 similarity index 100% rename from imgbom/distro/test-fixtures/centos-8 rename to syft/distro/test-fixtures/centos-8 diff --git a/imgbom/distro/test-fixtures/debian-8 b/syft/distro/test-fixtures/debian-8 similarity index 100% rename from imgbom/distro/test-fixtures/debian-8 rename to syft/distro/test-fixtures/debian-8 diff --git a/imgbom/distro/test-fixtures/os/alpine/etc/os-release b/syft/distro/test-fixtures/os/alpine/etc/os-release similarity index 100% rename from imgbom/distro/test-fixtures/os/alpine/etc/os-release rename to syft/distro/test-fixtures/os/alpine/etc/os-release diff --git a/imgbom/distro/test-fixtures/os/amazon/etc/os-release b/syft/distro/test-fixtures/os/amazon/etc/os-release similarity index 100% rename from imgbom/distro/test-fixtures/os/amazon/etc/os-release rename to syft/distro/test-fixtures/os/amazon/etc/os-release diff --git a/imgbom/distro/test-fixtures/os/busybox/bin/busybox b/syft/distro/test-fixtures/os/busybox/bin/busybox similarity index 100% rename from imgbom/distro/test-fixtures/os/busybox/bin/busybox rename to syft/distro/test-fixtures/os/busybox/bin/busybox diff --git a/imgbom/distro/test-fixtures/os/centos/usr/lib/os-release b/syft/distro/test-fixtures/os/centos/usr/lib/os-release similarity index 100% rename from imgbom/distro/test-fixtures/os/centos/usr/lib/os-release rename to syft/distro/test-fixtures/os/centos/usr/lib/os-release diff --git a/imgbom/distro/test-fixtures/os/debian/usr/lib/os-release b/syft/distro/test-fixtures/os/debian/usr/lib/os-release similarity index 100% rename from imgbom/distro/test-fixtures/os/debian/usr/lib/os-release rename to syft/distro/test-fixtures/os/debian/usr/lib/os-release diff --git a/imgbom/distro/test-fixtures/os/empty/etc/os-release b/syft/distro/test-fixtures/os/empty/etc/os-release similarity index 100% rename from imgbom/distro/test-fixtures/os/empty/etc/os-release rename to syft/distro/test-fixtures/os/empty/etc/os-release diff --git a/imgbom/distro/test-fixtures/os/fedora/usr/lib/os-release b/syft/distro/test-fixtures/os/fedora/usr/lib/os-release similarity index 100% rename from imgbom/distro/test-fixtures/os/fedora/usr/lib/os-release rename to syft/distro/test-fixtures/os/fedora/usr/lib/os-release diff --git a/imgbom/distro/test-fixtures/os/redhat/usr/lib/os-release b/syft/distro/test-fixtures/os/redhat/usr/lib/os-release similarity index 100% rename from imgbom/distro/test-fixtures/os/redhat/usr/lib/os-release rename to syft/distro/test-fixtures/os/redhat/usr/lib/os-release diff --git a/imgbom/distro/test-fixtures/os/ubuntu/etc/os-release b/syft/distro/test-fixtures/os/ubuntu/etc/os-release similarity index 100% rename from imgbom/distro/test-fixtures/os/ubuntu/etc/os-release rename to syft/distro/test-fixtures/os/ubuntu/etc/os-release diff --git a/imgbom/distro/test-fixtures/os/unmatchable/etc/os-release b/syft/distro/test-fixtures/os/unmatchable/etc/os-release similarity index 100% rename from imgbom/distro/test-fixtures/os/unmatchable/etc/os-release rename to syft/distro/test-fixtures/os/unmatchable/etc/os-release diff --git a/imgbom/distro/test-fixtures/rhel-8 b/syft/distro/test-fixtures/rhel-8 similarity index 100% rename from imgbom/distro/test-fixtures/rhel-8 rename to syft/distro/test-fixtures/rhel-8 diff --git a/imgbom/distro/test-fixtures/ubuntu-20.04 b/syft/distro/test-fixtures/ubuntu-20.04 similarity index 100% rename from imgbom/distro/test-fixtures/ubuntu-20.04 rename to syft/distro/test-fixtures/ubuntu-20.04 diff --git a/imgbom/distro/test-fixtures/unprintable b/syft/distro/test-fixtures/unprintable similarity index 100% rename from imgbom/distro/test-fixtures/unprintable rename to syft/distro/test-fixtures/unprintable diff --git a/imgbom/distro/type.go b/syft/distro/type.go similarity index 100% rename from imgbom/distro/type.go rename to syft/distro/type.go diff --git a/imgbom/event/event.go b/syft/event/event.go similarity index 100% rename from imgbom/event/event.go rename to syft/event/event.go diff --git a/imgbom/event/parsers/parsers.go b/syft/event/parsers/parsers.go similarity index 91% rename from imgbom/event/parsers/parsers.go rename to syft/event/parsers/parsers.go index 6ae79ad5b..f39ab9b6e 100644 --- a/imgbom/event/parsers/parsers.go +++ b/syft/event/parsers/parsers.go @@ -3,9 +3,9 @@ package parsers import ( "fmt" - "github.com/anchore/imgbom/imgbom/cataloger" - "github.com/anchore/imgbom/imgbom/event" - "github.com/anchore/imgbom/imgbom/presenter" + "github.com/anchore/syft/syft/cataloger" + "github.com/anchore/syft/syft/event" + "github.com/anchore/syft/syft/presenter" "github.com/wagoodman/go-partybus" ) diff --git a/imgbom/lib.go b/syft/lib.go similarity index 74% rename from imgbom/lib.go rename to syft/lib.go index e22dae76e..271b7b175 100644 --- a/imgbom/lib.go +++ b/syft/lib.go @@ -1,13 +1,13 @@ -package imgbom +package syft import ( - "github.com/anchore/imgbom/imgbom/cataloger" - "github.com/anchore/imgbom/imgbom/distro" - "github.com/anchore/imgbom/imgbom/logger" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" - "github.com/anchore/imgbom/internal/bus" - "github.com/anchore/imgbom/internal/log" + "github.com/anchore/syft/internal/bus" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/syft/cataloger" + "github.com/anchore/syft/syft/distro" + "github.com/anchore/syft/syft/logger" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" "github.com/wagoodman/go-partybus" ) diff --git a/imgbom/logger/logger.go b/syft/logger/logger.go similarity index 100% rename from imgbom/logger/logger.go rename to syft/logger/logger.go diff --git a/imgbom/pkg/catalog.go b/syft/pkg/catalog.go similarity index 98% rename from imgbom/pkg/catalog.go rename to syft/pkg/catalog.go index 09322d0e6..5d143c220 100644 --- a/imgbom/pkg/catalog.go +++ b/syft/pkg/catalog.go @@ -4,8 +4,8 @@ import ( "sort" "sync" - "github.com/anchore/imgbom/internal/log" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/internal/log" ) // TODO: add reader methods (by type, id, fuzzy search, etc) diff --git a/imgbom/pkg/language.go b/syft/pkg/language.go similarity index 100% rename from imgbom/pkg/language.go rename to syft/pkg/language.go diff --git a/imgbom/pkg/metadata.go b/syft/pkg/metadata.go similarity index 100% rename from imgbom/pkg/metadata.go rename to syft/pkg/metadata.go diff --git a/imgbom/pkg/package.go b/syft/pkg/package.go similarity index 100% rename from imgbom/pkg/package.go rename to syft/pkg/package.go diff --git a/imgbom/pkg/type.go b/syft/pkg/type.go similarity index 100% rename from imgbom/pkg/type.go rename to syft/pkg/type.go diff --git a/imgbom/presenter/json/presenter.go b/syft/presenter/json/presenter.go similarity index 94% rename from imgbom/presenter/json/presenter.go rename to syft/presenter/json/presenter.go index e9b549e39..3bff0c147 100644 --- a/imgbom/presenter/json/presenter.go +++ b/syft/presenter/json/presenter.go @@ -5,9 +5,9 @@ import ( "fmt" "io" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" - "github.com/anchore/imgbom/internal/log" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Presenter struct { diff --git a/imgbom/presenter/json/presenter_test.go b/syft/presenter/json/presenter_test.go similarity index 96% rename from imgbom/presenter/json/presenter_test.go rename to syft/presenter/json/presenter_test.go index 8e890be2c..aa6ce6d66 100644 --- a/imgbom/presenter/json/presenter_test.go +++ b/syft/presenter/json/presenter_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/anchore/go-testutils" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" "github.com/sergi/go-diff/diffmatchpatch" ) diff --git a/imgbom/presenter/json/test-fixtures/image-simple/Dockerfile b/syft/presenter/json/test-fixtures/image-simple/Dockerfile similarity index 100% rename from imgbom/presenter/json/test-fixtures/image-simple/Dockerfile rename to syft/presenter/json/test-fixtures/image-simple/Dockerfile diff --git a/imgbom/presenter/json/test-fixtures/image-simple/file-1.txt b/syft/presenter/json/test-fixtures/image-simple/file-1.txt similarity index 100% rename from imgbom/presenter/json/test-fixtures/image-simple/file-1.txt rename to syft/presenter/json/test-fixtures/image-simple/file-1.txt diff --git a/imgbom/presenter/json/test-fixtures/image-simple/file-2.txt b/syft/presenter/json/test-fixtures/image-simple/file-2.txt similarity index 100% rename from imgbom/presenter/json/test-fixtures/image-simple/file-2.txt rename to syft/presenter/json/test-fixtures/image-simple/file-2.txt diff --git a/imgbom/presenter/json/test-fixtures/image-simple/target/really/nested/file-3.txt b/syft/presenter/json/test-fixtures/image-simple/target/really/nested/file-3.txt similarity index 100% rename from imgbom/presenter/json/test-fixtures/image-simple/target/really/nested/file-3.txt rename to syft/presenter/json/test-fixtures/image-simple/target/really/nested/file-3.txt diff --git a/imgbom/presenter/json/test-fixtures/snapshot/TestJsonDirsPresenter.golden b/syft/presenter/json/test-fixtures/snapshot/TestJsonDirsPresenter.golden similarity index 100% rename from imgbom/presenter/json/test-fixtures/snapshot/TestJsonDirsPresenter.golden rename to syft/presenter/json/test-fixtures/snapshot/TestJsonDirsPresenter.golden diff --git a/imgbom/presenter/json/test-fixtures/snapshot/TestJsonImgsPresenter.golden b/syft/presenter/json/test-fixtures/snapshot/TestJsonImgsPresenter.golden similarity index 100% rename from imgbom/presenter/json/test-fixtures/snapshot/TestJsonImgsPresenter.golden rename to syft/presenter/json/test-fixtures/snapshot/TestJsonImgsPresenter.golden diff --git a/imgbom/presenter/json/test-fixtures/snapshot/anchore-fixture-image-simple.golden b/syft/presenter/json/test-fixtures/snapshot/anchore-fixture-image-simple.golden similarity index 100% rename from imgbom/presenter/json/test-fixtures/snapshot/anchore-fixture-image-simple.golden rename to syft/presenter/json/test-fixtures/snapshot/anchore-fixture-image-simple.golden diff --git a/imgbom/presenter/option.go b/syft/presenter/option.go similarity index 100% rename from imgbom/presenter/option.go rename to syft/presenter/option.go diff --git a/imgbom/presenter/presenter.go b/syft/presenter/presenter.go similarity index 68% rename from imgbom/presenter/presenter.go rename to syft/presenter/presenter.go index f39e3748a..f3859b039 100644 --- a/imgbom/presenter/presenter.go +++ b/syft/presenter/presenter.go @@ -3,10 +3,10 @@ package presenter import ( "io" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/presenter/json" - "github.com/anchore/imgbom/imgbom/presenter/text" - "github.com/anchore/imgbom/imgbom/scope" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/presenter/json" + "github.com/anchore/syft/syft/presenter/text" + "github.com/anchore/syft/syft/scope" ) type Presenter interface { diff --git a/imgbom/presenter/text/presenter.go b/syft/presenter/text/presenter.go similarity index 94% rename from imgbom/presenter/text/presenter.go rename to syft/presenter/text/presenter.go index b17e1b154..ea7cc1c64 100644 --- a/imgbom/presenter/text/presenter.go +++ b/syft/presenter/text/presenter.go @@ -6,8 +6,8 @@ import ( "io" "text/tabwriter" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) type Presenter struct { diff --git a/imgbom/presenter/text/presenter_test.go b/syft/presenter/text/presenter_test.go similarity index 97% rename from imgbom/presenter/text/presenter_test.go rename to syft/presenter/text/presenter_test.go index f81a467a3..84ee62ccb 100644 --- a/imgbom/presenter/text/presenter_test.go +++ b/syft/presenter/text/presenter_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/anchore/go-testutils" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" "github.com/sergi/go-diff/diffmatchpatch" ) diff --git a/imgbom/presenter/text/test-fixtures/image-simple/Dockerfile b/syft/presenter/text/test-fixtures/image-simple/Dockerfile similarity index 100% rename from imgbom/presenter/text/test-fixtures/image-simple/Dockerfile rename to syft/presenter/text/test-fixtures/image-simple/Dockerfile diff --git a/imgbom/presenter/text/test-fixtures/image-simple/file-1.txt b/syft/presenter/text/test-fixtures/image-simple/file-1.txt similarity index 100% rename from imgbom/presenter/text/test-fixtures/image-simple/file-1.txt rename to syft/presenter/text/test-fixtures/image-simple/file-1.txt diff --git a/imgbom/presenter/text/test-fixtures/image-simple/file-2.txt b/syft/presenter/text/test-fixtures/image-simple/file-2.txt similarity index 100% rename from imgbom/presenter/text/test-fixtures/image-simple/file-2.txt rename to syft/presenter/text/test-fixtures/image-simple/file-2.txt diff --git a/imgbom/presenter/text/test-fixtures/snapshot/TestJsonPresenter.golden b/syft/presenter/text/test-fixtures/snapshot/TestJsonPresenter.golden similarity index 100% rename from imgbom/presenter/text/test-fixtures/snapshot/TestJsonPresenter.golden rename to syft/presenter/text/test-fixtures/snapshot/TestJsonPresenter.golden diff --git a/imgbom/presenter/text/test-fixtures/snapshot/TestTextDirPresenter.golden b/syft/presenter/text/test-fixtures/snapshot/TestTextDirPresenter.golden similarity index 100% rename from imgbom/presenter/text/test-fixtures/snapshot/TestTextDirPresenter.golden rename to syft/presenter/text/test-fixtures/snapshot/TestTextDirPresenter.golden diff --git a/imgbom/presenter/text/test-fixtures/snapshot/TestTextImgPresenter.golden b/syft/presenter/text/test-fixtures/snapshot/TestTextImgPresenter.golden similarity index 100% rename from imgbom/presenter/text/test-fixtures/snapshot/TestTextImgPresenter.golden rename to syft/presenter/text/test-fixtures/snapshot/TestTextImgPresenter.golden diff --git a/imgbom/presenter/text/test-fixtures/snapshot/TestTextPresenter.golden b/syft/presenter/text/test-fixtures/snapshot/TestTextPresenter.golden similarity index 100% rename from imgbom/presenter/text/test-fixtures/snapshot/TestTextPresenter.golden rename to syft/presenter/text/test-fixtures/snapshot/TestTextPresenter.golden diff --git a/imgbom/scope/option.go b/syft/scope/option.go similarity index 100% rename from imgbom/scope/option.go rename to syft/scope/option.go diff --git a/imgbom/scope/option_test.go b/syft/scope/option_test.go similarity index 100% rename from imgbom/scope/option_test.go rename to syft/scope/option_test.go diff --git a/imgbom/scope/protocol.go b/syft/scope/protocol.go similarity index 100% rename from imgbom/scope/protocol.go rename to syft/scope/protocol.go diff --git a/imgbom/scope/protocol_test.go b/syft/scope/protocol_test.go similarity index 100% rename from imgbom/scope/protocol_test.go rename to syft/scope/protocol_test.go diff --git a/imgbom/scope/resolver.go b/syft/scope/resolver.go similarity index 94% rename from imgbom/scope/resolver.go rename to syft/scope/resolver.go index 913442fd1..ab0a9752b 100644 --- a/imgbom/scope/resolver.go +++ b/syft/scope/resolver.go @@ -3,9 +3,9 @@ package scope import ( "fmt" - "github.com/anchore/imgbom/imgbom/scope/resolvers" "github.com/anchore/stereoscope/pkg/file" "github.com/anchore/stereoscope/pkg/image" + "github.com/anchore/syft/syft/scope/resolvers" ) type Resolver interface { diff --git a/imgbom/scope/resolvers/all_layers_resolver.go b/syft/scope/resolvers/all_layers_resolver.go similarity index 100% rename from imgbom/scope/resolvers/all_layers_resolver.go rename to syft/scope/resolvers/all_layers_resolver.go diff --git a/imgbom/scope/resolvers/all_layers_resolver_test.go b/syft/scope/resolvers/all_layers_resolver_test.go similarity index 100% rename from imgbom/scope/resolvers/all_layers_resolver_test.go rename to syft/scope/resolvers/all_layers_resolver_test.go diff --git a/imgbom/scope/resolvers/directory_resolver.go b/syft/scope/resolvers/directory_resolver.go similarity index 97% rename from imgbom/scope/resolvers/directory_resolver.go rename to syft/scope/resolvers/directory_resolver.go index 7d01f1122..697384f1c 100644 --- a/imgbom/scope/resolvers/directory_resolver.go +++ b/syft/scope/resolvers/directory_resolver.go @@ -6,8 +6,8 @@ import ( "os" "path" - "github.com/anchore/imgbom/internal/log" "github.com/anchore/stereoscope/pkg/file" + "github.com/anchore/syft/internal/log" "github.com/bmatcuk/doublestar" ) diff --git a/imgbom/scope/resolvers/directory_resolver_test.go b/syft/scope/resolvers/directory_resolver_test.go similarity index 100% rename from imgbom/scope/resolvers/directory_resolver_test.go rename to syft/scope/resolvers/directory_resolver_test.go diff --git a/imgbom/scope/resolvers/image_squash_resolver.go b/syft/scope/resolvers/image_squash_resolver.go similarity index 100% rename from imgbom/scope/resolvers/image_squash_resolver.go rename to syft/scope/resolvers/image_squash_resolver.go diff --git a/imgbom/scope/resolvers/image_squash_resolver_test.go b/syft/scope/resolvers/image_squash_resolver_test.go similarity index 100% rename from imgbom/scope/resolvers/image_squash_resolver_test.go rename to syft/scope/resolvers/image_squash_resolver_test.go diff --git a/imgbom/scope/resolvers/test-fixtures/image-symlinks/Dockerfile b/syft/scope/resolvers/test-fixtures/image-symlinks/Dockerfile similarity index 100% rename from imgbom/scope/resolvers/test-fixtures/image-symlinks/Dockerfile rename to syft/scope/resolvers/test-fixtures/image-symlinks/Dockerfile diff --git a/imgbom/scope/resolvers/test-fixtures/image-symlinks/file-1.txt b/syft/scope/resolvers/test-fixtures/image-symlinks/file-1.txt similarity index 100% rename from imgbom/scope/resolvers/test-fixtures/image-symlinks/file-1.txt rename to syft/scope/resolvers/test-fixtures/image-symlinks/file-1.txt diff --git a/imgbom/scope/resolvers/test-fixtures/image-symlinks/file-2.txt b/syft/scope/resolvers/test-fixtures/image-symlinks/file-2.txt similarity index 100% rename from imgbom/scope/resolvers/test-fixtures/image-symlinks/file-2.txt rename to syft/scope/resolvers/test-fixtures/image-symlinks/file-2.txt diff --git a/imgbom/scope/resolvers/test-fixtures/image-symlinks/nested/nested/file-3.txt b/syft/scope/resolvers/test-fixtures/image-symlinks/nested/nested/file-3.txt similarity index 100% rename from imgbom/scope/resolvers/test-fixtures/image-symlinks/nested/nested/file-3.txt rename to syft/scope/resolvers/test-fixtures/image-symlinks/nested/nested/file-3.txt diff --git a/imgbom/scope/resolvers/test-fixtures/image-symlinks/new-file-2.txt b/syft/scope/resolvers/test-fixtures/image-symlinks/new-file-2.txt similarity index 100% rename from imgbom/scope/resolvers/test-fixtures/image-symlinks/new-file-2.txt rename to syft/scope/resolvers/test-fixtures/image-symlinks/new-file-2.txt diff --git a/imgbom/scope/scope.go b/syft/scope/scope.go similarity index 96% rename from imgbom/scope/scope.go rename to syft/scope/scope.go index 476b651b1..8254d8fd3 100644 --- a/imgbom/scope/scope.go +++ b/syft/scope/scope.go @@ -5,10 +5,10 @@ import ( "github.com/anchore/stereoscope" - "github.com/anchore/imgbom/imgbom/scope/resolvers" - "github.com/anchore/imgbom/internal/log" "github.com/anchore/stereoscope/pkg/file" "github.com/anchore/stereoscope/pkg/image" + "github.com/anchore/syft/internal/log" + "github.com/anchore/syft/syft/scope/resolvers" ) type ImageSource struct { diff --git a/imgbom/scope/scope_test.go b/syft/scope/scope_test.go similarity index 100% rename from imgbom/scope/scope_test.go rename to syft/scope/scope_test.go diff --git a/imgbom/scope/test-fixtures/path-detected/.vimrc b/syft/scope/test-fixtures/path-detected/.vimrc similarity index 100% rename from imgbom/scope/test-fixtures/path-detected/.vimrc rename to syft/scope/test-fixtures/path-detected/.vimrc diff --git a/imgbom/scope/test-fixtures/path-detected/empty b/syft/scope/test-fixtures/path-detected/empty similarity index 100% rename from imgbom/scope/test-fixtures/path-detected/empty rename to syft/scope/test-fixtures/path-detected/empty diff --git a/test/acceptance/compare.py b/test/acceptance/compare.py index f4dcb5f13..78a00e337 100755 --- a/test/acceptance/compare.py +++ b/test/acceptance/compare.py @@ -8,7 +8,7 @@ Package = collections.namedtuple("Package", "name type version") Vulnerability = collections.namedtuple("Vulnerability", "cve package") -class ImgBom: +class syft: def __init__(self, report_path): self.report_path = report_path @@ -34,10 +34,10 @@ class ImgBom: def main(baseline_report, new_report): - report1_obj = ImgBom(report_path=baseline_report) + report1_obj = syft(report_path=baseline_report) report1_packages, report1_metadata = report1_obj.packages() - report2_obj = ImgBom(report_path=new_report) + report2_obj = syft(report_path=new_report) report2_packages, report2_metadata = report2_obj.packages() if len(report2_packages) == 0 and len(report1_packages) == 0: @@ -101,9 +101,9 @@ def main(baseline_report, new_report): if __name__ == "__main__": - print("\nComparing two imgbom reports...\n") + print("\nComparing two syft reports...\n") if len(sys.argv) != 3: - sys.exit("please provide two imgbom json files") + sys.exit("please provide two syft json files") rc = main(sys.argv[1], sys.argv[2]) sys.exit(rc) diff --git a/test/acceptance/deb.sh b/test/acceptance/deb.sh index ef540f4e9..04bb39757 100755 --- a/test/acceptance/deb.sh +++ b/test/acceptance/deb.sh @@ -6,7 +6,7 @@ ACC_DIR=$2 TEST_IMAGE=$3 TEST_TYPE=deb -WORK_DIR=`mktemp -d -t "imgbom-acceptance-test-${TEST_TYPE}-XXXXXX"` +WORK_DIR=`mktemp -d -t "syft-acceptance-test-${TEST_TYPE}-XXXXXX"` NORMAL_TEST_IMAGE=$(echo ${TEST_IMAGE} | tr ':' '-' ) REPORT=${WORK_DIR}/acceptance-${TEST_TYPE}-${NORMAL_TEST_IMAGE}.json GOLDEN_REPORT=${ACC_DIR}/test-fixtures/acceptance-${NORMAL_TEST_IMAGE}.json @@ -26,7 +26,7 @@ trap cleanup EXIT # fetch test image docker pull ${TEST_IMAGE} -# install and run imgbom +# install and run syft docker run --rm \ -v /var/run/docker.sock://var/run/docker.sock \ -v /${PWD}:/src \ @@ -34,9 +34,9 @@ docker run --rm \ -w /src \ ubuntu:latest \ /bin/bash -x -c "\ - DEBIAN_FRONTEND=noninteractive apt install ${DISTDIR}/imgbom_*_linux_amd64.deb -y && \ - imgbom version -v && \ - imgbom ${TEST_IMAGE} -vv -o json > ${REPORT} && \ + DEBIAN_FRONTEND=noninteractive apt install ${DISTDIR}/syft_*_linux_amd64.deb -y && \ + syft version -v && \ + syft ${TEST_IMAGE} -vv -o json > ${REPORT} && \ cat ${REPORT} \ " diff --git a/test/acceptance/mac.sh b/test/acceptance/mac.sh index 111dcc313..ccde718ad 100755 --- a/test/acceptance/mac.sh +++ b/test/acceptance/mac.sh @@ -7,7 +7,7 @@ TEST_IMAGE=$3 TEST_IMAGE_TAR=/tmp/image.tar TEST_TYPE=mac -WORK_DIR=`mktemp -d -t "imgbom-acceptance-test-${TEST_TYPE}-XXXXXX"` +WORK_DIR=`mktemp -d -t "syft-acceptance-test-${TEST_TYPE}-XXXXXX"` NORMAL_TEST_IMAGE=$(echo ${TEST_IMAGE} | tr ':' '-' ) REPORT=${WORK_DIR}/acceptance-${TEST_TYPE}-${NORMAL_TEST_IMAGE}.json GOLDEN_REPORT=${ACC_DIR}/test-fixtures/acceptance-${NORMAL_TEST_IMAGE}.json @@ -31,10 +31,10 @@ skopeo --version || brew install https://raw.githubusercontent.com/Homebrew/home skopeo --override-os linux copy docker://docker.io/${TEST_IMAGE} docker-archive:${TEST_IMAGE_TAR} ls -alh ${TEST_IMAGE_TAR} -# run imgbom -chmod 755 ${DISTDIR}/imgbom_darwin_amd64/imgbom -${DISTDIR}/imgbom_darwin_amd64/imgbom version -v -${DISTDIR}/imgbom_darwin_amd64/imgbom docker-archive://${TEST_IMAGE_TAR} -vv -o json > ${REPORT} +# run syft +chmod 755 ${DISTDIR}/syft_darwin_amd64/syft +${DISTDIR}/syft_darwin_amd64/syft version -v +${DISTDIR}/syft_darwin_amd64/syft docker-archive://${TEST_IMAGE_TAR} -vv -o json > ${REPORT} cat ${REPORT} # compare the results to a known good output diff --git a/test/acceptance/rpm.sh b/test/acceptance/rpm.sh index ee74141f6..d41058fe8 100755 --- a/test/acceptance/rpm.sh +++ b/test/acceptance/rpm.sh @@ -6,7 +6,7 @@ ACC_DIR=$2 TEST_IMAGE=$3 TEST_TYPE=rpm -WORK_DIR=`mktemp -d -t "imgbom-acceptance-test-${TEST_TYPE}-XXXXXX"` +WORK_DIR=`mktemp -d -t "syft-acceptance-test-${TEST_TYPE}-XXXXXX"` NORMAL_TEST_IMAGE=$(echo ${TEST_IMAGE} | tr ':' '-' ) REPORT=${WORK_DIR}/acceptance-${TEST_TYPE}-${NORMAL_TEST_IMAGE}.json GOLDEN_REPORT=${ACC_DIR}/test-fixtures/acceptance-${NORMAL_TEST_IMAGE}.json @@ -26,7 +26,7 @@ trap cleanup EXIT # fetch test image docker pull ${TEST_IMAGE} -# install and run imgbom +# install and run syft docker run --rm \ -v /var/run/docker.sock://var/run/docker.sock \ -v /${PWD}:/src \ @@ -34,9 +34,9 @@ docker run --rm \ -w /src \ centos:latest \ /bin/bash -x -c "\ - rpm -ivh ${DISTDIR}/imgbom_*_linux_amd64.rpm && \ - imgbom version -v && \ - imgbom ${TEST_IMAGE} -vv -o json > ${REPORT} && \ + rpm -ivh ${DISTDIR}/syft_*_linux_amd64.rpm && \ + syft version -v && \ + syft ${TEST_IMAGE} -vv -o json > ${REPORT} && \ cat ${REPORT} \ " diff --git a/test/inline-compare/Dockerfile b/test/inline-compare/Dockerfile index 349efdc53..71e426221 100644 --- a/test/inline-compare/Dockerfile +++ b/test/inline-compare/Dockerfile @@ -1,7 +1,7 @@ FROM python:3 WORKDIR / -COPY imgbom-reports /imgbom-reports +COPY syft-reports /syft-reports COPY inline-reports /inline-reports COPY compare.py . ENTRYPOINT ["/compare.py"] \ No newline at end of file diff --git a/test/inline-compare/Makefile b/test/inline-compare/Makefile index c01339def..aa1639942 100644 --- a/test/inline-compare/Makefile +++ b/test/inline-compare/Makefile @@ -1,12 +1,12 @@ IMAGE = "centos:8" IMAGE_CLEAN = $(shell echo $(IMAGE) | tr ":" "_") -IMGBOM_DIR = imgbom-reports -IMGBOM_REPORT = $(IMGBOM_DIR)/$(IMAGE_CLEAN).json +syft_DIR = syft-reports +syft_REPORT = $(syft_DIR)/$(IMAGE_CLEAN).json INLINE_DIR = inline-reports INLINE_REPORT = $(INLINE_DIR)/$(IMAGE_CLEAN)-content-os.json -ifndef IMGBOM_DIR - $(error IMGBOM_DIR is not set) +ifndef syft_DIR + $(error syft_DIR is not set) endif ifndef INLINE_DIR @@ -17,9 +17,9 @@ endif all: compare .PHONY: compare -compare: $(INLINE_REPORT) $(IMGBOM_REPORT) - docker build -t compare-imgbom:latest . - docker run compare-imgbom:latest $(IMAGE) +compare: $(INLINE_REPORT) $(syft_REPORT) + docker build -t compare-syft:latest . + docker run compare-syft:latest $(IMAGE) $(INLINE_REPORT): echo "Creating $(INLINE_REPORT)..." @@ -28,12 +28,12 @@ $(INLINE_REPORT): mv anchore-reports/* $(INLINE_DIR)/ rmdir anchore-reports -$(IMGBOM_REPORT): - echo "Creating $(IMGBOM_REPORT)..." - mkdir -p $(IMGBOM_DIR) +$(syft_REPORT): + echo "Creating $(syft_REPORT)..." + mkdir -p $(syft_DIR) docker pull $(IMAGE) - go run ../../main.go $(IMAGE) -o json > $(IMGBOM_REPORT) + go run ../../main.go $(IMAGE) -o json > $(syft_REPORT) .PHONY: clean clean: - rm -f $(INLINE_DIR)/* $(IMGBOM_DIR)/* \ No newline at end of file + rm -f $(INLINE_DIR)/* $(syft_DIR)/* \ No newline at end of file diff --git a/test/inline-compare/compare.py b/test/inline-compare/compare.py index 8d239510e..edd730caf 100755 --- a/test/inline-compare/compare.py +++ b/test/inline-compare/compare.py @@ -63,7 +63,7 @@ class InlineScan: return packages, metadata -class ImgBom: +class syft: report_tmpl = "{image}.json" @@ -100,50 +100,50 @@ def main(image): inline = InlineScan(image=image, report_dir="inline-reports") inline_packages, inline_metadata = inline.packages() - imgbom = ImgBom(image=image, report_dir="imgbom-reports") - imgbom_packages, imgbom_metadata = imgbom.packages() + syft = syft(image=image, report_dir="syft-reports") + syft_packages, syft_metadata = syft.packages() - if len(imgbom_packages) == 0 and len(inline_packages) == 0: + if len(syft_packages) == 0 and len(inline_packages) == 0: print("nobody found any packages") return 0 - same_packages = imgbom_packages & inline_packages + same_packages = syft_packages & inline_packages percent_overlap_packages = ( float(len(same_packages)) / float(len(inline_packages)) ) * 100.0 - bonus_packages = imgbom_packages - inline_packages - missing_pacakges = inline_packages - imgbom_packages + bonus_packages = syft_packages - inline_packages + missing_pacakges = inline_packages - syft_packages inline_metadata_set = set() for package in inline_packages: metadata = inline_metadata[package.type][package] inline_metadata_set.add((package, metadata)) - imgbom_metadata_set = set() - for package in imgbom_packages: - metadata = imgbom_metadata[package.type][package] - imgbom_metadata_set.add((package, metadata)) + syft_metadata_set = set() + for package in syft_packages: + metadata = syft_metadata[package.type][package] + syft_metadata_set.add((package, metadata)) - same_metadata = imgbom_metadata_set & inline_metadata_set + same_metadata = syft_metadata_set & inline_metadata_set percent_overlap_metadata = ( float(len(same_metadata)) / float(len(inline_metadata_set)) ) * 100.0 if len(bonus_packages) > 0: - print("Imgbom Bonus packages:") + print("syft Bonus packages:") for package in sorted(list(bonus_packages)): print(" " + repr(package)) print() if len(missing_pacakges) > 0: - print("Imgbom Missing packages:") + print("syft Missing packages:") for package in sorted(list(missing_pacakges)): print(" " + repr(package)) print() print("Inline Packages: %d" % len(inline_packages)) - print("Imgbom Packages: %d" % len(imgbom_packages)) + print("syft Packages: %d" % len(syft_packages)) print() print( "Baseline Packages Matched: %2.3f %% (%d/%d packages)" diff --git a/test/integration/fixture_image_distro_test.go b/test/integration/fixture_image_distro_test.go index 4f618da1d..b0376de91 100644 --- a/test/integration/fixture_image_distro_test.go +++ b/test/integration/fixture_image_distro_test.go @@ -5,11 +5,11 @@ package integration import ( "testing" - "github.com/anchore/imgbom/imgbom" + "github.com/anchore/syft/syft" "github.com/anchore/go-testutils" - "github.com/anchore/imgbom/imgbom/distro" - "github.com/anchore/imgbom/imgbom/scope" + "github.com/anchore/syft/syft/distro" + "github.com/anchore/syft/syft/scope" "github.com/go-test/deep" ) @@ -19,7 +19,7 @@ func TestDistroImage(t *testing.T) { tarPath := testutils.GetFixtureImageTarPath(t, fixtureImageName) defer cleanup() - _, _, actualDistro, err := imgbom.Catalog("docker-archive://"+tarPath, scope.AllLayersScope) + _, _, actualDistro, err := syft.Catalog("docker-archive://"+tarPath, scope.AllLayersScope) if err != nil { t.Fatalf("failed to catalog image: %+v", err) } diff --git a/test/integration/fixture_pkg_coverage_test.go b/test/integration/fixture_pkg_coverage_test.go index d070365c0..3040191fc 100644 --- a/test/integration/fixture_pkg_coverage_test.go +++ b/test/integration/fixture_pkg_coverage_test.go @@ -5,13 +5,13 @@ package integration import ( "testing" - "github.com/anchore/imgbom/imgbom" + "github.com/anchore/syft/syft" - "github.com/anchore/imgbom/internal" + "github.com/anchore/syft/internal" "github.com/anchore/go-testutils" - "github.com/anchore/imgbom/imgbom/pkg" - "github.com/anchore/imgbom/imgbom/scope" + "github.com/anchore/syft/syft/pkg" + "github.com/anchore/syft/syft/scope" ) var cases = []struct { @@ -166,7 +166,7 @@ func TestPkgCoverageImage(t *testing.T) { tarPath := testutils.GetFixtureImageTarPath(t, fixtureImageName) defer cleanup() - catalog, _, _, err := imgbom.Catalog("docker-archive://"+tarPath, scope.AllLayersScope) + catalog, _, _, err := syft.Catalog("docker-archive://"+tarPath, scope.AllLayersScope) if err != nil { t.Fatalf("failed to catalog image: %+v", err) } @@ -237,7 +237,7 @@ func TestPkgCoverageImage(t *testing.T) { } func TestPkgCoverageDirectory(t *testing.T) { - catalog, _, _, err := imgbom.Catalog("dir://test-fixtures/image-pkg-coverage", scope.AllLayersScope) + catalog, _, _, err := syft.Catalog("dir://test-fixtures/image-pkg-coverage", scope.AllLayersScope) if err != nil { t.Errorf("unable to create scope from dir: %+v", err) diff --git a/test/integration/test-fixtures/.gitignore b/test/integration/test-fixtures/.gitignore index 48e7892ff..dd0492871 100644 --- a/test/integration/test-fixtures/.gitignore +++ b/test/integration/test-fixtures/.gitignore @@ -1,5 +1,5 @@ # we should strive to not commit blobs to the repo and strive to keep the build process of how blobs are acquired in-repo. -# this blob is generated from imgbom/imgbom/catalogers/java/test-fixtures/java-builds , however, preserving the build process +# this blob is generated from syft/syft/catalogers/java/test-fixtures/java-builds , however, preserving the build process # twice in the repo seems redundant (even via symlink). Given that the fixture is a few kilobytes in size, the build process is already # captured, and integration tests should only be testing if jars can be discovered (not necessarily depth in java detection # functionality), committing it seems like an acceptable exception. diff --git a/test/integration/test-fixtures/image-pkg-coverage/go/go.mod b/test/integration/test-fixtures/image-pkg-coverage/go/go.mod index 93da53fdf..4edcf7e8b 100644 --- a/test/integration/test-fixtures/image-pkg-coverage/go/go.mod +++ b/test/integration/test-fixtures/image-pkg-coverage/go/go.mod @@ -1,4 +1,4 @@ -module github.com/anchore/imgbom +module github.com/anchore/syft go 1.14 diff --git a/test/integration/test-fixtures/image-pkg-coverage/java/generate-fixtures.md b/test/integration/test-fixtures/image-pkg-coverage/java/generate-fixtures.md index b642a9d53..249a21023 100644 --- a/test/integration/test-fixtures/image-pkg-coverage/java/generate-fixtures.md +++ b/test/integration/test-fixtures/image-pkg-coverage/java/generate-fixtures.md @@ -1 +1 @@ -See the imgbom/cataloger/java/test-fixtures/java-builds dir to generate test fixtures and copy to here manually. \ No newline at end of file +See the syft/cataloger/java/test-fixtures/java-builds dir to generate test fixtures and copy to here manually. \ No newline at end of file