Primary finding
PR body interpolation is vulnerable to shell/markdown injection from branch name and upstream-controlled content
- .github/workflows/sync-upstream.yml:76-95
The branch name is derived from `date -u +%Y%m%d` so it is safe today, but the pattern interpolates `$BRANCH` and `$AHEAD` directly into a shell-quoted string that is then re-expanded via `printf '%b'`. If `BRANCH` ever incorporates upstream-derived data (a likely future change, e.g. embedding the upstream short SHA via `git rev-parse upstream/main`), `%b` interprets backslash escapes which could break out of the code fence or inject content. Lower severity today because the current source of $BRANCH is a date, but the construction is fragile and should use `--body-file` with a heredoc instead of `printf %b` on an interpolated string.
Recommendation
Build the PR body via a heredoc into a file and pass it to `gh pr create --body-file`. Avoid `printf %b` on data-bearing strings; or at minimum use `printf '%s'` with literal newlines from the heredoc.