fix(dsl): confine mutation path variants - #836
Conversation
Apply resolved boundary checks to Pathname and FileUtils mutation variants that only used lexical checks. Validate symlink destinations and targets for scalar, array, and hash forms so formula steps cannot mutate files outside the prefix through planted links.
|
@rustytrees Thanks for the contribution! One small request: could you please instruct your agent to follow the PR template provided in the repository for PRs? It helps keep the PRs consistent and easier to review. Thanks! |
|
I published a runnable PoC for the git clone https://github.com/rustytrees/malt-security-pocs.git
cd malt-security-pocs
git checkout bd0e2a4d088cc63c8a7ab1613e851d23808b5a4d
./scripts/run-poc.sh --malt /path/to/malt --expect vulnerable h03The runner uses This PoC dynamically covers |
Description
Pathname and FileUtils mutation variants now use resolved boundary checks instead of lexical prefixes. The checks confine symlink destinations and targets for scalar, array, and hash forms.
The regression tests cover
mkpath,unlink,install_symlink,ln_sf, andrm, including intermediate directory symlinks and outside targets.Related Issue
Closes #855.
Notes for Reviewers
Verification completed:
zig build test-one: 2,424 passedzig build test: 5,067 passed, 3 skippedgit verify-commit