Skip to content

fix(sandbox): harden resource limits and module disabling#1

Merged
shyim merged 1 commit into
mainfrom
fix/harden-sandbox-resource-limits
Jun 4, 2026
Merged

fix(sandbox): harden resource limits and module disabling#1
shyim merged 1 commit into
mainfrom
fix/harden-sandbox-resource-limits

Conversation

@shyim
Copy link
Copy Markdown
Owner

@shyim shyim commented Jun 4, 2026

Summary

  • add sandbox limits for result counts, builtin iterations, source size, tokens, AST nodes, and parser depth
  • add stdlib checkpoints/allocation guards for long-running or large-output operations
  • disable require/package and clear module state when setModuleLoader(null) is used
  • sanitize generic host callback exceptions and document host-boundary trust guidance

Validation

  • composer qa
    • PHP CS Fixer check passed
    • PHPStan passed
    • PHPUnit passed: 191 tests, 463 assertions

@shyim shyim merged commit c1c13aa into main Jun 4, 2026
4 checks passed
@shyim shyim deleted the fix/harden-sandbox-resource-limits branch June 4, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant