mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00: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
2 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue