mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
Add modularitylabel metadata to RPM type records generated by syft (#1148)
* bump cosign to v1.10.1 (#1144) Signed-off-by: Daniel Nurmi <nurmi@anchore.com> * Add modularitylabel metadata to RPM type records generated by syft. Fixes #1145. Signed-off-by: Daniel Nurmi <nurmi@anchore.com> * update to address lint failures Signed-off-by: Daniel Nurmi <nurmi@anchore.com> * Update syft/pkg/rpmdb_metadata.go Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com> Signed-off-by: Daniel Nurmi <nurmi@anchore.com> * update json schema to match camel case Signed-off-by: Alex Goodman <alex.goodman@anchore.com> Co-authored-by: Weston Steimel <weston.steimel@anchore.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
4df84d380d
commit
04387301ce
@ -6,5 +6,5 @@ const (
|
|||||||
|
|
||||||
// JSONSchemaVersion is the current schema version output by the JSON encoder
|
// 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.
|
// 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.3.1"
|
JSONSchemaVersion = "3.3.2"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -88,7 +88,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.3.1.json"
|
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.3.2.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -184,7 +184,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.3.1.json"
|
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.3.2.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,7 +111,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.3.1.json"
|
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.3.2.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1467
schema/json/schema-3.3.2.json
Normal file
1467
schema/json/schema-3.3.2.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -69,16 +69,17 @@ func newPkg(resolver source.FilePathResolver, dbLocation source.Location, entry
|
|||||||
}
|
}
|
||||||
|
|
||||||
metadata := pkg.RpmdbMetadata{
|
metadata := pkg.RpmdbMetadata{
|
||||||
Name: entry.Name,
|
Name: entry.Name,
|
||||||
Version: entry.Version,
|
Version: entry.Version,
|
||||||
Epoch: entry.Epoch,
|
Epoch: entry.Epoch,
|
||||||
Arch: entry.Arch,
|
Arch: entry.Arch,
|
||||||
Release: entry.Release,
|
Release: entry.Release,
|
||||||
SourceRpm: entry.SourceRpm,
|
SourceRpm: entry.SourceRpm,
|
||||||
Vendor: entry.Vendor,
|
Vendor: entry.Vendor,
|
||||||
License: entry.License,
|
License: entry.License,
|
||||||
Size: entry.Size,
|
Size: entry.Size,
|
||||||
Files: fileRecords,
|
ModularityLabel: entry.Modularitylabel,
|
||||||
|
Files: fileRecords,
|
||||||
}
|
}
|
||||||
|
|
||||||
p := pkg.Package{
|
p := pkg.Package{
|
||||||
|
|||||||
@ -26,16 +26,17 @@ var (
|
|||||||
|
|
||||||
// RpmdbMetadata represents all captured data for a RPM DB package entry.
|
// RpmdbMetadata represents all captured data for a RPM DB package entry.
|
||||||
type RpmdbMetadata struct {
|
type RpmdbMetadata struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Version string `json:"version"`
|
Version string `json:"version"`
|
||||||
Epoch *int `json:"epoch" cyclonedx:"epoch" jsonschema:"nullable"`
|
Epoch *int `json:"epoch" cyclonedx:"epoch" jsonschema:"nullable"`
|
||||||
Arch string `json:"architecture"`
|
Arch string `json:"architecture"`
|
||||||
Release string `json:"release" cyclonedx:"release"`
|
Release string `json:"release" cyclonedx:"release"`
|
||||||
SourceRpm string `json:"sourceRpm" cyclonedx:"sourceRpm"`
|
SourceRpm string `json:"sourceRpm" cyclonedx:"sourceRpm"`
|
||||||
Size int `json:"size" cyclonedx:"size"`
|
Size int `json:"size" cyclonedx:"size"`
|
||||||
License string `json:"license"`
|
License string `json:"license"`
|
||||||
Vendor string `json:"vendor"`
|
Vendor string `json:"vendor"`
|
||||||
Files []RpmdbFileRecord `json:"files"`
|
ModularityLabel string `json:"modularityLabel"`
|
||||||
|
Files []RpmdbFileRecord `json:"files"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// RpmdbFileRecord represents the file metadata for a single file attributed to a RPM package.
|
// RpmdbFileRecord represents the file metadata for a single file attributed to a RPM package.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user