← Back to Settings

Security System

Comprehensive security configuration for your AgenticMail Enterprise deployment. Each section can be edited independently using its own Edit button.

On This Page

Overview

The Security System tab provides defense-in-depth controls protecting your instance from prompt injection, data exfiltration, SQL injection, and other attack vectors. Each section has its own Edit/Save/Cancel buttons — click Edit to modify a section, then Save to persist changes or Cancel to discard.

Per-section editing: Only one section can be edited at a time. Other sections dim while you're editing, preventing accidental changes. Your changes are saved to the server when you click Save.

Prompt Injection Defense

Multi-layer detection and prevention of prompt injection attacks — attempts by users or external content to override an agent's instructions.

Settings

SettingDescription
Enable ProtectionMaster toggle for prompt injection defense
Detection Mode
  • Monitor Only — Logs detections but allows them through. Good for testing.
  • Sanitize Content — Strips suspected injection patterns from input. Recommended for most deployments.
  • Block Request — Rejects the entire request. Strictest mode.
Sensitivity LevelLow / Medium / High / Maximum. Higher sensitivity catches more but increases false positives.
Log DetectionsWrite detection events to the security audit log
Block ResponseCustom message returned when a request is blocked (only in Block mode)
Recommended: Start with Sanitize mode at Medium sensitivity. Monitor the audit log for false positives before increasing to High.

How It Works

The system scans all incoming messages and tool inputs for known prompt injection patterns:

SQL Injection Prevention

Detects and blocks SQL injection attempts in tool inputs and API request bodies.

SettingDescription
Enable ProtectionMaster toggle
Detection ModeMonitor Only (log but allow) or Block Request (reject)
Scan Tool ArgumentsCheck arguments passed to agent tools (database queries, file operations, etc.)
Scan API Request BodiesCheck incoming API request payloads for SQL patterns
Log DetectionsWrite events to the audit log

Detection Patterns

Scans for common SQL injection vectors including:

Input Validation

Sanitizes and validates all incoming data to prevent malformed or malicious payloads.

SettingDefaultDescription
Max Input Length100,000 charsReject inputs exceeding this length. Prevents memory exhaustion attacks.
Max JSON Depth20 levelsReject deeply nested JSON objects. Prevents stack overflow in parsers.
Strip HTMLOffRemove all HTML tags from text inputs. Use when agents don't need HTML.
Block ScriptsOnReject inputs containing <script> tags. Prevents XSS via agent outputs.
Sanitize UnicodeOnNormalize Unicode and remove invisible/homoglyph characters used for evasion.

Output Filtering

Scans agent outputs for secrets and personal information before they reach users or external systems.

SettingDescription
Filter Mode
  • Monitor Only — Log but don't modify outputs
  • Redact Secrets — Replace detected secrets with [REDACTED]
  • Block Output — Reject the entire response
Scan for SecretsDetect API keys, passwords, tokens, connection strings
Scan for PIIDetect emails, phone numbers, SSNs, credit card numbers
Log DetectionsWrite events to the audit log
Important: Output filtering works alongside DLP rules. DLP provides more granular, rule-based detection. Output filtering here is a safety net that catches common patterns without custom rules.

Transport Encryption

Encrypts API data in transit between the dashboard and server using AES-256-CBC with HMAC verification. Provides application-layer encryption on top of HTTPS for defense-in-depth.

Why Use This?

HTTPS already encrypts traffic at the transport layer. Transport encryption adds a second layer that protects against:

Encryption Modes

