mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-15 00:30:55 +08:00
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
from sandbox import windows_sandbox
|
|
|
|
def test_icacl_no_low_integrity_label():
|
|
icacl_output = r"""
|
|
foo NT AUTHORITY\SYSTEM:(OI)(CI)(F)
|
|
"""
|
|
assert not windows_sandbox.does_permit_low_integrity_write(icacl_output)
|
|
|
|
def test_icacl_missing_inherit_flags():
|
|
icacl_output = r"""
|
|
foo Mandatory Label\Low Mandatory Level:(NW)
|
|
"""
|
|
assert not windows_sandbox.does_permit_low_integrity_write(icacl_output)
|
|
|
|
icacl_output = r"""
|
|
foo Mandatory Label\Low Mandatory Level:(OI)(NW)
|
|
"""
|
|
assert not windows_sandbox.does_permit_low_integrity_write(icacl_output)
|
|
|
|
icacl_output = r"""
|
|
foo Mandatory Label\Low Mandatory Level:(CI)(NW)
|
|
"""
|
|
assert not windows_sandbox.does_permit_low_integrity_write(icacl_output)
|
|
|
|
def test_icacl_correct_acls():
|
|
icacl_output = r"""
|
|
foo Mandatory Label\Low Mandatory Level:(I)(OI)(CI)(NW)
|
|
"""
|
|
assert windows_sandbox.does_permit_low_integrity_write(icacl_output)
|
|
|
|
icacl_output = r"""
|
|
foo Mandatory Label\Low Mandatory Level:(OI)(CI)(NW)
|
|
"""
|
|
assert windows_sandbox.does_permit_low_integrity_write(icacl_output)
|