Overview
Governance rules:- Control agent actions like navigation and output
- Are enforced automatically by background scripts and content scripts
- Can be toggled on/off with a simple switch
- Log instances when they block actions (see Instances page)
Rules are disabled by default. Enable the ones you need for your security policies.
Rules Summary
The summary card shows:- X / Y: Number of enabled rules out of total available
- Total Rules badge: Total number of governance rules
Available Rules
ContextFort currently provides two governance rules:Disallow URLs with Query Parameters
Rule ID:disallow_query_params
Description: Prevents the agent from opening any URLs that contain query parameters (e.g., ?param=value). This protects against potential data leakage through URL parameters and ensures agents only visit clean, parameterless URLs.
Use case:
- Prevent agents from accessing URLs with sensitive data in parameters
- Ensure clean, bookmark-able URLs
- Avoid tracking parameters
https://example.com/page?token=secret123https://example.com/search?q=sensitive+queryhttps://example.com/page?user_id=12345
https://example.com/pagehttps://example.com/searchhttps://example.com/docs/guide
Disallow Printing Clickable URLs in Sidechat
Rule ID:disallow_clickable_urls
Description: Prevents the agent from printing any clickable URLs in the Claude sidechat interface. This ensures that sensitive or internal URLs cannot be accidentally exposed or shared through the chat interface.
Use case:
- Prevent internal URLs from appearing in chat logs
- Avoid exposing sensitive endpoints
- Keep chat output clean and secure
- Content scripts monitor the Claude sidechat
- Clickable URLs (links) are removed or replaced with plain text
- Non-clickable URL text may still appear
Enabling/Disabling Rules
Toggle the switch
Click the switch in the Enabled column.
- On (green): Rule is active and enforced
- Off (gray): Rule is inactive
Changes apply immediately
The rule state is saved to Chrome storage and sent to the background script.
Rules Table
The table displays all available governance rules.Table Columns
| Column | Description |
|---|---|
| Rule Name | Name and detailed description of the rule |
| Status | Current state (Active/Inactive badge) |
| Enabled | Toggle switch to enable/disable |
The description column wraps text and can be quite detailed. Scroll horizontally if needed.
Rule Enforcement
When a rule is enabled:- The rule configuration is saved to
chrome.storage.local(key:governanceRules) - A message is sent to the background script:
- The background script updates its internal state
- For DNR-based rules, declarativeNetRequest rules are updated
- The rule is enforced on all future actions
Rule Instances
Every time a rule blocks an action, an instance is logged to Chrome storage:- Instance ID: Unique identifier
- Rule ID: Which rule was triggered
- Timestamp: When it happened
- Details: What was blocked
- Session ID: Associated session (if any)
Empty States
No Rules Configured
If you see this message:- The rules list failed to load
- There was an error reading from storage
- The extension is not properly initialized
Refreshing Data
Click the Refresh button to reload rules from Chrome storage:- Rule configurations are re-read from storage
- Toggle states are updated
- The summary is recalculated
Use Cases
Strict URL Control
Enabledisallow_query_params to:
- Prevent agents from accessing tracking URLs
- Ensure clean URLs in session logs
- Block potential data leakage via parameters
Chat Security
Enabledisallow_clickable_urls to:
- Keep internal URLs out of chat logs
- Prevent accidental URL sharing
- Maintain clean chat output
Compliance Policies
Combine rules to enforce organizational policies:- No query parameters (data privacy)
- No clickable URLs (information security)
- Review instances for audit trails
Best Practices
Start with strict rules
Enable all rules by default, then selectively disable if they interfere with legitimate use cases.
Technical Details
The Rules page:- Loads from
chrome.storage.local(key:governanceRules) - Stores rules as an object:
{ rule_id: boolean } - Default state is
false(disabled) for all rules - Sends
RELOAD_GOVERNANCE_RULESmessage on toggle - Background script updates DNR rules for navigation-based policies
- Content scripts monitor for sidechat-based policies
Future Rules
ContextFort may add additional governance rules in future versions:- Disallow file downloads
- Restrict specific HTTP methods
- Block access to local network addresses
- Limit request rate or frequency
- Enforce specific user agents
Next Steps
View Instances
See when rules were enforced and what they blocked
Manage Domains
Configure domain-level access controls