diff --git a/pentestagent/tools/notes/__init__.py b/pentestagent/tools/notes/__init__.py index 4a3883e..8a90e8e 100644 --- a/pentestagent/tools/notes/__init__.py +++ b/pentestagent/tools/notes/__init__.py @@ -210,19 +210,51 @@ def _validate_note_schema(category: str, metadata: Dict[str, Any]) -> str | None }, "services": { "type": "array", - "description": "Array of service objects with port, product, version (e.g., [{'port': 80, 'product': 'Apache', 'version': '2.2.8'}])", + "description": "Array of service objects with port, product, version", + "items": { + "type": "object", + "properties": { + "port": {"type": "integer"}, + "product": {"type": "string"}, + "version": {"type": "string"}, + }, + }, }, "technologies": { "type": "array", - "description": "Array of technology objects with name, version (e.g., [{'name': 'PHP', 'version': '5.2.4'}])", + "description": "Array of technology objects with name, version", + "items": { + "type": "object", + "properties": { + "name": {"type": "string"}, + "version": {"type": "string"}, + }, + }, }, "endpoints": { "type": "array", - "description": "Array of endpoint objects with path, methods (e.g., [{'path': '/admin', 'methods': ['GET', 'POST']}])", + "description": "Array of endpoint objects with path, methods", + "items": { + "type": "object", + "properties": { + "path": {"type": "string"}, + "methods": { + "type": "array", + "items": {"type": "string"}, + }, + }, + }, }, "weaknesses": { "type": "array", - "description": "Array of weakness objects for WG stage (e.g., [{'id': 'CVE-2024-1234', 'description': '...'}])", + "description": "Array of weakness objects for WG stage", + "items": { + "type": "object", + "properties": { + "id": {"type": "string"}, + "description": {"type": "string"}, + }, + }, }, "affected_versions": { "type": "object",