security(upstream): protect owner storefront and security files from rsync deletion
davoodmehraban89 committed
Oct 14, 2026 at 23:23 UTC
752fdd7c96adaa2ddd9eafbe4136ba1dbb16175e
1 file changed
+7
-2
.github/workflows/medusa-upstream-review.yml
+7
-2
@@ -40,11 +40,16 @@ jobs:
40
git config user.name "github-actions[bot]"
41
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
42
git checkout -B automation/medusa-upstream-review
43
- # Keep local GitHub configuration and workflows intact. These are
44
- # security-sensitive and require separate manual review.
43
+ # Keep local GitHub settings and all owner-specific customizations intact.
44
+ # These exclusions prevent upstream --delete from removing storefront,
45
+ # project tracking, secret-scan policy, or owner-owned security scripts.
46
rsync -a --delete \
47
--exclude='/.git/' \
48
--exclude='/.github/' \
49
+ --exclude='/commerce/' \
50
+ --exclude='/PROJECT_STATUS.md' \
51
+ --exclude='/.gitleaksignore' \
52
+ --exclude='/scripts/security/' \
53
/tmp/medusa-upstream/ ./
54
mkdir -p .github
55
printf '%s\n' "$UPSTREAM_SHA" > .github/medusa-upstream-reviewed-sha