Security sandbox controls

From NaveedTechLab/skills-library · View interactive version

Security sandbox controls is an AI agent skill from the GitHub repository NaveedTechLab/skills-library. Enforce environment-based safety controls including DRY_RUN mode, rate limits, credential isolation, and permission boundaries. Use when hardening Claude Code environments against unintended side-effects or unauthorized access.

How to use this skill

Skill file

Security Sandbox Controls

Description

The Security Sandbox Controls skill provides environment-based safety controls including DRY_RUN mode, rate limits, credential isolation, and permission boundaries. This skill ensures that all operations within the Claude Code environment are performed safely with appropriate safeguards to prevent unintended consequences, resource exhaustion, and unauthorized access.

Purpose

This skill implements comprehensive safety mechanisms to:

Key Features

DRY_RUN Mode

Rate Limiting

Credential Isolation

Permission Boundaries

Configuration

Default Configuration

{
  "dry_run_enabled": false,
  "rate_limits": {
    "file_operations_per_minute": 100,
    "network_requests_per_minute": 50,
    "system_commands_per_minute": 20,
    "credential_access_per_minute": 10
  },
  "credentials": {
    "isolation_enabled": true,
    "auto_rotation_enabled": false,
    "rotation_interval_hours": 24
  },
  "permissions": {
    "enforcement_enabled": true,
    "default_role": "standard_user",
    "allow_dangerous_operations": false
  }
}

Environment-Specific Overrides

Different configurations can be applied based on environment:

Usage Scenarios

Safe Development

from security_sandbox_controls import SafetyControls

# Initialize with DRY_RUN mode for safe testing
controls = SafetyControls(mode="DRY_RUN")
result = controls.execute_operation("file_write", path="/tmp/test.txt", content="test")
# Operation simulates writing but doesn't actually modify the file
print(result.simulation_report)

Production Safety

from security_sandbox_controls import SafetyControls

# Initialize with strict production settings
controls = SafetyControls(mode="PRODUCTION")
try:
    # Rate-limited operation
    result = controls.execute_operation("network_request", url="https://api.example.com")
except RateLimitExceededError as e:
    print(f"Rate limit exceeded: {e.retry_after}")

Credential Management

from security_sandbox_controls import CredentialManager

cm = CredentialManager()
# Safely retrieve isolated credentials
db_creds = cm.get_credentials("database_primary")
# Automatic access logging occurs

Safety Guarantees

Atomic Operations

Resource Protection

Audit Trail

Integration Points

With Claude Code

With External Systems

Error Handling

Rate Limit Exceeded

Permission Denied

Security Violation

Compliance Standards

Performance Considerations

Dependencies

When NOT to Use This Skill

Common Mistakes

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.