ModeDescription
Encrypt AllEvery dashboard API call is encrypted. SSE streams are automatically excluded (they don't support custom headers).
Sensitive OnlyPre-selected endpoint groups handling credentials and secrets (API keys, OAuth tokens, database URLs, vault).
CustomToggle individual endpoint groups and add custom path patterns.

Endpoint Groups

There are 22 endpoint groups covering every API area. Groups marked SENSITIVE handle credentials or secrets:

Advanced Settings

SettingDefaultDescription
Payload Max Age300 secondsReject encrypted payloads older than this (replay attack protection)
Debug LoggingOffLog encryption/decryption operations to browser console. Never enable in production.

For full technical details, see the Transport Encryption documentation.

Dependency & Package Management

Organization-wide defaults for how agents install software packages. Individual agents can override these in their Permissions tab.

Install Policy

PolicyDescription
AutoAgents install what they need without asking. Best for trusted environments.
Ask ManagerAgents must get human approval before installing any package.
DenyNo package installation allowed. Agents must use pre-installed tools.

Cross-Platform Support

The dependency manager automatically detects the platform and uses the appropriate package manager:

PlatformPackage Managers
macOSHomebrew (brew)
Ubuntu/Debianapt
Fedora/RHELdnf
Arch Linuxpacman
Snap-enabled Linuxsnap
WindowsChocolatey, winget, Scoop
npm packagesnpm (local install to temp dir, never global)
Python packagespip

Safety Guarantees

Elevated Access

SettingDescription
Allow Global InstallsPermit system-level package installation (brew, apt, etc.). When off, only local npm/pip installs are allowed.
Allow Elevated (sudo)Permit agents to use sudo for packages that require root (e.g., apt install). Requires a system password to be configured.
Allowed ManagersWhitelist which package managers agents can use.
Security note: Enabling elevated access gives agents the ability to install system-level software. Only enable this in trusted, isolated environments. The system password is stored encrypted in the server's security config.

Screen Unlock & Machine Access

Allows the system to automatically unlock the screen when agents need to interact with the desktop (browser automation, GUI tools, scheduled tasks).

How It Works

  1. Agent detects the screen is locked (via system APIs)
  2. System wakes the display if asleep (using caffeinate on macOS)
  3. Types your password to unlock the screen (via AppleScript keystroke on macOS)
  4. Agent performs the required action (browser, desktop automation, etc.)

Settings

SettingDescription
Enable Screen Auto-UnlockMaster toggle for all screen unlock features
System / Computer PasswordYour macOS or Linux login password. Stored encrypted in the server's security config. Agents never see the raw password.
Check Screen StatusShows whether the screen is currently locked or unlocked, and the platform
Unlock NowManually trigger an unlock (useful for testing)
Auto-Unlock on Agent ActivityAutomatically unlock when an agent needs to use the browser, run desktop automation, or start a scheduled task
Prevent System SleepKeep the system awake using caffeinate (macOS) or systemd-inhibit (Linux). Prevents sleep while agents are active.

Platform Support

PlatformLock DetectionUnlock MethodSleep Prevention
macOSQuartz session checkAppleScript keystrokecaffeinate -u -t 2
Linuxloginctl / xdotoolloginctl unlock-sessionsystemd-inhibit
WindowsNot supportedNot supportedNot supported
Security consideration: The password is stored in the server's encrypted security config. Only the server process has access — agents invoke the unlock via an API call and never handle the password directly. Still, ensure your server is properly secured.

Security Audit Log

Log and monitor security events across your instance.

SettingDefaultDescription
Enable Audit LoggingOnMaster toggle for security event logging
Retention (days)90How long to keep audit log entries before auto-deletion
Log Prompt Injection AttemptsOnRecord detected prompt injection attempts
Log All Tool CallsOffRecord every tool invocation by every agent. High volume — enable only for investigation.
Log API AccessOffRecord all API endpoint access. Very high volume.

Recent Security Events

The audit log section also displays the 10 most recent security events with severity levels (critical, high, medium, low). Click "Refresh" to fetch the latest events.

Best Practices

Recommended Configuration

SettingRecommendation
Prompt InjectionSanitize mode, Medium sensitivity
SQL InjectionBlock mode, scan both tool inputs and API bodies
Input ValidationEnabled with defaults (100K max length, 20 JSON depth)
Output FilteringRedact mode with both secret and PII scanning
Transport EncryptionSensitive Only (or Encrypt All for high-security environments)
Dependency ManagementAuto mode with blocked packages for security tools (nmap, metasploit)
Screen UnlockEnabled only on dedicated agent machines, not shared workstations
Audit LoggingEnabled with 90-day retention, prompt injection logging on

Related Pages

AgenticMail Enterprise Documentation Report an issue