Update syft bootstrap tools to latest versions. (#1171)

* Update syft bootstrap tools to latest versions.

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Weston Steimel <weston.steimel@anchore.com>
Co-authored-by: Weston Steimel <weston.steimel@anchore.com>
This commit is contained in:
anchore-actions-token-generator[bot]
2022-08-23 20:36:59 +01:00
committed by GitHub
co-authored by Weston Steimel
parent 6949a2500f
commit b0fc955e0c
21 changed files with 161 additions and 137 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ func importProgress(source string) (*progress.Stage, *progress.Manual) {
return stage, prog
}
// nolint:funlen
//nolint:funlen
func (c *Client) Import(ctx context.Context, cfg ImportConfig) error {
stage, prog := importProgress(c.config.BaseURL)
+1 -1
View File
@@ -1,4 +1,4 @@
// nolint:dupl
//nolint:dupl
package anchore
import (
+1 -1
View File
@@ -1,4 +1,4 @@
// nolint: dupl
//nolint:dupl
package anchore
import (
+1 -1
View File
@@ -30,7 +30,7 @@ func (cfg registry) loadDefaultValues(v *viper.Viper) {
v.SetDefault("registry.auth", []RegistryCredentials{})
}
// nolint:unparam
//nolint:unparam
func (cfg *registry) parseConfigValues() error {
// there may be additional credentials provided by env var that should be appended to the set of credentials
authority, username, password, token :=
+2 -1
View File
@@ -95,7 +95,8 @@ type directoryEnd struct {
}
// note: this is derived from readDirectoryEnd within the archive/zip package
// nolint:gocognit
//
//nolint:gocognit
func findArchiveStartOffset(r io.ReaderAt, size int64) (startOfArchive uint64, err error) {
// look for directoryEndSignature in the last 1k, then in the last 65k
var buf []byte
+1 -1
View File
@@ -190,7 +190,7 @@ func DecodeInto(obj interface{}, values map[string]string, prefix string, fn Fie
decode(values, value, prefix, fn)
}
// nolint: funlen, gocognit, gocyclo
//nolint:funlen,gocognit,gocyclo
func decode(vals map[string]string, value reflect.Value, prefix string, fn FieldName) bool {
if !value.IsValid() || value.Type() == nil {
return false
@@ -14,7 +14,8 @@ import (
)
// toFormatModel creates and populates a new JSON document struct that follows the SPDX 2.2 spec from the given cataloging results.
// nolint:funlen
//
//nolint:funlen
func toFormatModel(s sbom.SBOM) *spdx.Document2_2 {
name, namespace := spdxhelpers.DocumentNameAndNamespace(s.Source)
@@ -87,7 +88,8 @@ func toFormatModel(s sbom.SBOM) *spdx.Document2_2 {
}
// packages populates all Package Information from the package Catalog (see https://spdx.github.io/spdx-spec/3-package-information/)
// nolint: funlen
//
//nolint:funlen
func toFormatPackages(catalog *pkg.Catalog) map[spdx.ElementID]*spdx.Package2_2 {
results := make(map[spdx.ElementID]*spdx.Package2_2)
+1 -1
View File
@@ -72,7 +72,7 @@ func (p *Package) UnmarshalJSON(b []byte) error {
return err
}
// nolint:funlen,gocognit,gocyclo
//nolint:funlen,gocognit,gocyclo
func unpackMetadata(p *Package, unpacker packageMetadataUnpacker) error {
p.MetadataType = unpacker.MetadataType
switch p.MetadataType {