Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/ci/strix_quick_gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ if "\\" in relative_path_str:
normalized = posixpath.normpath(relative_path_str)
if normalized in (".", "") or normalized.startswith("../") or normalized == "..":
raise SystemExit(1)
if not re.fullmatch(r"[A-Za-z0-9_./ -]+", normalized):
if not re.fullmatch(r"[A-Za-z0-9_./ \[\]-]+", normalized):
raise SystemExit(1)
relative_path = Path(normalized)
if relative_path.is_absolute():
Expand Down
6 changes: 6 additions & 0 deletions scripts/ci/test_strix_quick_gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2748,6 +2748,12 @@ run_pull_request_target_head_scope_case \
"BASE_CONTENT_WITH_SPACE_SHOULD_NOT_BE_SCANNED" \
"HEAD_CONTENT_WITH_SPACE_SHOULD_BE_SCANNED"

run_pull_request_target_head_scope_case \
"pull-request-target-nextjs-bracket-route-uses-head-blob" \
"frontend/src/app/labels/[slug]/page.tsx" \
"BASE_BRACKET_ROUTE_CONTENT_SHOULD_NOT_BE_SCANNED" \
"HEAD_BRACKET_ROUTE_CONTENT_SHOULD_BE_SCANNED"

run_pull_request_target_rejects_unsafe_changed_path_case \
"pull-request-target-parent-directory-changed-path-fails-closed" \
"../outside.py"
Expand Down
Loading