bazelbuild / bazelbuild/bazel-skylib
`diff_test::failure_message` can be used to execute sub-shells
- Dominant language
- Starlark
- Stars
- 444
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
Adding back-ticks to fail messages creates a sub-shell that leads to odd and/or undesirable behavior
https://github.com/bazelbuild/rules_python/commit/7740b22d0bae942af0797967f2617daa19834cb3#r64135831
The use of [diff_test::failure_message](https://github.com/bazelbuild/bazel-skylib/blob/1.1.1/rules/diff_test.bzl#L127) should not cause any additional commands to be executed.
Contributor guide
Research direction
Start with rules/diff_test.bzl at the diff_test::failure_message implementation linked in the issue. Check how the failure message is passed to Bazel and verify that back-tick content cannot trigger additional command execution; done means the failure message is displayed without running a sub-shell.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100