Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cdupuis committed Jan 19, 2023
1 parent 0d53038 commit 89e7b65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions sbom/syft.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ import (
"github.com/anchore/syft/syft/pkg/cataloger/deb"
"github.com/anchore/syft/syft/pkg/cataloger/rpm"
"github.com/anchore/syft/syft/source"
"github.com/atomist-skills/go-skill"
"github.com/pkg/errors"

"github.com/atomist-skills/go-skill"

"github.com/docker/index-cli-plugin/registry"
"github.com/docker/index-cli-plugin/sbom/detect"
"github.com/docker/index-cli-plugin/sbom/util"
Expand All @@ -57,7 +58,7 @@ func syftSbom(cache *registry.ImageCache, lm *types.LayerMapping, resultChan cha
resultChan <- result
return
}

d, qualifiers := osQualifiers(distro)
result.Distro = d

Expand Down Expand Up @@ -111,7 +112,7 @@ func syftSbom(cache *registry.ImageCache, lm *types.LayerMapping, resultChan cha
}
}
}

result.Packages = make([]types.Package, 0)
packages := packageCatalog.Sorted()
for _, p := range packages {
Expand Down
7 changes: 4 additions & 3 deletions sbom/trivy.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ import (
"github.com/aquasecurity/trivy/pkg/fanal/image"
stypes "github.com/aquasecurity/trivy/pkg/fanal/types"
"github.com/aquasecurity/trivy/pkg/fanal/utils"
"github.com/atomist-skills/go-skill"
"github.com/pkg/errors"

"github.com/atomist-skills/go-skill"

"github.com/docker/index-cli-plugin/registry"
"github.com/docker/index-cli-plugin/types"
)
Expand Down Expand Up @@ -67,7 +68,7 @@ func trivySbom(cache *registry.ImageCache, lm *types.LayerMapping, resultChan ch
resultChan <- result
return
}

art, err := aimage.NewArtifact(img, cacheClient, configOptions())
if err != nil {
result.Status = types.Failed
Expand Down Expand Up @@ -226,7 +227,7 @@ func configOptions() artifact.Option {
DisabledAnalyzers: []analyzer.Type{analyzer.TypeDockerfile, analyzer.TypeSecret, analyzer.TypeHelm, analyzer.TypeTerraform, analyzer.TypeJSON, analyzer.TypeYaml},
}
if v, ok := os.LookupEnv("ATOMIST_OFFLINE"); ok {
if o, err := strconv.ParseBool(v); err == nil && o{
if o, err := strconv.ParseBool(v); err == nil && o {
opts.Offline = true
}
}
Expand Down

0 comments on commit 89e7b65

Please sign in to comment.