What is a Policy?
A policy is a collection of rules that control:- Role-based access control (RBAC)
- Function-level permissions
- Severity-based rules
- Function chaining restrictions
- Decision thresholds
- Custom prompts
Creating a Policy
Via UI
When creating a new policy in the HipoCap UI, you’ll provide the policy configuration as JSON:- Navigate to Policies in your HipoCap dashboard
- Click Create Policy
- Enter the policy configuration in JSON format (see the Complete Policy Example section below for a full template)
- Customize the JSON for your specific needs
- Save and activate the policy
Policy management is currently available through the Hipocap web UI. Python SDK methods for policy management are not yet available.
Policy Structure
A policy contains several sections:1. Roles
Define user roles and their permissions:2. Functions
Configure function-specific rules:3. Severity Rules
Define how different threat levels are handled:4. Function Chaining
Control which functions can be called together:5. Decision Thresholds
Configure when to block or allow:6. Custom Prompts
Configure custom prompts for LLM analysis and Quarantine systems to tailor the security analysis to your specific needs:- Focus on specific threat categories relevant to your use case
- Include domain-specific security requirements
- Define the analysis format and structure you need
- Define how the quarantine system should analyze potentially infected content
- Specify what patterns to look for
- Set expectations for the analysis output format
- Be specific about what to analyze
- Include examples of threats you want to detect
- Define the expected output format
- Test prompts with sample content before deploying
- Keep prompts concise but comprehensive
Using a Policy
Specify Policy in Analysis Call
Pass thepolicy_key parameter when calling analyze():
Default Policy
If no policy is specified, Hipocap uses your default policy. Set the default policy in the Hipocap web UI.Policy Management
Policy management is currently available through the Hipocap web UI. You can:- Create, edit, and delete policies
- Set default policies
- Activate/deactivate policies
- Configure roles, functions, severity rules, and function chaining
Complete Policy Example
When creating a new policy in the HipoCap UI, you’ll use JSON to define the policy configuration. Here’s a complete policy JSON example that you can use as a template:- Navigate to Policies in your HipoCap dashboard
- Click Create Policy
- You’ll be prompted to provide the policy configuration in JSON format
- Copy the JSON structure above and paste it into the policy editor
- Customize the values (roles, functions, prompts, etc.) for your specific use case
- Save and activate the policy
- Test the policy in a staging environment before deploying to production
Important: When creating a new policy in the HipoCap UI, you must provide the policy configuration as JSON. The example above shows the complete structure you’ll need. You can either:
- Use the example as-is and modify values
- Start from scratch and build your JSON following the structure shown in the sections above
- Import an existing policy JSON and modify it
- roles: Define user roles and their base permissions
- functions: Configure function-specific security rules
- severity_rules: Set how different threat levels are handled
- function_chaining: Control which functions can be called together
- decision_thresholds: Configure blocking/allow thresholds
- prompts: Customize LLM and Quarantine analysis prompts
Best Practices
- Environment-Specific Policies - Create separate policies for dev, staging, and production
- Default Policy - Always have a default policy as a fallback
- Version Control - Track policy changes for audit purposes
- Testing - Test policies in staging before production
- Documentation - Document policy rules and rationale
- Custom Prompts - Tailor prompts to your domain and security requirements
- Incremental Deployment - Start with restrictive policies and gradually adjust based on real-world usage
Next Steps
- Roles & Permissions - Configure RBAC
- Function Access Control - Set function permissions
- Function Chaining - Control function chains
