ci(sec-scorecard): add 20m timeout and disable unconfigured repo_token#6469
Open
Ian-wang-liyang wants to merge 1 commit into
Open
ci(sec-scorecard): add 20m timeout and disable unconfigured repo_token#6469Ian-wang-liyang wants to merge 1 commit into
Ian-wang-liyang wants to merge 1 commit into
Conversation
The Scorecard analysis job had no timeout-minutes, so a transient GitHub GraphQL 503 mid-analysis made the action retry against the degraded endpoint for 1h5m before failing (run 26908556266). Add timeout-minutes: 20 to fail fast on upstream outages. The repo_token line referenced secrets.SCORECARD_TOKEN, which is not configured anywhere in the repo or org. Every run logged an auth notice and fell back to GITHUB_TOKEN. Comment the line out to restore the upstream scorecard-action starter default, silencing the log noise and the IDE context-access diagnostic. Reversible by an admin who later adds the PAT. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens the non-blocking Security - Scorecard GitHub Actions workflow by preventing long-running hangs during upstream GitHub API degradation and by removing an ineffective, unconfigured token input.
Changes:
- Add a
timeout-minutes: 20limit to theanalysisjob to fail fast instead of consuming excessive runner time during transient outages. - Comment out
repo_token: ${{ secrets.SCORECARD_TOKEN }}so the workflow uses the action’s default token behavior without emitting “repo_token is empty” notices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which problem does the PR fix?
Closes #6323.
What's in this PR?
Hardens the non-blocking
Security - Scorecardworkflow (.github/workflows/sec-scorecard.yaml).timeout-minutes: 20on theanalysisjob. The job had no timeout, so a transient GitHub GraphQL503mid-analysis (run 26908556266) made the action retry against the degraded endpoint for 1h5m before failing. The timeout now fails fast on upstream outages.Commented out the
repo_tokenline. It referencedsecrets.SCORECARD_TOKEN, which is not configured anywhere in the repo or org (single reference, no README badge, no docs). Every run loggedThe 'repo_token' variable is empty. Using the 'INPUT_INTERNAL_DEFAULT_TOKEN' variable instead.and fell back toGITHUB_TOKEN. Commenting it out restores the upstream scorecard-action starter default, silences the per-run auth notice and the IDEContext access might be invalid: SCORECARD_TOKENdiagnostic, and keeps the adjacent "Uncomment the line below…" comment accurate. Reversible by one uncomment if an admin later adds the PAT to enable full Branch-Protection scoring.Deliberately not done (out of scope for #6323):
uses:step would require a third-party retry action (Wandalen/wretry); this repo uses zero third-party retry deps (only bash loops /curl --retry/scripts/harbor-retry.sh). The 20m timeout already removes the 1h hang.Follow-ups (separate issues/PRs):
SCORECARD_TOKENPAT and uncomment the line to enable the OSSF Branch-Protection check.timeout-minutes. Worth a separate hardening pass; highest-risk (Harbor + GitHub API callers):chart-release-public.yaml(release/post-release),chart-build-dev.yaml(build),chart-release-artifact-verify.yaml(verify),chart-promote-rc.yaml(promote-rc).Checklist
Please make sure to follow our Contributing Guide.
Before opening the PR:
make go.update-golden-only.After opening the PR: