feat: add daily workflow syncing Claude workflows with upstream action docs - #227
Conversation
…n docs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review: claude-action-docs-sync.ymlNice addition — closes a real gap (upstream claude-code-action recommendations silently drifting from this repo's workflows), and the prompt correctly encodes the CLAUDE.md constraints (no renaming reusable-workflow inputs/secrets/jobs, PR-only since main is ruleset-protected). Security concern: unscoped Bash tool + privileged token + untrusted external content
Every other Claude workflow in this repo scopes Bash down to specific subcommands instead of granting it wholesale, e.g. This workflow is the first to combine unrestricted Bash with a WORKFLOW_SECRET-level credential and content fetched from external URLs (raw.githubusercontent.com, code.claude.com) via WebFetch. If any of those upstream pages were compromised or crafted to contain injected instructions, the agent has both the tool surface (arbitrary Bash) and the credential (workflow-scoped PAT) to act on them — e.g. pushing to arbitrary branches or running commands beyond git/gh. Since this runs unattended on a daily schedule (no human trigger like the @claude comment gate in claude-code.yml), there's no human-in-the-loop checkpoint before execution. Worth considering scoping this to what the task actually needs, e.g.: Even if that list ends up fairly broad (this task legitimately needs more git/gh surface than the review workflow), an explicit scope is safer than bare Bash, and keeps the pattern consistent with the rest of the repo. Worth at least a comment explaining the reasoning if unrestricted Bash is kept intentionally. Minor: no concurrency guardThe proposal branch name is Minor: self-reference gap
Positive notes
No test coverage is applicable here beyond a manual workflow_dispatch dry run, given this is a scheduled automation workflow rather than application code. |
…ompare - Scope --allowed-tools to the exact git/gh/date commands the task needs instead of unrestricted Bash, matching the pattern of sibling workflows. - Add a concurrency group so a manual dispatch cannot race a same-day scheduled run for the same proposal branch. - Include claude-action-docs-sync.yml itself in the files compared against upstream recommendations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Addressed the review in 2508031:
🤖 Generated with Claude Code |
ReviewNicely scoped workflow — it correctly encodes the CLAUDE.md constraints (no renaming reusable-workflow inputs/secrets/jobs, PR-only changes since Security
Potential bugs / edge cases
Code quality / consistency
Test coverage
Overall this is a solid, well-scoped addition — the main actionable item is tightening |
…ighter git scope - Fetch upstream docs at the v1 release tag instead of main, so recommendations match the action version the workflows actually run. - Extend the dedup step to detect and delete orphaned proposal branches left by a run that failed between push and PR creation. - Enumerate git subcommands in --allowed-tools (including read-only status/diff/log and ls-remote) instead of a blanket git:* grant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Addressed the second review in e86fe85:
🤖 Generated with Claude Code |
Review:
|
…doc pins - Move orphaned-branch deletion out of the agent prompt into a deterministic workflow step: delete only prefix-matching branches with no open PR whose tip is older than one hour, so a destructive git operation never depends on LLM judgement and recently pushed human branches are protected. The prompt now forbids the agent from force-pushing or deleting branches. - Drop WebSearch and Bash(git ls-remote:*) from --allowed-tools — every URL the task needs is hardcoded and the agent no longer inspects remote branches. - Comment why id-token: write is required (claude-code-action fetches a GitHub OIDC token for its GitHub App authentication). - Pin the trailing usage.md comment link to v1, matching the fetch URLs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Addressed the third review in be07752:
On the actionlint observation: noted — adding workflow linting to CI would be a separate change beyond this PR's scope. 🤖 Generated with Claude Code |
Review:
|
Adds
claude-action-docs-sync.yml, a daily scheduled workflow that runs Claude Code in automation mode to:anthropics/claude-code-actiondocumentation (README, setup, usage, configuration, FAQ, migration guide, examples) and the code.claude.com GitHub Actions page,claude-code.yml,claude-code-review.yml,claude.yml,review.yml),claude-action-docs-sync-, deduplicated against already-open proposals).The prompt encodes the CLAUDE.md constraints: reusable workflow inputs/secrets/jobs must not be renamed (called from other org repos), and changes go through a PR since
mainis ruleset-protected. Checkout andghuseWORKFLOW_SECRETbecause pushing edits under.github/workflows/requires aworkflow-scoped token.🤖 Generated with Claude Code