Skip to content

fix(python): cover issue 1264 security gaps#1303

Merged
chaliy merged 1 commit intomainfrom
fix/issue-1264-python-security-tests
Apr 15, 2026
Merged

fix(python): cover issue 1264 security gaps#1303
chaliy merged 1 commit intomainfrom
fix/issue-1264-python-security-tests

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 15, 2026

Summary

  • add the missing Python security parity coverage from issue test(python): add missing security tests — VFS limits, arithmetic, injection, encoding #1264, including direct Bash.read_file() / write_file() / ls() / glob() cases
  • fix the default sandbox shell vars so $PPID resolves to a virtual parent PID and add a regression test
  • keep latest-main local pre-PR checks moving by comparing RealFs fallback paths against the canonical root and gating http_client-only hook tests

Testing

  • /private/tmp/bashkit-1264-venv/bin/pytest crates/bashkit-python/tests/test_security.py -q
  • /private/tmp/bashkit-1264-venv/bin/ruff check crates/bashkit-python/tests/test_security.py
  • /private/tmp/bashkit-1264-venv/bin/ruff format --check crates/bashkit-python/tests/test_security.py
  • cargo test -p bashkit --features http_client default_ppid_is_sandboxed -- --nocapture
  • cargo test -p bashkit resolve_fallback_validates_containment -- --nocapture
  • cargo test -p bashkit resolve_fallback_returns_normalized_path -- --nocapture
  • just pre-pr (locally blocked on bash_comparison_tests; reproduced on clean origin/main in a detached worktree on this macOS machine)

Closes #1264.

@chaliy chaliy merged commit 66ccd5f into main Apr 15, 2026
28 checks passed
@chaliy chaliy deleted the fix/issue-1264-python-security-tests branch April 15, 2026 02:55
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.

test(python): add missing security tests — VFS limits, arithmetic, injection, encoding

1 participant