Sandbox hardening, structured hook logging, and security test coverage for beta release#2
Draft
Sandbox hardening, structured hook logging, and security test coverage for beta release#2
Conversation
…overage for beta release Co-authored-by: gorecodes <470165+gorecodes@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [Issue] Seek beta testers for Oxide v0.1.0
Sandbox hardening, structured hook logging, and security test coverage for beta release
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Lua sandbox lacked explicit defense-in-depth against escape vectors, and timeout events were emitted via raw
println!rather than the structured tracing pipeline. Added hardening and test coverage targeting the three beta-testing areas: sandbox isolation, instruction hook reliability, and resource exhaustion.Changes
Sandbox hardening
new_sandboxed_luanow explicitly nil-outsrequire,load,loadfile,dofile, andloadstringafter VM creation — propagated with?so a failure aborts VM construction rather than silently continuing unprotectedStdLib::BASEwas already excluded, but this guarantees protection against future mlua behavior changesStructured hook logging
execute_lua_entryand main-state ininstall_instruction_guard) replaceprintln!withwarn!so timeout events appear in the normal tracing pipelineNew tests
lua_sandbox_blocks_requirerequire('os')errors — no module loadinglua_sandbox_blocks_loadload(...)errors — no dynamic code executionlua_sandbox_blocks_osos.time()errors — OS stdlib not accessiblelua_sandbox_blocks_ioio.read()errors — I/O stdlib not accessiblelua_memory_limit_blocks_exhaustionlua_db_key_length_enforcedinvalid key lengthWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
parcel.pyke.io/home/REDACTED/work/oxide/oxide/target/debug/build/ort-sys-6f632d9d9b9a35be/build-script-build /home/REDACTED/work/oxide/oxide/target/debug/build/ort-sys-6f632d9d9b9a35be/build-script-build --emit=dep-info,link -C embed-bitcode=no --check-cfg cfg(docsrs,test) --check-cfg 13/src/lib.rs -C metadata=722e518a0d08ddcb -C extra-filename=-e7643e2a8049bf3c 64-u�� 64-REDACTED-linux-gnu/lib/librustc_std_workspace_alloc-93ecc7719c6b3845.rlib 64-REDACTED-linux-gnu/lib/libminiz_oxide-ec844042f1e20091.rlib de/node/bin/cc stup/toolchains/cc stup/toolchains/-m64 pointer stup/toolchains//home/REDACTED/work/oxide/oxide/target/debug/build/rustix-3231706cd93576fb/build_s--json=diagnostic-rendered-ansi,artifacts,future-incompat(dns block)/tmp/codeql-scratch-bd19db0dc3bea8a0/dbs/rust/working/target/debug/build/ort-sys-17fef4162fe333a4/build-script-build /tmp/codeql-scratch-bd19db0dc3bea8a0/dbs/rust/working/target/debug/build/ort-sys-17fef4162fe333a4/build-script-build -I /tmp/codeql-scratch-bd19db0dc3bea8a0/dbs/rust/working/target/debug/build/onig_sy/tmp/codeql-scratch-bd19db0dc3bea8a0/dbs/rust/working/target/debug/deps/libstrsim-b77dc0430764db97.rlib -I oniguruma/src -w -DHAVE_UNISTD_H=1 -DHAVE_SYS_TYPES_H=1 e-f979eae637d3fcba/out -o /tmp/codeql-scratch-bd19db0dc3bea8a0/dbs/rust/working/target/debug/build/onig_sys-49f6a73d1ea41d5a/out/a445302c6d3dcb51-regparse.o -c lib/�� s-49f6a73d1ea41d5a/out/a445302c6d3dcb51-regexec.o lib/rustlib/x86_--deny=clippy::disallowed_methods -1949cf8c6b5b557--deny=clippy::cast_sign_loss tch-bd19db0dc3becc -incompat e6e.e2ysd34ef3p3-ffunction-sections(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.