You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We introduced landlock to sandbox the unblob process and limit what it can do on the filesystem.
However, during tests, we enable full R/W permissions with this function:
defis_sandbox_available():
is_sandbox_available=Truetry:
restrict_access(AccessFS.read_write("/"))
exceptSandboxError:
is_sandbox_available=Falseifplatform.architecture=="x86_64"andplatform.system=="linux":
assertis_sandbox_available, "Sandboxing should work at least on Linux-x86_64"returnis_sandbox_available
This is used in:
pytestmark=pytest.mark.skipif(
notis_sandbox_available(), reason="Sandboxing only works on Linux"
)
This leads to a bunch of permission limitations not being caught during testing such as our inability to delete extraction directories (#1085) or handlers using tempfile lacking permissions to do anything under /tmp. These issues - had the sandbox settings during testing reflects the ones in normal usage - would have been caught by our integration tests suite.
is_sandbox_available should call restrict_access with a stricter ruleset, most probably imported from Sandbox.passthrough.
The text was updated successfully, but these errors were encountered:
We introduced landlock to sandbox the unblob process and limit what it can do on the filesystem.
However, during tests, we enable full R/W permissions with this function:
This is used in:
This leads to a bunch of permission limitations not being caught during testing such as our inability to delete extraction directories (#1085) or handlers using
tempfile
lacking permissions to do anything under/tmp
. These issues - had the sandbox settings during testing reflects the ones in normal usage - would have been caught by our integration tests suite.is_sandbox_available
should callrestrict_access
with a stricter ruleset, most probably imported fromSandbox.passthrough
.The text was updated successfully, but these errors were encountered: