- Overview
- Security Architecture
- Configuration Options
- Executable Allowlist
- Resource Limits
- Working Directory Restrictions
- What AI Agents CANNOT Do
- What AI Agents CAN Do
- Recommended Configurations
- Cross-Platform Security
- Advanced Security Features
- Audit Logging
- Best Practices
The MCP ACS Process Server implements defense-in-depth security with multiple layers of validation to ensure AI agents can only perform authorized operations within strict boundaries. This guide explains how to configure security policies for your deployment.
Every process launch request goes through six security layers:
- Executable Resolution - Verify executable exists and is accessible
- Dangerous Executable Check - Block known dangerous commands (sudo, rm, dd, etc.)
- Shell Interpreter Check - Optionally block shell access (bash, sh, cmd.exe, etc.)
- Privilege Check - Block setuid/setgid executables (Unix) or admin tools (Windows)
- Allowlist Check - Only permit explicitly allowed executables
- Argument Validation - Prevent command injection via arguments
- Fail Secure: If any validation layer fails, the operation is rejected
- Least Privilege: Processes run with minimal permissions
- Audit Everything: All operations are logged for forensics
- No Bypass: Security checks cannot be disabled or bypassed at runtime
{
// === EXECUTABLE CONTROL ===
"allowedExecutables": ["node", "python3", "git"],
"blockSetuidExecutables": true,
"blockShellInterpreters": true,
"additionalBlockedExecutables": [],
// === ARGUMENT CONTROL ===
"maxArgumentCount": 100,
"maxArgumentLength": 4096,
"blockedArgumentPatterns": [],
// === ENVIRONMENT CONTROL ===
"additionalBlockedEnvVars": [],
"allowedEnvVars": [],
"maxEnvVarCount": 100,
// === WORKING DIRECTORY CONTROL ===
"allowedWorkingDirectories": [],
"blockedWorkingDirectories": [],
// === RESOURCE LIMITS ===
"defaultResourceLimits": {
"maxCpuPercent": 80,
"maxMemoryMB": 1024,
"maxFileDescriptors": 1024,
"maxCpuTime": 300,
"maxProcesses": 10
},
"maximumResourceLimits": {
"maxCpuPercent": 100,
"maxMemoryMB": 4096,
"maxFileDescriptors": 2048,
"maxCpuTime": 3600,
"maxProcesses": 50
},
"strictResourceEnforcement": true,
// === PROCESS LIMITS ===
"maxConcurrentProcesses": 10,
"maxConcurrentProcessesPerAgent": 5,
"maxProcessLifetime": 3600,
"maxTotalProcesses": 1000,
// === RATE LIMITING ===
"maxLaunchesPerMinute": 10,
"maxLaunchesPerHour": 100,
"rateLimitCooldownSeconds": 60,
// === TERMINATION CONTROL ===
"allowProcessTermination": true,
"allowGroupTermination": true,
"allowForcedTermination": false,
"requireTerminationConfirmation": false,
// === I/O CONTROL ===
"allowStdinInput": true,
"allowOutputCapture": true,
"maxOutputBufferSize": 10485760,
"blockBinaryStdin": false,
// === AUDIT & MONITORING ===
"enableAuditLog": true,
"auditLogPath": "./audit.log",
"auditLogLevel": "info",
"enableSecurityAlerts": false,
"securityAlertWebhook": "",
// === CONFIRMATION & APPROVAL ===
"requireConfirmation": false,
"requireConfirmationFor": [],
"autoApproveAfterCount": 0
}The executable allowlist is the most critical security control. Only executables in this list can be launched by AI agents.
{
"allowedExecutables": [
"node", // Basename (searches PATH)
"/usr/bin/python3", // Absolute path
"/usr/local/bin/*", // Glob pattern
"npm",
"git"
]
}- Basename:
"node"- Matches anynodeexecutable in PATH - Absolute Path:
"/usr/bin/python3"- Exact path match - Glob Pattern:
"/usr/bin/*"- Pattern matching using minimatch
These executables are always blocked regardless of allowlist configuration:
sudo,su,doas- Privilege escalationchmod,chown,chgrp- Permission modificationrm,rmdir- File deletiondd- Disk operationsmkfs,fdisk,parted- Filesystem operationsiptables,nft- Firewall configurationsystemctl,service- Service managementreboot,shutdown,halt- System control
runas.exe- Privilege escalationpsexec.exe,psexec64.exe- Remote executiondel.exe,erase.exe- File deletionformat.com,diskpart.exe- Disk operationsbcdedit.exe- Boot configurationreg.exe,regedit.exe- Registry modificationsc.exe- Service controlnet.exe,netsh.exe- Network configurationwmic.exe- WMI operationsmsiexec.exe- Installer executiontaskkill.exe- Process terminationshutdown.exe- System control
When blockShellInterpreters: true, these are blocked:
- Unix/Linux/macOS:
bash,sh,zsh,fish,csh,tcsh,ksh - Windows:
cmd.exe,powershell.exe,pwsh.exe
Recommendation: Keep this enabled unless you have a specific need for shell access.
When blockSetuidExecutables: true, any executable with setuid or setgid bits is blocked.
Recommendation: Keep this enabled to prevent privilege escalation.
Applied to all processes unless overridden:
{
"defaultResourceLimits": {
"maxCpuPercent": 80, // Maximum CPU usage (0-100)
"maxMemoryMB": 1024, // Maximum memory in MB
"maxFileDescriptors": 1024, // Maximum open files
"maxCpuTime": 300, // Maximum CPU time in seconds
"maxProcesses": 10 // Maximum processes in tree
}
}Hard limits that cannot be exceeded even if requested:
{
"maximumResourceLimits": {
"maxCpuPercent": 100,
"maxMemoryMB": 4096,
"maxFileDescriptors": 2048,
"maxCpuTime": 3600,
"maxProcesses": 50
}
}{
"strictResourceEnforcement": true
}When enabled, processes are terminated immediately upon exceeding limits. When disabled, processes get a grace period.
{
"maxConcurrentProcesses": 10, // Total across all agents
"maxConcurrentProcessesPerAgent": 5, // Per agent limit
"maxProcessLifetime": 3600, // Maximum lifetime in seconds
"maxTotalProcesses": 1000 // Lifetime of server
}Restrict processes to specific directories:
{
"allowedWorkingDirectories": ["/home/user/projects", "/tmp/workspace"]
}When set, processes can only run in these directories or their subdirectories.
Explicitly block certain directories:
{
"blockedWorkingDirectories": ["/etc", "/root", "/var/lib"]
}Blocked directories take precedence over allowed directories.
For maximum security, use allowedWorkingDirectories to create a sandbox:
{
"allowedWorkingDirectories": ["/home/aiagent/workspace"]
}AI agents are strictly prevented from:
- ❌ Launching executables not in the allowlist
- ❌ Launching shell interpreters (if blocked)
- ❌ Launching dangerous system commands (sudo, rm, dd, etc.)
- ❌ Launching setuid/setgid executables
- ❌ Escalating privileges
- ❌ Modifying system configuration
- ❌ Rebooting or shutting down the system
- ❌ Deleting files directly (rm, del)
- ❌ Modifying file permissions (chmod, chown)
- ❌ Accessing arbitrary directories (if restricted)
- ❌ Performing disk operations (dd, format)
- ❌ Modifying PATH environment variable
- ❌ Setting LD_PRELOAD or DYLD_INSERT_LIBRARIES
- ❌ Manipulating other dangerous environment variables
- ❌ Sending signals to processes they didn't create
- ❌ Terminating system processes
- ❌ Bypassing resource limits
- ❌ Launching unlimited concurrent processes
- ❌ Keeping processes running indefinitely
- ❌ Executing command injection via arguments
- ❌ Bypassing the allowlist
- ❌ Disabling security checks
- ❌ Modifying configuration at runtime
Within the configured allowlist and limits, AI agents can:
- ✅ Launch approved executables with arguments
- ✅ Set safe environment variables
- ✅ Specify working directory (within restrictions)
- ✅ Set resource limits (within maximums)
- ✅ Terminate processes they created
- ✅ Create process groups
- ✅ Manage process pipelines
- ✅ Capture stdout and stderr
- ✅ Send stdin input
- ✅ Retrieve buffered output
- ✅ Handle binary data (if allowed)
- ✅ Monitor CPU usage
- ✅ Monitor memory usage
- ✅ Monitor I/O statistics
- ✅ Track process uptime
- ✅ View historical resource data
- ✅ Start long-running services
- ✅ Configure auto-restart
- ✅ Set up health checks
- ✅ Stop services they created
- ✅ Create process groups
- ✅ Build process pipelines
- ✅ Set timeout constraints
- ✅ Query process status
- ✅ List managed processes
For local development with trusted AI agents:
{
"allowedExecutables": [
"node",
"npm",
"yarn",
"npx",
"python3",
"pip3",
"pytest",
"git",
"make",
"tsc",
"jest"
],
"defaultResourceLimits": {
"maxCpuPercent": 90,
"maxMemoryMB": 2048,
"maxCpuTime": 600
},
"maxConcurrentProcesses": 20,
"maxProcessLifetime": 7200,
"blockShellInterpreters": false,
"blockSetuidExecutables": true,
"allowProcessTermination": true,
"allowGroupTermination": true,
"allowForcedTermination": true,
"allowStdinInput": true,
"allowOutputCapture": true,
"enableAuditLog": true,
"requireConfirmation": false
}For production with untrusted AI agents:
{
"allowedExecutables": ["/usr/bin/node", "/usr/bin/python3"],
"defaultResourceLimits": {
"maxCpuPercent": 50,
"maxMemoryMB": 512,
"maxCpuTime": 300
},
"maximumResourceLimits": {
"maxCpuPercent": 80,
"maxMemoryMB": 1024,
"maxCpuTime": 600
},
"maxConcurrentProcesses": 5,
"maxConcurrentProcessesPerAgent": 2,
"maxProcessLifetime": 1800,
"maxLaunchesPerMinute": 5,
"allowedWorkingDirectories": ["/var/lib/aiagent/workspace"],
"blockShellInterpreters": true,
"blockSetuidExecutables": true,
"strictResourceEnforcement": true,
"allowProcessTermination": true,
"allowGroupTermination": false,
"allowForcedTermination": false,
"allowStdinInput": false,
"allowOutputCapture": true,
"enableAuditLog": true,
"auditLogLevel": "info",
"enableSecurityAlerts": true,
"requireConfirmation": true
}For automated testing only:
{
"allowedExecutables": ["jest", "pytest", "mocha", "npm"],
"defaultResourceLimits": {
"maxCpuPercent": 80,
"maxMemoryMB": 1024,
"maxCpuTime": 300
},
"maxConcurrentProcesses": 10,
"maxProcessLifetime": 3600,
"blockShellInterpreters": true,
"blockSetuidExecutables": true,
"allowProcessTermination": true,
"allowGroupTermination": true,
"allowForcedTermination": false,
"allowStdinInput": true,
"allowOutputCapture": true,
"enableAuditLog": true,
"requireConfirmation": false
}{
"allowedExecutables": [
"node",
"npm",
"yarn",
"npx",
"pnpm",
"tsc",
"jest",
"eslint",
"prettier"
],
"defaultResourceLimits": {
"maxCpuPercent": 80,
"maxMemoryMB": 2048,
"maxCpuTime": 600
},
"maxConcurrentProcesses": 15,
"blockShellInterpreters": true,
"blockSetuidExecutables": true,
"allowProcessTermination": true,
"allowGroupTermination": true,
"allowForcedTermination": false,
"allowStdinInput": true,
"allowOutputCapture": true,
"enableAuditLog": true
}{
"allowedExecutables": [
"python3",
"pip3",
"pytest",
"black",
"flake8",
"mypy",
"pylint"
],
"defaultResourceLimits": {
"maxCpuPercent": 80,
"maxMemoryMB": 2048,
"maxCpuTime": 600
},
"maxConcurrentProcesses": 15,
"blockShellInterpreters": true,
"blockSetuidExecutables": true,
"allowProcessTermination": true,
"allowGroupTermination": true,
"allowForcedTermination": false,
"allowStdinInput": true,
"allowOutputCapture": true,
"enableAuditLog": true
}Blocked Environment Variables:
LD_PRELOAD,LD_LIBRARY_PATH- Library injectionPATH- Path manipulationPYTHONPATH,NODE_PATH,PERL5LIB,RUBYLIB- Language paths
Additional Checks:
- Setuid/setgid executable detection
- File permission validation
- Process capability checks
Blocked Environment Variables:
Path,PATH- Path manipulation (case-insensitive)PATHEXT- Executable extension manipulationCOMSPEC- Command interpreter manipulation
Additional Checks:
- Windows path separator handling (
\and/) - Case-insensitive executable matching
- UAC elevation detection
Blocked Environment Variables:
DYLD_INSERT_LIBRARIES,DYLD_LIBRARY_PATH- Dynamic library injection- All Unix/Linux blocked variables
Additional Checks:
- Setuid/setgid executable detection
- macOS-specific library injection prevention
- Gatekeeper validation
Prevent abuse by limiting process launches:
{
"maxLaunchesPerMinute": 10,
"maxLaunchesPerHour": 100,
"rateLimitCooldownSeconds": 60
}Additional argument security:
{
"maxArgumentCount": 100,
"maxArgumentLength": 4096,
"blockedArgumentPatterns": [".*\\$\\(.*\\).*", ".*`.*`.*", ".*\\|.*", ".*;.*"]
}Fine-grained environment control:
{
"allowedEnvVars": ["NODE_ENV", "DEBUG", "LOG_LEVEL"],
"additionalBlockedEnvVars": ["AWS_SECRET_ACCESS_KEY", "DATABASE_PASSWORD"],
"maxEnvVarCount": 50
}{
"enableAuditLog": true,
"auditLogPath": "./audit.log",
"auditLogLevel": "info"
}error: Only security violations and errorswarn: Warnings and aboveinfo: Normal operations (recommended)debug: Detailed debugging information
{
"timestamp": "2024-01-15T10:30:45.123Z",
"level": "AUDIT",
"operation": "process_start",
"executable": "node",
"pid": 12345,
"result": "success"
}{
"timestamp": "2024-01-15T10:30:45.123Z",
"level": "SECURITY_VIOLATION",
"type": "not_in_allowlist",
"details": ["bash", "/bin/bash"]
}Begin with a minimal allowlist and add executables as needed.
Prefer absolute paths over basenames for better security.
Enable shell blocking, setuid blocking, and strict enforcement.
Start with low limits and increase as needed.
Use allowedWorkingDirectories to create a sandbox.
Regularly review logs for security violations and unusual patterns.
Prevent abuse with rate limits on process launches.
Test your configuration thoroughly before deployment.
Review and update allowlist and limits regularly.
Use multiple security layers together.
For security issues or questions:
- GitHub Issues: https://github.com/digital-defiance/ai-capabilities-suite/issues
- Email: info@digitaldefiance.org
- Security vulnerabilities: Please report privately to info@digitaldefiance.org