mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 15:06:36 +01:00
Add accessPath on Location objects to syft-json output (#2287)
* add accessPath on Location objects to syft-json output Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * generate json schema v12.0.1 Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -117,7 +117,7 @@ func TestEncodeFullJSONDocument(t *testing.T) {
|
||||
Artifacts: sbom.Artifacts{
|
||||
Packages: catalog,
|
||||
FileMetadata: map[file.Coordinates]file.Metadata{
|
||||
file.NewLocation("/a/place").Coordinates: {
|
||||
file.NewVirtualLocation("/a/place", "/a/symlink/to/place").Coordinates: {
|
||||
FileInfo: stereoFile.ManualInfo{
|
||||
NameValue: "/a/place",
|
||||
ModeValue: 0775,
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
"foundBy": "the-cataloger-1",
|
||||
"locations": [
|
||||
{
|
||||
"path": "/some/path/pkg1"
|
||||
"path": "/some/path/pkg1",
|
||||
"accessPath": "/some/path/pkg1"
|
||||
}
|
||||
],
|
||||
"licenses": [
|
||||
@@ -48,7 +49,8 @@
|
||||
"foundBy": "the-cataloger-2",
|
||||
"locations": [
|
||||
{
|
||||
"path": "/some/path/pkg1"
|
||||
"path": "/some/path/pkg1",
|
||||
"accessPath": "/some/path/pkg1"
|
||||
}
|
||||
],
|
||||
"licenses": [],
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
"foundBy": "the-cataloger-1",
|
||||
"locations": [
|
||||
{
|
||||
"path": "/a/place/a"
|
||||
"path": "/a/place/a",
|
||||
"accessPath": "/a/place/a"
|
||||
}
|
||||
],
|
||||
"licenses": [
|
||||
@@ -43,7 +44,8 @@
|
||||
"foundBy": "the-cataloger-2",
|
||||
"locations": [
|
||||
{
|
||||
"path": "/b/place/b"
|
||||
"path": "/b/place/b",
|
||||
"accessPath": "/b/place/b"
|
||||
}
|
||||
],
|
||||
"licenses": [],
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
"locations": [
|
||||
{
|
||||
"path": "/somefile-1.txt",
|
||||
"layerID": "sha256:100d5a55f9032faead28b7427fa3e650e4f0158f86ea89d06e1489df00cb8c6f"
|
||||
"layerID": "sha256:100d5a55f9032faead28b7427fa3e650e4f0158f86ea89d06e1489df00cb8c6f",
|
||||
"accessPath": "/somefile-1.txt"
|
||||
}
|
||||
],
|
||||
"licenses": [
|
||||
@@ -45,7 +46,8 @@
|
||||
"locations": [
|
||||
{
|
||||
"path": "/somefile-2.txt",
|
||||
"layerID": "sha256:000fb9200890d3a19138478b20023023c0dce1c54352007c2863716780f049eb"
|
||||
"layerID": "sha256:000fb9200890d3a19138478b20023023c0dce1c54352007c2863716780f049eb",
|
||||
"accessPath": "/somefile-2.txt"
|
||||
}
|
||||
],
|
||||
"licenses": [],
|
||||
|
||||
Reference in New Issue
Block a user