Graph-Native Infrastructure for Context and Accountable AI Systems
Python agent-memoryaiai-governanceai-infrastructureartificial-intelligencecontext-engineeringcontext-graphsdata-engineeringdecision-intelligencedeveloper-toolsexplainable-aigenerative-aigraph-ragknowledge-graphllmontologyprovenancepythonreasoningsemantic-search
fix seed SSRF (#942)
Zohaib Hassnain4a886d970e01
diff --git a/semantica/seed/seed_manager.py b/semantica/seed/seed_manager.pyindex 6e52c382..3e6ebbf8 100644--- a/semantica/seed/seed_manager.py+++ b/semantica/seed/seed_manager.py@@ -38,6 +38,7 @@ from datetime import datetimefrom pathlib import Pathfrom typing import Any, Dict, List, Optional, Union+from ..ingest.ssrf import request_with_ssrf_guardfrom ..utils.exceptions import ProcessingError, ValidationErrorfrom ..utils.helpers import read_json_file, write_json_filefrom ..utils.logging import get_logger@@ -456,8 +457,8 @@ class SeedDataManager:"""Load seed data from API.- Makes an HTTP GET request to an API endpoint and parses the JSON- response. Handles various response structures (list, dict with+ Makes an SSRF-protected HTTP GET request to an API endpoint and parses+ the JSON response. Handles various response structures (list, dict with'entities', 'data', 'results', 'items' keys). Automatically addsentity_type, relationship_type, and source metadata if provided.@@ -493,8 +494,6 @@ class SeedDataManager:... )"""try:- import requests-# Build full URLif endpoint:full_url = f"{api_url.rstrip('/')}/{endpoint.lstrip('/')}"