diff --git a/.github/ecosystem-specific-schema.json b/.github/ecosystem-specific-schema.json new file mode 100644 index 00000000..8e11f607 --- /dev/null +++ b/.github/ecosystem-specific-schema.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ecosystem_specific schema validation", + "description": "Validates the ecosystem_specific field in PYSEC advisory entries", + "type": "object", + "properties": { + "affected": { + "type": "array", + "items": { + "type": "object", + "properties": { + "ecosystem_specific": { + "$ref": "#/$defs/ecosystem_specific" + } + } + } + } + }, + "$defs": { + "ecosystem_specific": { + "type": "object", + "required": ["imports"], + "additionalProperties": false, + "properties": { + "imports": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": ["attribute", "modules"], + "additionalProperties": false, + "properties": { + "attribute": { + "type": "string", + "minLength": 1 + }, + "modules": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "minLength": 1 + } + } + } + } + } + } + } + } +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5368cde0..727aff35 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,6 +5,10 @@ repos: - id: check-jsonschema files: "^vulns/[a-z0-9_-]+/.+\\.yaml" args: [--schemafile, "https://raw.githubusercontent.com/ossf/osv-schema/refs/tags/v1.6.7/validation/schema.json", --no-cache] + - id: check-jsonschema + name: validate ecosystem_specific + files: "^vulns/[a-z0-9_-]+/.+\\.yaml" + args: [--schemafile, ".github/ecosystem-specific-schema.json"] - repo: https://github.com/jackdewinter/pymarkdown rev: v0.9.25 hooks: diff --git a/vulns/langchain-community/PYSEC-2025-70.yaml b/vulns/langchain-community/PYSEC-2025-70.yaml index 8bb55519..6c57b062 100644 --- a/vulns/langchain-community/PYSEC-2025-70.yaml +++ b/vulns/langchain-community/PYSEC-2025-70.yaml @@ -26,6 +26,11 @@ affected: events: - introduced: "0" - fixed: 0.0.28 + ecosystem_specific: + imports: + - attribute: RequestsToolkit + modules: + - langchain_community.agent_toolkits.openapi.toolkit versions: - 0.0.1 - 0.0.10 diff --git a/vulns/llama-index/PYSEC-2025-65.yaml b/vulns/llama-index/PYSEC-2025-65.yaml index f3cb14f8..580652d5 100644 --- a/vulns/llama-index/PYSEC-2025-65.yaml +++ b/vulns/llama-index/PYSEC-2025-65.yaml @@ -25,6 +25,11 @@ affected: events: - introduced: 0.12.27 - fixed: 0.12.41 + ecosystem_specific: + imports: + - attribute: ImageDocument + modules: + - llama_index.core.schema versions: - 0.12.27 - 0.12.28 diff --git a/vulns/pillow/PYSEC-2025-61.yaml b/vulns/pillow/PYSEC-2025-61.yaml index ecaf89e9..a16c1b32 100644 --- a/vulns/pillow/PYSEC-2025-61.yaml +++ b/vulns/pillow/PYSEC-2025-61.yaml @@ -17,6 +17,11 @@ affected: versions: - 11.2.0 - 11.2.1 + ecosystem_specific: + imports: + - attribute: save + modules: + - PIL.Image aliases: - CVE-2025-48379 - GHSA-xg8h-j46f-w952