Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /li-boxuan_OpenDevin /openhands /security /analyzer.py
| from typing import Any | |
| from fastapi import Request | |
| from openhands.events.action.action import Action, ActionSecurityRisk | |
| class SecurityAnalyzer: | |
| """Security analyzer that analyzes agent actions for security risks.""" | |
| def __init__(self) -> None: | |
| """Initializes a new instance of the SecurityAnalyzer class.""" | |
| pass | |
| async def handle_api_request(self, request: Request) -> Any: | |
| """Handles the incoming API request.""" | |
| raise NotImplementedError( | |
| 'Need to implement handle_api_request method in SecurityAnalyzer subclass' | |
| ) | |
| async def security_risk(self, action: Action) -> ActionSecurityRisk: | |
| """Evaluates the Action for security risks and returns the risk level.""" | |
| raise NotImplementedError( | |
| 'Need to implement security_risk method in SecurityAnalyzer subclass' | |
| ) | |
| def set_event_stream(self, event_stream) -> None: | |
| """Set the event stream for accessing conversation history. | |
| Args: | |
| event_stream: EventStream instance for accessing events | |
| """ | |
| pass | |
| async def close(self) -> None: | |
| """Cleanup resources allocated by the SecurityAnalyzer.""" | |
| pass | |
Xet Storage Details
- Size:
- 1.22 kB
- Xet hash:
- 56cadeba76bd25fff4ac08b327336344bad8257deb6423bbd27698e570fb3c9e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.