-
Notifications
You must be signed in to change notification settings - Fork 0
fix: harden repo maintenance checks #869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,4 +181,4 @@ jobs: | |
| with: | ||
| name: sbom | ||
| path: sbom.spdx.json | ||
| retention-days: 90 | ||
| retention-days: 30 | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,18 +36,18 @@ jobs: | |||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||
| - name: Validate maintenance token | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| CLAUDE_PR_GITHUB_TOKEN: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN }} | ||||||||||||||||||||||||||
| CLAUDE_PR_GITHUB_TOKEN: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT }} | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| if [ -z "$CLAUDE_PR_GITHUB_TOKEN" ]; then | ||||||||||||||||||||||||||
| echo "CLAUDE_PR_GITHUB_TOKEN is required for scheduled maintenance because it may update workflow files." | ||||||||||||||||||||||||||
| echo "CLAUDE_PR_GITHUB_TOKEN or CLAUDE_PAT is required for scheduled maintenance because it may update workflow files." | ||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| fetch-depth: 1 | ||||||||||||||||||||||||||
| token: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN }} | ||||||||||||||||||||||||||
| token: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT }} | ||||||||||||||||||||||||||
|
Comment on lines
46
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat -n .github/workflows/scheduled-maintenance.ymlRepository: keito4/config Length of output: 6426 🌐 Web query:
💡 Result: For actions/checkout v6, the input persist-credentials default behavior is effectively “true” (credentials are persisted so authenticated git commands work during the job). The credentials are stored in a separate file under $RUNNER_TEMP, wired into the repo’s git config via includeIf; they are removed during post-job cleanup. To opt out, set persist-credentials: false. Details grounded in the v6 action docs: - The action documents that the auth token is persisted to enable scripts to run authenticated git commands, and that you can opt out with persist-credentials: false [1][2][3]. - The v6 documentation also states that persist-credentials now stores credentials in a separate file under $RUNNER_TEMP instead of directly in.git/config [1][2][3]. - The action’s README also notes the token is removed during post-job cleanup [1][2][3]. Important behavioral implication: - Because v6 persists credentials via git includeIf pointing at the $RUNNER_TEMP credentials file, authenticated git operations that rely on those credentials should work in the workflow after checkout, but may require compatible runner/container behavior as described by the action changes [4][5]. Answer in one line: actions/checkout@v6 persists credentials by default (persist-credentials enabled), stores them under $RUNNER_TEMP, and removes them after the job; use persist-credentials: false to disable. Citations:
Add The Proposed hardening - name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 1
+ persist-credentials: false
token: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT }}📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.25.2)[warning] 46-50: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Prepare maintenance branch | ||||||||||||||||||||||||||
| run: git checkout -b "$CLAUDE_BRANCH" | ||||||||||||||||||||||||||
|
|
@@ -62,7 +62,7 @@ jobs: | |||||||||||||||||||||||||
| CLAUDE_BRANCH: ${{ env.CLAUDE_BRANCH }} | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||||||||||||||||||||||||||
| github_token: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN }} | ||||||||||||||||||||||||||
| github_token: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT }} | ||||||||||||||||||||||||||
| prompt: | | ||||||||||||||||||||||||||
| Run `script/check-trivyignore-review.sh` first and include any due `.trivyignore` entries in the final summary. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
@@ -85,7 +85,7 @@ jobs: | |||||||||||||||||||||||||
| - name: Create maintenance pull request | ||||||||||||||||||||||||||
| if: env.CLAUDE_BRANCH != '' | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| GH_TOKEN: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN }} | ||||||||||||||||||||||||||
| GH_TOKEN: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT }} | ||||||||||||||||||||||||||
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | ||||||||||||||||||||||||||
| MODE: ${{ inputs.mode || 'full' }} | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
|
|
@@ -117,6 +117,7 @@ jobs: | |||||||||||||||||||||||||
| if: failure() | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| GH_TOKEN: ${{ github.token }} | ||||||||||||||||||||||||||
| GH_REPO: ${{ github.repository }} | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| EXISTING=$(gh issue list --label "maintenance" --state open --json number --jq 'length') | ||||||||||||||||||||||||||
| if [ "$EXISTING" -gt 0 ]; then | ||||||||||||||||||||||||||
|
|
@@ -135,6 +136,7 @@ jobs: | |||||||||||||||||||||||||
| **Mode:** ${{ inputs.mode || 'full' }} | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Please check the workflow logs and re-run manually if needed. | ||||||||||||||||||||||||||
| If this failed during token validation, configure \`CLAUDE_PR_GITHUB_TOKEN\` or \`CLAUDE_PAT\` in repository Actions secrets. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| *Auto-generated by [scheduled-maintenance.yml](.github/workflows/scheduled-maintenance.yml)*" | ||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,94 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| #!/usr/bin/env bash | ||||||||||||||||||||||||||||||||||||||||||||||||||
| # Additional checks used by script/repo-maintenance.sh. | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| check_scheduled_maintenance_configuration() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| local workflow=".github/workflows/scheduled-maintenance.yml" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| local repo secrets issue_count=0 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| local has_pr_token=false has_legacy_pat=false | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| [[ -f "$workflow" ]] || return 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| if grep -q "CLAUDE_PR_GITHUB_TOKEN" "$workflow"; then | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if command -v gh >/dev/null 2>&1; then | ||||||||||||||||||||||||||||||||||||||||||||||||||
| repo="$(gh repo view --json nameWithOwner --jq '.nameWithOwner' 2>/dev/null || true)" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ -n "$repo" && "$repo" != "null" ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||
| secrets="$(gh secret list --repo "$repo" --json name --jq '.[].name' 2>/dev/null || true)" | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||||||||||||||||||||||||||||||||||||||||||||||||||
| grep -Fxq "CLAUDE_PR_GITHUB_TOKEN" <<<"$secrets" && has_pr_token=true | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if grep -q "CLAUDE_PAT" "$workflow" && grep -Fxq "CLAUDE_PAT" <<<"$secrets"; then | ||||||||||||||||||||||||||||||||||||||||||||||||||
| has_legacy_pat=true | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "$has_pr_token" != "true" && "$has_legacy_pat" != "true" ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||
| output::warning "scheduled-maintenance.yml requires CLAUDE_PR_GITHUB_TOKEN or CLAUDE_PAT secret" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Settings: https://github.com/$repo/settings/secrets/actions" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| issue_count=$((issue_count + 1)) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||
| output::warning "Scheduled Maintenance secret check skipped: repository unavailable" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||
| output::warning "Scheduled Maintenance secret check skipped: gh not found" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| if grep -q "name: Post failure issue" "$workflow" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| && ! grep -q "GH_REPO: \${{ github.repository }}" "$workflow" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| && ! grep -q -- "--repo \"\$GITHUB_REPOSITORY\"" "$workflow"; then | ||||||||||||||||||||||||||||||||||||||||||||||||||
| output::warning "scheduled-maintenance.yml failure issue step needs GH_REPO or --repo" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| issue_count=$((issue_count + 1)) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "$issue_count" -gt 0 ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| output::success "Scheduled Maintenance configuration ok" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| check_artifact_retention() { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| local workflow issue_count=0 | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| for workflow in .github/workflows/*.yml .github/workflows/*.yaml; do | ||||||||||||||||||||||||||||||||||||||||||||||||||
| [[ -f "$workflow" ]] || continue | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if ! awk -v file="$(basename "$workflow")" ' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| /^[[:space:]]*(-[[:space:]]*)?uses:[[:space:]]*actions\/upload-artifact@/ { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| in_upload = 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| has_retention = 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| next | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| in_upload && /^[[:space:]]*retention-days:[[:space:]]*/ { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| has_retention = 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| value = $0 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| sub(/.*retention-days:[[:space:]]*/, "", value) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| sub(/[[:space:]#].*/, "", value) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (value + 0 > 30) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| printf "%s: artifact retention-days is %s (expected <= 30)\n", file, value | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+58
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reject non-literal retention values instead of coercing them to zero. At Line 63, 🔧 Proposed fix in_upload && /^[[:space:]]*retention-days:[[:space:]]*/ {
has_retention = 1
value = $0
sub(/.*retention-days:[[:space:]]*/, "", value)
sub(/[[:space:]#].*/, "", value)
- if (value + 0 > 30) {
+ if (value !~ /^"?[0-9]+"?$/) {
+ printf "%s: artifact retention-days must be a literal integer <= 30 (found %s)\n", file, value
+ bad = 1
+ next
+ }
+ gsub(/"/, "", value)
+ if ((value + 0) > 30) {
printf "%s: artifact retention-days is %s (expected <= 30)\n", file, value
bad = 1
}
next
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||
| bad = 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| next | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| in_upload && /^[[:space:]]*-[[:space:]]*(name|uses):/ { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!has_retention) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| printf "%s: upload-artifact missing retention-days\n", file | ||||||||||||||||||||||||||||||||||||||||||||||||||
| bad = 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| in_upload = ($0 ~ /uses:[[:space:]]*actions\/upload-artifact@/) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| has_retention = 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| END { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if (in_upload && !has_retention) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| printf "%s: upload-artifact missing retention-days\n", file | ||||||||||||||||||||||||||||||||||||||||||||||||||
| bad = 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| exit bad ? 1 : 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ' "$workflow"; then | ||||||||||||||||||||||||||||||||||||||||||||||||||
| issue_count=$((issue_count + 1)) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| if [[ "$issue_count" -gt 0 ]]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| output::success "Artifact retention settings ok" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,18 +36,18 @@ jobs: | |||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||
| - name: Validate maintenance token | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| CLAUDE_PR_GITHUB_TOKEN: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN }} | ||||||||||||||||||||||||||
| CLAUDE_PR_GITHUB_TOKEN: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT }} | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| if [ -z "$CLAUDE_PR_GITHUB_TOKEN" ]; then | ||||||||||||||||||||||||||
| echo "CLAUDE_PR_GITHUB_TOKEN is required for scheduled maintenance because it may update workflow files." | ||||||||||||||||||||||||||
| echo "CLAUDE_PR_GITHUB_TOKEN or CLAUDE_PAT is required for scheduled maintenance because it may update workflow files." | ||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| fetch-depth: 1 | ||||||||||||||||||||||||||
| token: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN }} | ||||||||||||||||||||||||||
| token: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT }} | ||||||||||||||||||||||||||
|
Comment on lines
46
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
python - <<'PY'
from pathlib import Path
for path in [
Path("templates/workflows/scheduled-maintenance.yml"),
Path(".github/workflows/scheduled-maintenance.yml"),
]:
if not path.exists():
continue
text = path.read_text()
idx = text.find("uses: actions/checkout")
if idx == -1:
continue
next_step = text.find("\n - name:", idx + 1)
block = text[idx: next_step if next_step != -1 else len(text)]
if "secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT" in block and "persist-credentials: false" not in block:
print(f"{path}: checkout persists the fallback PAT credentials")
PY
rg -n -C3 '\bgit\s+(push|ls-remote)\b' --glob 'script/**' --glob '.github/workflows/**' --glob 'templates/workflows/**'Repository: keito4/config Length of output: 4147 Add
Proposed hardening - name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 1
+ persist-credentials: false
token: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Prepare maintenance branch | ||||||||||||||||||||||||||
| run: git checkout -b "$CLAUDE_BRANCH" | ||||||||||||||||||||||||||
|
|
@@ -62,7 +62,7 @@ jobs: | |||||||||||||||||||||||||
| CLAUDE_BRANCH: ${{ env.CLAUDE_BRANCH }} | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||||||||||||||||||||||||||
| github_token: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN }} | ||||||||||||||||||||||||||
| github_token: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT }} | ||||||||||||||||||||||||||
| prompt: | | ||||||||||||||||||||||||||
| Run `script/check-trivyignore-review.sh` first and include any due `.trivyignore` entries in the final summary. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
@@ -85,7 +85,7 @@ jobs: | |||||||||||||||||||||||||
| - name: Create maintenance pull request | ||||||||||||||||||||||||||
| if: env.CLAUDE_BRANCH != '' | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| GH_TOKEN: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN }} | ||||||||||||||||||||||||||
| GH_TOKEN: ${{ secrets.CLAUDE_PR_GITHUB_TOKEN || secrets.CLAUDE_PAT }} | ||||||||||||||||||||||||||
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | ||||||||||||||||||||||||||
| MODE: ${{ inputs.mode || 'full' }} | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
|
|
@@ -117,6 +117,7 @@ jobs: | |||||||||||||||||||||||||
| if: failure() | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| GH_TOKEN: ${{ github.token }} | ||||||||||||||||||||||||||
| GH_REPO: ${{ github.repository }} | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| EXISTING=$(gh issue list --label "maintenance" --state open --json number --jq 'length') | ||||||||||||||||||||||||||
| if [ "$EXISTING" -gt 0 ]; then | ||||||||||||||||||||||||||
|
|
@@ -135,6 +136,7 @@ jobs: | |||||||||||||||||||||||||
| **Mode:** ${{ inputs.mode || 'full' }} | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Please check the workflow logs and re-run manually if needed. | ||||||||||||||||||||||||||
| If this failed during token validation, configure \`CLAUDE_PR_GITHUB_TOKEN\` or \`CLAUDE_PAT\` in repository Actions secrets. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| *Auto-generated by [scheduled-maintenance.yml](.github/workflows/scheduled-maintenance.yml)*" | ||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include
--check-required-workflowsinargument-hint.The hint now lists new
--check-*flags but omits--check-required-workflows, which is still documented as required behavior (Line 41). Keeping the hint complete avoids inconsistent command guidance.🤖 Prompt for AI Agents