mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 10:36:45 +01:00
Update GitHub format package_url and correlator (#961)
This commit is contained in:
parent
b7295b79de
commit
248023baaf
@ -130,7 +130,7 @@ func toGithubManifests(s *sbom.SBOM) Manifests {
|
|||||||
|
|
||||||
name := dependencyName(p)
|
name := dependencyName(p)
|
||||||
manifest.Resolved[name] = DependencyNode{
|
manifest.Resolved[name] = DependencyNode{
|
||||||
Purl: p.PURL,
|
PackageURL: p.PURL,
|
||||||
Metadata: toDependencyMetadata(p),
|
Metadata: toDependencyMetadata(p),
|
||||||
Relationship: toDependencyRelationshipType(p),
|
Relationship: toDependencyRelationshipType(p),
|
||||||
Scope: toDependencyScope(p),
|
Scope: toDependencyScope(p),
|
||||||
|
|||||||
@ -104,12 +104,12 @@ func Test_toGithubModel(t *testing.T) {
|
|||||||
},
|
},
|
||||||
Resolved: DependencyGraph{
|
Resolved: DependencyGraph{
|
||||||
"pkg:generic/pkg-1@1.0.1": DependencyNode{
|
"pkg:generic/pkg-1@1.0.1": DependencyNode{
|
||||||
Purl: "pkg:generic/pkg-1@1.0.1",
|
PackageURL: "pkg:generic/pkg-1@1.0.1",
|
||||||
Scope: DependencyScopeRuntime,
|
Scope: DependencyScopeRuntime,
|
||||||
Relationship: DependencyRelationshipDirect,
|
Relationship: DependencyRelationshipDirect,
|
||||||
},
|
},
|
||||||
"pkg:generic/pkg-2@2.0.2": DependencyNode{
|
"pkg:generic/pkg-2@2.0.2": DependencyNode{
|
||||||
Purl: "pkg:generic/pkg-2@2.0.2",
|
PackageURL: "pkg:generic/pkg-2@2.0.2",
|
||||||
Scope: DependencyScopeRuntime,
|
Scope: DependencyScopeRuntime,
|
||||||
Relationship: DependencyRelationshipDirect,
|
Relationship: DependencyRelationshipDirect,
|
||||||
},
|
},
|
||||||
@ -125,7 +125,7 @@ func Test_toGithubModel(t *testing.T) {
|
|||||||
},
|
},
|
||||||
Resolved: DependencyGraph{
|
Resolved: DependencyGraph{
|
||||||
"pkg:generic/pkg-3@3.0.3": DependencyNode{
|
"pkg:generic/pkg-3@3.0.3": DependencyNode{
|
||||||
Purl: "pkg:generic/pkg-3@3.0.3",
|
PackageURL: "pkg:generic/pkg-3@3.0.3",
|
||||||
Scope: DependencyScopeRuntime,
|
Scope: DependencyScopeRuntime,
|
||||||
Relationship: DependencyRelationshipDirect,
|
Relationship: DependencyRelationshipDirect,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -14,7 +14,7 @@ type DependencySnapshot struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Job struct {
|
type Job struct {
|
||||||
Name string `json:"name,omitempty"` // !omitempty
|
Correlator string `json:"correlator,omitempty"` // !omitempty
|
||||||
ID string `json:"id,omitempty"` // !omitempty
|
ID string `json:"id,omitempty"` // !omitempty
|
||||||
HTMLURL string `json:"html_url,omitempty"`
|
HTMLURL string `json:"html_url,omitempty"`
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type DependencyNode struct {
|
type DependencyNode struct {
|
||||||
Purl string `json:"purl,omitempty"`
|
PackageURL string `json:"package_url,omitempty"`
|
||||||
Metadata Metadata `json:"metadata,omitempty"`
|
Metadata Metadata `json:"metadata,omitempty"`
|
||||||
Relationship DependencyRelationship `json:"relationship,omitempty"`
|
Relationship DependencyRelationship `json:"relationship,omitempty"`
|
||||||
Scope DependencyScope `json:"scope,omitempty"`
|
Scope DependencyScope `json:"scope,omitempty"`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user