Skip to content

test(windows): deny AppContainer short-name escapes - #58

Merged
senamakel merged 8 commits into
epic/7328-security-busfrom
tinybox-27-shortname-denial
Oct 24, 2026
Merged

senamakel merged 8 commits into
epic/7328-security-busfrom
tinybox-27-shortname-denial

Conversation

@senamakel

Copy link
Copy Markdown
Owner

Adds a live Windows AppContainer probe for reading a sibling secret through its 8.3 short-name alias. The host obtains the alias with GetShortPathNameW, requires the secret filename to have a distinct short alias, and proves the alias works before the jailed child attempts the same read. The child must report access denied and never print the secret. The test fails if the runner does not produce a short alias; it does not skip.

Adds the exact test filter to both the Windows Server 2025 x64 and Windows 11 ARM64 AppContainer acceptance steps. No sandbox behavior or Windows CPU support changes; CPU remains typed Unsupported.

Validation:

  • cargo fmt --all -- --check
  • cargo check --locked --offline --target x86_64-pc-windows-gnu -p tinybox-jail --tests
  • workflow YAML parse and bash -n for both focused Windows steps
  • The Windows AppContainer runtime probe cannot execute on this Linux host; the focused hosted x64 and ARM64 jobs run it.
  • Cross-target Clippy was attempted and reports three pre-existing findings in other tests in windows_tests.rs (too_many_lines and two used_underscore_binding findings); it reports no findings in this change.

Part of tinyhumansai#27
Part of tinyhumansai/openhuman#7328

senamakel and others added 8 commits October 24, 2026 06:47
Update the vendored tinybus submodule to a newer upstream revision.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add a Windows AppContainer test that resolves an 8.3 short-name alias for a
file outside the granted roots and asserts the sandbox still denies the read,
guarding against path checks that only compare long names. The new test is
registered in the CI allowlists so it runs on the Windows runners.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The assertion previously required a tilde anywhere in the short path, which
could be satisfied by a parent directory rather than the secret file itself.
It now inspects just the file name component so the test verifies the alias
was actually generated for the probe file.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reformatted the PowerShell command arguments and the empty-path assertion
in the short path test so they match rustfmt's line width. No behaviour
change.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Extracted the GetShortPathNameW lookup and the AppContainer child probe
from the short-name alias denial test into separate helper functions so
the test body reads as a sequence of assertions. Behaviour is unchanged.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The short-name read probe now returns a bool instead of an ExitStatus, and the
verbatim-path test asserts on that bool, so the assertion message reports the
actual status value rather than a bare success flag.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Two AppContainer tests asserted the wrong status expression, so the
verbatim-path test checked a bare ExitStatus and the short-name test
checked success(). Both now assert the intended condition.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel

Copy link
Copy Markdown
Owner Author

CI update: the new 8.3 short-name AppContainer probe passed in the dedicated Windows Server 2025 x64 job and the full Windows 11 ARM64 acceptance lane. In full run 40071995370, the first Windows Server 2025 feature-test attempt failed only because the unrelated tinybox-ssh::host::forward::test::an_unreachable_destination_settles_quickly_instead_of_hanging exceeded its 10-second bound. All other checks passed. Attempt 2 is rerunning only that failed Windows Server 2025 job; no source change was needed for the probe.

@senamakel
senamakel merged commit bab4731 into epic/7328-security-bus Oct 24, 2026
39 of 40 checks passed
@senamakel

Copy link
Copy Markdown
Owner Author

Merge update

Merged to epic/7328-security-bus at bab4731aa49659171c26765b076ed760a271d9f5 from exact head 85af375520d7ef32064def33a2288754bf096ea2.

All 20 hosted checks passed on run 40071995370, attempt 2, including Windows Server 2025 x64, Windows 11 ARM64, and the dedicated AppContainer job. The first attempt failed only on the unrelated 10-second tinybox-ssh timing test; the exact failed lane passed on rerun. The 8.3 alias probes passed on both Windows architectures.

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