Skip to content

workflows: add some os things to sandbox whitelist, only restrict callables#143

Open
msullivan wants to merge 3 commits into
mainfrom
sandbox-tweaks
Open

workflows: add some os things to sandbox whitelist, only restrict callables#143
msullivan wants to merge 3 commits into
mainfrom
sandbox-tweaks

Conversation

@msullivan

Copy link
Copy Markdown
Contributor

shutil, pathlib and third-party rich were both failing to import due
to sandbox interactions with os.

I'm adding getenv, getcwd, and PathLike to the whitelist.

I've also made it so that we only restrict callables, since we were
restricting the set os.supports_dir_fd which was breaking some
stuff. (We could also have added it to the whitelist but this seems a
little more general, though we will want to further generalize it
later.)

…lables

shutil, pathlib and third-party rich were both failing to import due
to sandbox interactions with os.

I'm adding getenv, getcwd, and PathLike to the whitelist.

I've also made it so that we only restrict callables, since we were
restricting the set `os.supports_dir_fd` which was breaking some
stuff. (We could also have added it to the whitelist but this seems a
little more general, though we will want to further generalize it
later.)
@msullivan msullivan requested a review from fantix June 23, 2026 20:48
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vercel-py Ready Ready Preview Jun 23, 2026 11:39pm

Request Review

The sandbox allowlist now permits os.getcwd(); update the test to
match the new behavior instead of asserting it raises.
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