Hipocap Shield currently supports Python only. The Hipocap Shield integrates with Laminar for observability, which supports both Python and TypeScript. However, the security analysis features (Shield) are only available in Python.
Protect sensitive function calls with Hipocap Shield:
Copy
from hipocap import Hipocap, observe# Initialize and get the observability clientobserv_client = Hipocap.initialize( project_api_key=os.environ.get("HIPOCAP_API_KEY"), # ... other config ...)@observe()def send_email(to: str, subject: str, body: str): # Execute the function first result_data = {"status": "sent", "to": to, "subject": subject} # Analyze the result after execution if observ_client: analysis_result = observ_client.analyze( function_name="send_email", function_result=result_data, # Actual function result function_args={"to": to, "subject": subject, "body": body}, user_query="User wants to send an email", user_role="user", # User's role for RBAC input_analysis=True, # Stage 1: Input analysis llm_analysis=True, # Stage 2: LLM analysis quarantine_analysis=False, # Stage 3: Quarantine (optional) ) # Check if safe to use if not analysis_result.get("safe_to_use"): # Blocked due to security threat print(f"Blocked: {analysis_result.get('reason')}") return {"status": "blocked", "reason": analysis_result.get("reason")} # Safe to return the result print(f"Email sent to {to}") return result_data
Want an LLM (or coding agent) to help with setup? Pick the prompt that matches what you’re doing and paste it into your assistant along with your codebase context.How to use:
Choose the prompt that matches your scenario
Click the button to copy the prompt
Paste it into your LLM assistant (Claude, ChatGPT, etc.) along with your codebase
The assistant will help you set up Hipocap step-by-step
Hipocap Shield currently supports Python only. TypeScript/JavaScript support is not available. If something looks off, follow the docs in this repo (or ask support) over the model’s output.