Repository navigation
test(task): ignore an external scanner's copy in the hostile filename test - #199
Draft
greenhat616 wants to merge 1 commit into
Draft
greenhat616 wants to merge 1 commit into
greenhat616 wants to merge 1 commit into
Conversation
This was referenced Nov 9, 2026
greenhat616
force-pushed
the
test/hardening-35-scanner-tmp
branch
from
November 13, 2026 07:44
986d025 to
ff67c05
Compare
greenhat616
marked this pull request as draft
November 13, 2026 08:55
… test On one Windows machine the hostile filename test failed in 2 of 30 runs: next to evil.bin, just renamed from evil.bin.downloading, the directory also held EVIL.BIN.DOWNLOADING.tmp. Nothing in bolt-load builds that name, so another process, likely an antivirus, is suspected but not confirmed. The test now checks evil.bin's content and that the temporary file is gone, and on Windows ignores only that observed name when it lists the directory; any other entry still fails it.
greenhat616
force-pushed
the
test/hardening-35-scanner-tmp
branch
from
November 13, 2026 22:25
ff67c05 to
b8fac9e
Compare
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.
Test fix for the download strategy hardening stack. It is stacked on #198, and that branch is its base. The design note is in §14.25.
Why
test_save_into_rejects_hostile_filenamesasserted that the download directory held onlyevil.bin. On the maintainer's Windows machine it failed in 2 of 30 runs: the directory also heldEVIL.BIN.DOWNLOADING.tmp, right afterevil.bin.downloadingwas renamed toevil.bin.Nothing in bolt-load builds that name:
<dest>.downloading, lowercase and without.tmp;async_fs::renamecallsstd::fs::rename(MoveFileExW) directly and creates no extra name;SimpleTestAdapterand starts no HTTP server;.tmp<random>.So another process is suspected, such as an antivirus: Kaspersky runs on that machine. This is unconfirmed. Confirming it would need an AV exclusion or a Process Monitor trace.
What
evil.binhas the expected content (hash and length), thatevil.bin.downloadingis gone, and that nothing escaped to the parent directory.evil.bin.downloading.tmp, case-insensitively, the one name that was observed. It does so only on Windows, and never as*.tmp. The rest must be exactly["evil.bin"]..tmpnames. On every other platform no extra entry is allowed.resource_changed.rsalready checks only the product's own names, so it is unchanged.Review
Reviewed with
/ccg:review, using the codex backend only (a single-model review).PASS (94/100). It confirmed that no product path builds the name, with async-fs 2.2.0 delegating to
std::fs::renameand tempfile 3.27.0 naming files.tmp<random>. It also confirmed that the test stays meaningful and deterministic.Both of its findings are applied:
Checks
On
+nightly-2026-11-06:cargo fmt --all -- --check;-D warnings;