Skip to content
Merged
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
15 changes: 15 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Deploy documentation

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
uses: react-component/rc-test/.github/workflows/deploy-pages.yml@main

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

sha="<reviewed-full-commit-sha>"
git ls-remote --exit-code https://github.com/react-component/rc-test.git "$sha"

Repository: react-component/slider

Length of output: 160


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow file =="
if [ -f .github/workflows/deploy-pages.yml ]; then
  cat -n .github/workflows/deploy-pages.yml
else
  echo ".github/workflows/deploy-pages.yml not found"
fi

echo
echo "== remote repo references =="
git ls-remote --exit-code --heads https://github.com/react-component/rc-test.git || true
echo
git ls-remote --exit-code --tags https://github.com/react-component/rc-test.git || true

echo
echo "== usages =="
rg -n "uses: react-component/rc-test/.github/workflows/deploy-pages.yml|id-token: write|pages: write" .github/workflows || true

Repository: react-component/slider

Length of output: 5042


将可复用工作流固定到完整提交 SHA。

react-component/rc-test/.github/workflows/deploy-pages.yml@main 使用可变分支,上游后续变更会直接改变文档发布流程;该工作流还包含 pages: writeid-token: write 权限,应改为已审查的完整 commit SHA。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/deploy-pages.yml at line 15, Update the reusable workflow
reference in the deploy-pages workflow to pin
react-component/rc-test/.github/workflows/deploy-pages.yml to the reviewed full
commit SHA instead of the mutable main branch, while preserving the existing
workflow and permissions.

Loading