Skip to content
Closed
Changes from all commits
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
14 changes: 9 additions & 5 deletions .github/workflows/site-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,17 @@ jobs:
path: site
persist-credentials: false

- name: Reject symbolic links in uploaded source
- name: Reject unsafe symbolic links in uploaded source
run: |
symlink="$(find site -type l -print -quit)"
if [[ -n "$symlink" ]]; then
echo "Fork and branch previews may not upload symbolic links: $symlink" >&2
while IFS= read -r -d '' symlink; do
relative_path="${symlink#site/}"
target="$(readlink "$symlink")"
if [[ "$relative_path" == "public/images" && "$target" == "../images" ]]; then
continue
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowlist misses existing img symlink

High Severity

The new allowlist accepts only public/images../images, but the repository also ships public/img../img. The preview guard still rejects that existing link, so the upload fails before Vercel can build.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3ebed95. Configure here.

echo "Fork and branch previews may not upload symbolic links: $relative_path -> $target" >&2
exit 1
fi
done < <(find site -type l -print0)

- name: Verify the checked-out revision
working-directory: site
Expand Down
Loading