diff --git a/syft/artifact/id.go b/syft/artifact/id.go index 4b87fd293c1..c53ca7c9ad0 100644 --- a/syft/artifact/id.go +++ b/syft/artifact/id.go @@ -22,5 +22,5 @@ func IDByHash(obj interface{}) (ID, error) { return "", fmt.Errorf("could not build ID for object=%+v: %w", obj, err) } - return ID(fmt.Sprintf("%x", f)), nil + return ID(fmt.Sprintf("%016x", f)), nil } diff --git a/syft/formats/syftjson/test-fixtures/snapshot/TestEncodeFullJSONDocument.golden b/syft/formats/syftjson/test-fixtures/snapshot/TestEncodeFullJSONDocument.golden index c039a245730..daca7eb5ed6 100644 --- a/syft/formats/syftjson/test-fixtures/snapshot/TestEncodeFullJSONDocument.golden +++ b/syft/formats/syftjson/test-fixtures/snapshot/TestEncodeFullJSONDocument.golden @@ -91,7 +91,7 @@ } }, { - "id": "e7c88bd18e11b0b", + "id": "0e7c88bd18e11b0b", "location": { "path": "/a/place/a" },