Add relationships for python poetry packages (#2906)

* [wip] add initial poetry.lock relationship support

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

* provide generic set for basic types

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

* dependency resolver should allow for conditional deps

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

* add tests for poetry lock relationship additions

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

* update schema with python poetry dependency refs

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

* dep specification data structure should not be recursive in nature

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
2024-06-04 20:00:05 +00:00
committed by GitHub
parent 4bdbd1aa2a
commit 3472b48177
31 changed files with 5820 additions and 159 deletions
File diff suppressed because it is too large Load Diff
+63 -4
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "anchore.io/schema/syft/json/16.0.12/document",
"$id": "anchore.io/schema/syft/json/16.0.13/document",
"$ref": "#/$defs/Document",
"$defs": {
"AlpmDbEntry": {
@@ -2051,15 +2051,74 @@
"index"
]
},
"PythonPoetryLockEntry": {
"PythonPoetryLockDependencyEntry": {
"properties": {
"index": {
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"optional": {
"type": "boolean"
},
"markers": {
"type": "string"
},
"extras": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"required": [
"index"
"name",
"version",
"optional"
]
},
"PythonPoetryLockEntry": {
"properties": {
"index": {
"type": "string"
},
"dependencies": {
"items": {
"$ref": "#/$defs/PythonPoetryLockDependencyEntry"
},
"type": "array"
},
"extras": {
"items": {
"$ref": "#/$defs/PythonPoetryLockExtraEntry"
},
"type": "array"
}
},
"type": "object",
"required": [
"index",
"dependencies"
]
},
"PythonPoetryLockExtraEntry": {
"properties": {
"name": {
"type": "string"
},
"dependencies": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"required": [
"name",
"dependencies"
]
},
"RDescription": {