Skip to content

security: bound Sage runner resources and reference access - #3

Open
christiek673-mAth wants to merge 1 commit into
VeryMath:mainfrom
christiek673-mAth:security/resource-limits-sagemath
Open

security: bound Sage runner resources and reference access#3
christiek673-mAth wants to merge 1 commit into
VeryMath:mainfrom
christiek673-mAth:security/resource-limits-sagemath

Conversation

@christiek673-mAth

Copy link
Copy Markdown

Summary

  • Add bounded timeout and combined stdout/stderr output limits to the local and WSL Sage runners.
  • Terminate the complete child process group on timeout or output-limit violations and expose explicit status fields/return codes.
  • Prevent sage_ref_search.py --show from reading outside the bundled API reference tree.
  • Document the non-sandbox security model and resource limits.
  • Add regression tests for timeout, output limits, WSL parity, and traversal rejection.

Validation

  • python3.11 -m unittest discover -s tests -q
  • Result: 4 tests passed.
  • git diff --check passed.

SageMath itself was not available in the local environment, so the tests exercise the bounded executor with Python subprocesses rather than a live Sage installation.

@christiek673-mAth

Copy link
Copy Markdown
Author

Hi maintainers, could you please review this PR? It adds bounded timeout/output handling and process-group cleanup to the local and WSL Sage runners, hardens bundled reference access, and documents the non-sandbox security model. Local Python 3.11 validation passed: 4 tests passed, and git diff --check passed. SageMath itself was not available in the local environment, so the resource-limit tests use Python subprocesses.

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