Skip to content

Commit ac26981

Browse files
authored
fix(security): validate FEATURE arg in check-status.sh to prevent path traversal (#66)
1 parent 42fc742 commit ac26981

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

skills/dev-lifecycle/scripts/check-status.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ if [[ $# -lt 1 ]]; then
1010
fi
1111

1212
FEATURE="$1"
13+
14+
if [[ ! "$FEATURE" =~ ^[a-zA-Z0-9_-]+$ ]]; then
15+
echo "Error: feature name must contain only letters, digits, hyphens, and underscores"
16+
exit 1
17+
fi
18+
1319
DOCS="docs/ai"
1420

1521
exists() { [[ -f "$1" ]]; }

0 commit comments

Comments
 (0)