Repository navigation
Description
Problem
The shared CI runner protects source files under src/front/llvm/utils/tests/std/tools/.github but omits the root whale crate. A report destination inside whale/src can therefore replace compiler source with JSON.
Reproduction
Audited on Linux amd64 at 53bb5809cf32d29f5a5a9d313ffa332ea3cd4beb, whose tracked tree matches canonical master c5ab63f9eec388c75b00f5cd59eae28a45a9b39f. Compiler built with Rust 1.89.0, LLVM 21, and the checkout std; Whale is locked to 020d2a4. Python reproduction executed on a temporary checkout-shaped root, using the production Runner:
from pathlib import Path
from tools.ci import common
from tools.ci.targets import resolve
root = Path("/tmp/wave-report-audit")
(root / "whale/src").mkdir(parents=True, exist_ok=True)
source = root / "whale/src/lib.rs"
source.write_text("pub fn original() {}\n")
(root / "Cargo.toml").write_text('[package]\nversion="0.0.1-alpha-dev"\n')
common.ROOT = root
runner = common.Runner(resolve("linux-amd64"), source)
runner.save()
assert source.read_text().startswith("{") # JSON replaced the Rust sourceScope
Update protected input discovery in tools/ci/common.py to include whale source and manifest inputs, including aliases. Starting tests: tools/test_ci.py. This is a bounded missing-crate case after #811; broader transitive case/std protection is a separate issue.
Completion criteria
- Direct, normalized, symlink, and hardlink destinations inside the Whale crate are rejected before any report write.
- Existing protected crates remain protected and a safe report still works.
- Temporary fixtures cover preflight/failure paths without changing real checkout sources.
Activity
Protect compiler inputs and strengthen Whale lowering validation (#911)