mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
Pad artifact IDs (#1882)
Otherwise the hash can sometimes be short if it results in a low uint64. Signed-off-by: Will Murphy <will.murphy@anchore.com>
This commit is contained in:
parent
badb957888
commit
e2ed89f700
@ -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
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "e7c88bd18e11b0b",
|
||||
"id": "0e7c88bd18e11b0b",
|
||||
"location": {
|
||||
"path": "/a/place/a"
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user