mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
* remove power-user document shape Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add power-user specific fields to syft-json format Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * port remaining spdx-json relationships to sbom model Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add coordinate set Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add SBOM file path helper Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * use internal mimetype helper in go binary cataloger Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add new package-of relationship Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * update json schema to v2 Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * replace power-user presenter with syft-json format Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * fix tests and linting Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * remove "package-of" relationship (in favor of "contains") Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * add tests for spdx22json format encoding enhancements Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * update TODO and log entries Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * introduce sbom.Descriptor Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
26 lines
1.4 KiB
Go
26 lines
1.4 KiB
Go
package model
|
|
|
|
// Document represents the syft cataloging findings as a JSON document
|
|
type Document struct {
|
|
Artifacts []Package `json:"artifacts"` // Artifacts is the list of packages discovered and placed into the catalog
|
|
ArtifactRelationships []Relationship `json:"artifactRelationships"`
|
|
Files []File `json:"files,omitempty"` // note: must have omitempty
|
|
Secrets []Secrets `json:"secrets,omitempty"` // note: must have omitempty
|
|
Source Source `json:"source"` // Source represents the original object that was cataloged
|
|
Distro Distro `json:"distro"` // Distro represents the Linux distribution that was detected from the source
|
|
Descriptor Descriptor `json:"descriptor"` // Descriptor is a block containing self-describing information about syft
|
|
Schema Schema `json:"schema"` // Schema is a block reserved for defining the version for the shape of this JSON document and where to find the schema document to validate the shape
|
|
}
|
|
|
|
// Descriptor describes what created the document as well as surrounding metadata
|
|
type Descriptor struct {
|
|
Name string `json:"name"`
|
|
Version string `json:"version"`
|
|
Configuration interface{} `json:"configuration,omitempty"`
|
|
}
|
|
|
|
type Schema struct {
|
|
Version string `json:"version"`
|
|
URL string `json:"url"`
|
|
}
|