From 2f8cb86381332c4644c935b9b49d8a6337b6a0cb Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 10 May 2026 06:35:41 +0100 Subject: [PATCH] ci: skip symlinks in opengrep changed scan (#79930) --- scripts/run-opengrep.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/run-opengrep.sh b/scripts/run-opengrep.sh index 1137f39d3f8f..f08ecd2a0b69 100755 --- a/scripts/run-opengrep.sh +++ b/scripts/run-opengrep.sh @@ -114,6 +114,14 @@ if (( PATHS_PASSED == 0 )); then if (( CHANGED_ONLY )); then SCAN_PATHS=() while IFS= read -r path; do + # OpenGrep errors when an explicit changed path is a symlink; scan the + # real target content, not duplicate guide aliases such as CLAUDE.md. + if [[ -L "$path" ]]; then + continue + fi + if [[ ! -f "$path" && ! -d "$path" ]]; then + continue + fi SCAN_PATHS+=( "$path" ) done < <( {