← Back to Learn
agent-safetyguardrailsmcp-safetybest-practices

Web Browsing Agent Safety Controls

Authensor

Web browsing agents make HTTP requests, parse responses, and use web content as context for decisions. Each request is a potential vector for prompt injection, data exfiltration, and malicious content ingestion. Safety controls must operate at multiple layers.

URL Filtering

Evaluate every URL before the agent fetches it. Authensor's policy engine checks URLs against allowlists, blocklists, and pattern rules.

Domain allowlisting restricts the agent to approved domains. Start with a narrow allowlist and expand as needed. This is the single most effective control for web browsing agents.

Path filtering restricts access to specific paths within allowed domains. The agent might need access to a company's API but not its admin panel.

Protocol enforcement blocks non-HTTP protocols. Agents should not make requests using file://, ftp://, or other protocol schemes that could access local resources.

Request Safety

Header sanitization prevents the agent from sending sensitive headers. Strip authorization headers, cookies, and custom headers unless the target URL is explicitly authorized to receive them.

Body inspection for POST requests checks that the agent is not sending sensitive data to unauthorized endpoints. Scan request bodies for patterns matching API keys, credentials, or personal information.

Rate limiting prevents the agent from making excessive requests to any single domain. This protects both external services and your own infrastructure.

Response Safety

Content scanning runs every response through Aegis before it enters the agent's context. Web pages are untrusted input and can contain prompt injection payloads.

Size limits prevent the agent from ingesting oversized responses that could fill context windows or consume excessive memory.

Content type filtering restricts which response types the agent processes. HTML, JSON, and plain text are typical safe types. Block executable content.

DNS and Network Controls

Resolve URLs and verify the target IP is not in a private range. This prevents SSRF attacks where an agent is tricked into accessing internal services through a seemingly external URL.

Block requests to localhost, link-local addresses, and your internal network ranges.

Audit and Monitoring

Log every HTTP request and response with the URL, status code, content size, and safety scan result. Authensor's audit trail provides the forensic record for investigating web browsing incidents. Monitor for unusual patterns like rapid requests to many different domains or requests to newly registered domains.

Keep learning

Explore more guides on AI agent safety, prompt injection, and building secure systems.

View All Guides