Skip to content

Commit

Permalink
Merge branch 'main' into 835-keyless-attestation-upgrade
Browse files Browse the repository at this point in the history
* main:
  feat: add initial dotnet-support (#951)
  unblock timeout for power-user select CLI tests (#985)
  golang cataloger - main module version as is (#986)
  Fix `github-json` output option (#967)
  read Go main module version as is - (devel) (#981)
  reduce logging severity for non-Go binaries (#983)
  golang.org/x/crypto upgrade (#979)
  • Loading branch information
spiffcs committed May 6, 2022
2 parents 02196db + 1cea0ec commit e43e426
Show file tree
Hide file tree
Showing 36 changed files with 2,217 additions and 37 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -31,6 +31,7 @@ A CLI tool and Go library for generating a Software Bill of Materials (SBOM) fro
- Alpine (apk)
- Dart (pubs)
- Debian (dpkg)
- Dotnet (deps.json)
- Go (go.mod, Go binaries)
- Java (jar, ear, war, par, sar)
- JavaScript (npm, yarn)
Expand Down Expand Up @@ -160,6 +161,7 @@ Where the `formats` available are:
- `cyclonedx-json`: A JSON report conforming to the [CycloneDX 1.4 specification](https://cyclonedx.org/specification/overview/).
- `spdx-tag-value`: A tag-value formatted report conforming to the [SPDX 2.2 specification](https://spdx.github.io/spdx-spec/).
- `spdx-json`: A JSON report conforming to the [SPDX 2.2 JSON Schema](https://github.com/spdx/spdx-spec/blob/v2.2/schemas/spdx-schema.json).
- `github`: A JSON report conforming to GitHub's dependency snapshot format.
- `table`: A columnar summary (default).

#### Multiple outputs
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -13,7 +13,7 @@ require (
github.com/anchore/go-rpmdb v0.0.0-20210914181456-a9c52348da63
github.com/anchore/go-testutils v0.0.0-20200925183923-d5f45b0d3c04
github.com/anchore/go-version v1.2.2-0.20200701162849-18adb9c92b9b
github.com/anchore/packageurl-go v0.1.1-0.20220314153042-1bcd40e5206b
github.com/anchore/packageurl-go v0.1.1-0.20220428202044-a072fa3cb6d7
github.com/anchore/stereoscope v0.0.0-20220406160859-c03a18a6b270
github.com/antihax/optional v1.0.0
github.com/bmatcuk/doublestar/v4 v4.0.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -272,8 +272,8 @@ github.com/anchore/go-testutils v0.0.0-20200925183923-d5f45b0d3c04 h1:VzprUTpc0v
github.com/anchore/go-testutils v0.0.0-20200925183923-d5f45b0d3c04/go.mod h1:6dK64g27Qi1qGQZ67gFmBFvEHScy0/C8qhQhNe5B5pQ=
github.com/anchore/go-version v1.2.2-0.20200701162849-18adb9c92b9b h1:e1bmaoJfZVsCYMrIZBpFxwV26CbsuoEh5muXD5I1Ods=
github.com/anchore/go-version v1.2.2-0.20200701162849-18adb9c92b9b/go.mod h1:Bkc+JYWjMCF8OyZ340IMSIi2Ebf3uwByOk6ho4wne1E=
github.com/anchore/packageurl-go v0.1.1-0.20220314153042-1bcd40e5206b h1:YJWYt/6KQXR9JR46lLHrTTYi8rcye42tKcyjREA/hvA=
github.com/anchore/packageurl-go v0.1.1-0.20220314153042-1bcd40e5206b/go.mod h1:Blo6OgJNiYF41ufcgHKkbCKF2MDOMlrqhXv/ij6ocR4=
github.com/anchore/packageurl-go v0.1.1-0.20220428202044-a072fa3cb6d7 h1:kDrYkTSM9uIxaX/P9s0F4nKYNM+hnSgLJdLpqvsaQ/g=
github.com/anchore/packageurl-go v0.1.1-0.20220428202044-a072fa3cb6d7/go.mod h1:Blo6OgJNiYF41ufcgHKkbCKF2MDOMlrqhXv/ij6ocR4=
github.com/anchore/stereoscope v0.0.0-20220406160859-c03a18a6b270 h1:NmxPDR6vo3xjwCL6o+tpF1vUad/BVo+WaVSwueB9W9w=
github.com/anchore/stereoscope v0.0.0-20220406160859-c03a18a6b270/go.mod h1:yoCLUZY0k/pYLNIy0L80p2Ko0PKVNXm8rHtgxp4OiSc=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
Expand Down
2 changes: 1 addition & 1 deletion internal/constants.go
Expand Up @@ -6,5 +6,5 @@ const (

// JSONSchemaVersion is the current schema version output by the JSON encoder
// This is roughly following the "SchemaVer" guidelines for versioning the JSON schema. Please see schema/json/README.md for details on how to increment.
JSONSchemaVersion = "3.2.2"
JSONSchemaVersion = "3.2.3"
)
2 changes: 2 additions & 0 deletions internal/formats/common/spdxhelpers/source_info.go
Expand Up @@ -17,6 +17,8 @@ func SourceInfo(p pkg.Package) string {
answer = "acquired package info from pubspec manifest"
case pkg.DebPkg:
answer = "acquired package info from DPKG DB"
case pkg.DotnetPkg:
answer = "acquired package info from dotnet project assets file"
case pkg.NpmPkg:
answer = "acquired package info from installed node module manifest file"
case pkg.PythonPkg:
Expand Down
8 changes: 8 additions & 0 deletions internal/formats/common/spdxhelpers/source_info_test.go
Expand Up @@ -134,6 +134,14 @@ func Test_SourceInfo(t *testing.T) {
"from pubspec manifest",
},
},
{
input: pkg.Package{
Type: pkg.DotnetPkg,
},
expected: []string{
"from dotnet project assets file",
},
},
}
var pkgTypes []pkg.Type
for _, test := range tests {
Expand Down
6 changes: 6 additions & 0 deletions internal/formats/syftjson/model/package.go
Expand Up @@ -136,6 +136,12 @@ func (p *Package) UnmarshalJSON(b []byte) error {
return err
}
p.Metadata = payload
case pkg.DotnetDepsMetadataType:
var payload pkg.DotnetDepsMetadata
if err := json.Unmarshal(unpacker.Metadata, &payload); err != nil {
return err
}
p.Metadata = payload
default:
log.Warnf("unknown package metadata type=%q for packageID=%q", p.MetadataType, p.ID)
}
Expand Down
Expand Up @@ -88,7 +88,7 @@
}
},
"schema": {
"version": "3.2.2",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.2.json"
"version": "3.2.3",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.3.json"
}
}
Expand Up @@ -184,7 +184,7 @@
}
},
"schema": {
"version": "3.2.2",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.2.json"
"version": "3.2.3",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.3.json"
}
}
Expand Up @@ -111,7 +111,7 @@
}
},
"schema": {
"version": "3.2.2",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.2.json"
"version": "3.2.3",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.3.json"
}
}
1 change: 1 addition & 0 deletions schema/json/generate.go
Expand Up @@ -38,6 +38,7 @@ type artifactMetadataContainer struct {
Go pkg.GolangBinMetadata
Php pkg.PhpComposerJSONMetadata
Dart pkg.DartPubMetadata
Dotnet pkg.DotnetDepsMetadata
}

func main() {
Expand Down

0 comments on commit e43e426

Please sign in to comment.