🌏 中文版
What This Post Is
This post is the "security" post (order 24) of the Sandbox Series. It doesn't cover sandbox technical details (in order 2–18), nor observability (in order 23), but focuses on compliance requirements and audit processes for regulated industries (finance, healthcare) using sandboxes:
- Which compliance frameworks apply? — SOC 2, HIPAA, GDPR, ISO 27001, EU AI Act
- What controls must sandboxes satisfy? — access control, audit logs, data encryption, identity management
- How to do audits? — internal audit, external audit, evidence collection
- Data sovereignty & cross-border restrictions — data must stay in specific regions
- Compliance checklist — a ready-to-use checklist
Compliance Framework Overview
SOC 2 (Service Organization Control 2)
SOC 2 is the AICPA Trust Services Criteria, containing five Trust Services Criteria:
| Criterion | Related Controls | How Sandbox Meets |
|---|---|---|
| Security | Logical access control, network protection | Sandbox isolation, network allowlist, non-privileged execution |
| Availability | System monitoring, capacity planning | Sandbox lifecycle management, auto-scaling |
| Processing Integrity | Data processing accuracy | Tool call records, output validation |
| Confidentiality | Data access control | Filesystem isolation, credential broker |
| Privacy | Personal data collection & use | Data classification, consent management |
HIPAA (Health Insurance Portability and Accountability Act)
HIPAA is the US healthcare data privacy law, applicable to entities handling Protected Health Information (PHI).
| Requirement | How Sandbox Meets |
|---|---|
| Audit controls | Record all PHI access and operations |
| Unique user identification | Each user has unique ID, delegation-chain identity |
| Access control | Least privilege principle, role-based access control (RBAC) |
| Transmission security | Data in transit encryption (TLS 1.2+) |
| Business Associate Agreement (BAA) | Sign BAA with sandbox provider |
GDPR (General Data Protection Regulation)
GDPR is the EU data privacy regulation, applicable to all organizations processing EU residents' personal data.
| Requirement | How Sandbox Meets |
|---|---|
| Processing records (Article 30) | Record personal data collection, processing, transfer |
| Data subject rights | Support access, deletion, portability requests |
| Data Protection Impact Assessment (DPIA) | Risk assessment before sandbox deployment |
| Cross-border transfer restrictions | Personal data not transferred to non-adequate jurisdictions without authorization |
| Data minimization | Only process necessary personal data, no unrelated data in sandbox |
ISO 27001
ISO 27001 is the international Information Security Management System standard.
| Annex A Control | How Sandbox Meets |
|---|---|
| A.5 (Organizational) | Information security policy, roles & responsibilities |
| A.6 (People) | Remote work, confidentiality agreements |
| A.8 (Assets) | Data classification, media handling |
| A.9 (Access Control) | User access management, privileged access management |
| A.12 (Operations) | Operational procedures, change management, log monitoring |
| A.13 (Communications Security) | Network security, data transfer security |
EU AI Act
The EU AI Act (effective 2026) has special requirements for "high-risk AI systems":
| Requirement | How Sandbox Meets |
|---|---|
| Risk management system | Risk assessment before sandbox deployment, continuous monitoring |
| Data governance | Training data & execution data quality control |
| Record keeping | Agent execution records retained for appropriate period |
| Transparency | Users know they are interacting with AI |
| Human oversight | High-risk decisions require human approval |
Sandbox Compliance Control Checklist
Below is a compliance control checklist for regulated industries deploying sandboxes:
Access Control
- Each user has a unique identifier
- Role-based access control (RBAC)
- Privileged access requires multi-factor authentication (MFA)
- Sandbox code runs as non-privileged user
- Regular access permission reviews
Audit Logs
- Record all tool calls, file operations, network requests
- Logs are tamper-proof (HMAC signature or WORM storage)
- Log retention meets regulatory requirements (typically 1–7 years)
- Logs exportable to SIEM (Splunk, Datadog, Sentinel)
- Authorization decisions recorded (allow/deny + reason)
Data Protection
- Data at rest encrypted (AES-256)
- Data in transit encrypted (TLS 1.2+)
- Key management (KMS)
- Data classification & labeling
- Data retention & destruction policy
Identity Management
- Delegation-chain identity recording (user → agent → tool)
- Single sign-on (SSO) with multi-factor authentication
- Service accounts separated from personal accounts
- | [ ] Terminated user access revoked immediately |
Network Security
- Sandbox default no-egress
- Network allowlist
- Internal network isolation, preventing lateral movement
- DNS rebinding protection
Data Sovereignty & Cross-Border Restrictions
Regulated industries (especially finance, healthcare) often have strict data sovereignty requirements:
Data Sovereignty Principles
| Principle | Description |
|---|---|
| Data stays in region | Personal data must be stored in specific country or region |
| Processing stays in region | Data processing must occur in specific jurisdiction |
| Cross-border transfer limits | Cross-border transfer requires adequate protection or subject consent |
Sandbox Deployment Options
| Option | Compliance Fit | Description |
|---|---|---|
| Public cloud (same region) | Medium | Data stays in same cloud region, but provider may be cross-border |
| Private cloud | High | Data fully in self-owned infrastructure |
| Hybrid cloud | Medium-high | Sensitive data in private cloud, non-sensitive in public cloud |
| BYOC (Bring Your Own Cloud) | High | Deploy sandbox control plane on own cloud |
Cross-Border Transfer Safeguards
- Data doesn't leave border: Sensitive data not transferred cross-border, sandbox deployed locally
- Standard Contractual Clauses (SCCs): Sign SCCs with cross-border providers
- Binding Corporate Rules (BCRs): Intra-company data transfer rules
- Data anonymization: Anonymize or pseudonymize personal data before transfer
Audit Process
Internal Audit
- Scope definition: Determine which sandbox instances and data types are in scope
- Control testing: Sample-test access controls, audit logs, data encryption
- Gap analysis: Identify items not meeting compliance requirements
- Remediation: Fix gaps, re-test
- Audit report: Write internal audit report, submit to management
External Audit
- Select auditor: Choose external audit firm with regulated industry experience
- Evidence collection: Provide sandbox configuration, log records, policy documents, training records
- On-site interviews: Interview sandbox administrators, developers, security team
- Audit findings: Auditor submits non-compliance items and improvement recommendations
- Certification/proof: Obtain compliance certification or audit proof
Evidence Types
| Evidence Type | Description |
|---|---|
| Policy documents | Information security policy, access control policy, data retention policy |
| Configuration screenshots | Sandbox configuration, network policy, access control settings |
| Log samples | Audit log samples, SIEM output |
| Training records | Employee security training, compliance training records |
| Contract documents | Contracts with sandbox providers, BAAs, SCCs |
Compliance Checklist (Ready to Use)
| Item | Status | Description |
|---|---|---|
| Unique user identification | ☐ | Each user has unique ID |
| RBAC access control | ☐ | Role-based access control |
| MFA privileged access | ☐ | Privileged operations require MFA |
| Non-privileged execution | ☐ | Sandbox code runs as non-privileged user |
| Complete audit logs | ☐ | Record all tool calls, file operations, network requests |
| Tamper-proof logs | ☐ | HMAC signature or WORM storage |
| Log retention sufficient | ☐ | Retention period meets regulatory requirements (1–7 years) |
| Data at rest encrypted | ☐ | AES-256 encryption |
| Data in transit encrypted | ☐ | TLS 1.2+ |
| Key management | ☐ | KMS with key rotation |
| Network allowlist | ☐ | Default no egress, only necessary endpoints allowed |
| Delegation-chain identity | ☐ | Record user → agent → tool chain |
| Data classification | ☐ | Personal data & sensitive data classified & labeled |
| Cross-border transfer control | ☐ | Cross-border transfer has safeguards |
| Supplier contracts | ☐ | BAAs, SCCs, supplier contracts |
| Audit evidence | ☐ | Evidence ready for auditors |
What You Should Understand After Reading
- Compliance frameworks covering regulated industries (finance, healthcare) using sandboxes: SOC 2, HIPAA, GDPR, ISO 27001, EU AI Act.
- Key requirements of each framework and how sandbox meets them.
- Sandbox compliance control checklist: access control, audit logs, data protection, identity management, network security.
- Data sovereignty & cross-border restrictions: data stays in region, cross-border transfer safeguards, deployment options.
- Audit process: internal audit, external audit, evidence types.
- Ready-to-use compliance checklist with 16 core controls.