Improve support for cataloging nix package relationships (#3837)

* add nix DB cataloger

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* add derivation path to nix store pkg metadata

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* go mod tidy

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* allow for derivation path to be optional

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* repin build image and disable syscall filtering

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* bump storage capacity

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* track nix derivation details on packages

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* image fixture should have derivation examples

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* address comments

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:
Alex Goodman
2025-05-05 15:35:13 +00:00
committed by GitHub
parent 7505a04aad
commit d47a6c3a6d
28 changed files with 4997 additions and 234 deletions
File diff suppressed because it is too large Load Diff
+46 -4
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "anchore.io/schema/syft/json/16.0.27/document",
"$id": "anchore.io/schema/syft/json/16.0.28/document",
"$ref": "#/$defs/Document",
"$defs": {
"AlpmDbEntry": {
@@ -1660,14 +1660,57 @@
"kb"
]
},
"NixDerivation": {
"properties": {
"path": {
"type": "string"
},
"system": {
"type": "string"
},
"inputDerivations": {
"items": {
"$ref": "#/$defs/NixDerivationReference"
},
"type": "array"
},
"inputSources": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"NixDerivationReference": {
"properties": {
"path": {
"type": "string"
},
"outputs": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"NixStoreEntry": {
"properties": {
"outputHash": {
"path": {
"type": "string"
},
"output": {
"type": "string"
},
"outputHash": {
"type": "string"
},
"derivation": {
"$ref": "#/$defs/NixDerivation"
},
"files": {
"items": {
"type": "string"
@@ -1677,8 +1720,7 @@
},
"type": "object",
"required": [
"outputHash",
"files"
"outputHash"
]
},
"OpamPackage": {