Skip to content

Commit 37cf0a1

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/fix-release-provenance-do-not-track
2 parents 8b447ef + 5ba6e37 commit 37cf0a1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ jobs:
116116
- run: npm run generate-api-docs
117117
- name: Commit generated API docs to same-repo PR
118118
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
119+
env:
120+
# Bind the attacker-controllable PR branch name to an env var so it is
121+
# passed as a literal value, never interpolated into the script text
122+
# (prevents shell injection — OSSF Scorecard Dangerous-Workflow).
123+
HEAD_REF: ${{ github.head_ref }}
119124
run: |
120125
if git diff --quiet -- apps/website/content/docs/*/api/api-docs.json; then
121126
echo "Generated API docs are already committed."
@@ -126,7 +131,7 @@ jobs:
126131
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
127132
git add apps/website/content/docs/*/api/api-docs.json
128133
git commit -m "chore(docs): regenerate api docs"
129-
git push origin "HEAD:${{ github.head_ref }}"
134+
git push origin "HEAD:$HEAD_REF"
130135
- name: Verify generated API docs are committed
131136
run: git diff --exit-code -- apps/website/content/docs/*/api/api-docs.json
132137
- run: npx nx build website

0 commit comments

Comments
 (0)