Repository navigation
Use shared PR author and stale workflows - #35
Conversation
| with: | ||
| configuration-path: .github/auto-assign.yml | ||
| assign: | ||
| uses: smileidentity/central-workflows/.github/workflows/auto-author-assign.yml@v1 |
| stale-pr-label: stale | ||
| exempt-issue-labels: pinned,security | ||
| exempt-pr-labels: pinned,security | ||
| uses: smileidentity/central-workflows/.github/workflows/stale.yml@v1 |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
🔍 Semgrep Security Scan Results✅ No security findings detected by |
| with: | ||
| configuration-path: .github/auto-assign.yml | ||
| assign: | ||
| uses: smileidentity/central-workflows/.github/workflows/auto-author-assign.yml@v1 |
There was a problem hiding this comment.
Suggestion: This reusable workflow runs under pull_request_target, which has a write-scoped token and runs for fork PRs. It is pinned to the mutable @v1 tag, so anyone who can move that tag can change the code that runs with write access here. The repo's SHA-pinning convention applies, so pin to the full commit SHA that v1 currently points to and keep the tag as a comment. [security, importance: 6]
| uses: smileidentity/central-workflows/.github/workflows/auto-author-assign.yml@v1 | |
| uses: smileidentity/central-workflows/.github/workflows/auto-author-assign.yml@<full-40-char-commit-sha-of-v1> # v1 |
| permissions: | ||
| # Adding assignees goes through the issues API; reviewers through pull-requests. | ||
| issues: write | ||
| pull-requests: write |
There was a problem hiding this comment.
Suggestion: A called reusable workflow can never get more permissions than the caller grants. Adding assignees goes through the Issues API and needs issues: write. With that permission removed, the central workflow's assign step will likely fail with a 403, unless it only uses PR-scoped endpoints. Restore issues: write, or confirm the central workflow's required permissions. [possible issue, importance: 5]
| permissions: | |
| # Adding assignees goes through the issues API; reviewers through pull-requests. | |
| issues: write | |
| pull-requests: write | |
| permissions: | |
| issues: write | |
| pull-requests: write |
| stale-pr-label: stale | ||
| exempt-issue-labels: pinned,security | ||
| exempt-pr-labels: pinned,security | ||
| uses: smileidentity/central-workflows/.github/workflows/stale.yml@v1 |
There was a problem hiding this comment.
Suggestion: This workflow gets issues: write and pull-requests: write, but it is referenced by the mutable @v1 tag. That drops the org's SHA-pinning convention and exposes the repo to tag-retargeting supply-chain changes. Pin it to the full commit SHA of v1. [security, importance: 5]
| uses: smileidentity/central-workflows/.github/workflows/stale.yml@v1 | |
| uses: smileidentity/central-workflows/.github/workflows/stale.yml@<full-40-char-commit-sha-of-v1> # v1 |
User description
Assign PR authors and flag inactive PRs consistently across active repositories.
Calls the shared workflows in central-workflows at
v1. PRs receive a stale label after 14 inactive days. Issues are excluded and nothing is closed automatically.Validation: the distributor checked the caller diff for whitespace errors. Check this repository's Actions runs after merging; this PR does not prove the workflows have run here.
PR Type
Other
Description
Replace inline workflows with shared
central-workflows@v1callsAuto author assign now uses reusable workflow
issues: writepermission and local.github/auto-assign.ymlconfigStale workflow now flags PRs only
0 1 * * *to30 16 * * *Diagram Walkthrough
File Walkthrough
auto-author-assign.yml
Delegate author assignment to the shared reusable workflow.github/workflows/auto-author-assign.yml
kentaro-m/auto-assign-actionstep (SHA-pinned atv2.0.2) with a call to the reusable
smileidentity/central-workflows/.github/workflows/auto-author-assign.yml@v1issues: writepermission and kept onlypull-requests:write.github/auto-assign.ymlconfiguration
assign-authortoassign) and removedthe explanatory header comment
stale.yml
Delegate stale PR flagging to the shared reusable workflow.github/workflows/stale.yml
actions/stalestep (SHA-pinned at v11.0.0) with acall to the reusable
smileidentity/central-workflows/.github/workflows/stale.yml@v1custom messages and exempt labels (
pinned,security)0 1 * * *to30 16 * * *and renamed theworkflow to
Flag stale PRsissues: writeandpull-requests: writepermissions