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

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

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

echo
echo "== changed files/status =="
git status --short
echo
git diff --stat || true

echo
echo "== all reusable workflow references under deploy-pages.yml context =="
rg -n "uses:\s*[^#]*(deploy-pages|\.github/workflows)" .github/workflows/deploy-pages.yml || true

echo
echo "== all git references to rc-test deploy-pages workfows =="
rg -n "react-component/rc-test/.github/workflows/deploy-pages\.yml|rc-test/.github/workflows/deploy-pages" .github . 2>/dev/null | head -100 || true

Repository: react-component/upload

Length of output: 875


将外部可复用工作流固定到完整 commit SHA。

当前 react-component/rc-test/.github/workflows/deploy-pages.yml@main 会随上游分支变更自动拉取新代码,该工作流拥有 pages: writeid-token: write 权限;改用完整 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, 将 deploy-pages.yml
中对外部可复用工作流的 `@main` 引用替换为经过审查的完整 commit SHA,并保留现有工作流路径与权限配置不变。

Loading