Skip to content

Commit 7dec8be

Browse files
jzayas03claude
andauthored
Remove a dead case pattern in common.sh (SC2221/SC2222) (#4605)
resolve_template_content() rejects unsafe manifest paths with `/*|*../*|../*)`. The third alternative can never match: `*../*` already matches every string `../*` does, so shellcheck reports SC2221 (this pattern always overrides a later one) and SC2222 (this pattern never matches). Removing it changes nothing: checked against /etc/passwd, ../x, a/../b, ../, x/../../y, .., a/.., ..a, a..b, ./x and templates/x.md -- every input classifies identically before and after. These are warnings, so lint.yml's --severity=error does not see them. This is one of the findings between the current threshold and the tightening CONTRIBUTING.md describes. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 835f31e commit 7dec8be

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/bash/common.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ except Exception as exc:
770770
local candidate=""
771771
if [ -n "$manifest_file" ]; then
772772
case "$manifest_file" in
773-
/*|*../*|../*) manifest_file="" ;;
773+
/*|*../*) manifest_file="" ;;
774774
esac
775775
fi
776776
if [ -n "$manifest_file" ]; then

0 commit comments

Comments
 (0)