Skip to content

Authenticate Gitleaks commit lookup with GH_TOKEN - #1

Merged
ericmj merged 1 commit into
mainfrom
refresh-github-token
Nov 16, 2026
Merged

ericmj merged 1 commit into
mainfrom
refresh-github-token

Conversation

@ericmj

@ericmj ericmj commented Nov 16, 2026

Copy link
Copy Markdown
Member

The scheduled Gitleaks rules job failed in https://github.com/hexpm/secret_scan/actions/runs/43824964804/job/133156499947 because mix secret_scan.refresh calls the GitHub commits API anonymously. Anonymous requests are limited to 60 per hour per IP, and the shared runner IP had already used them.

The workflow already sets GH_TOKEN: ${{ github.token }} on that step for gh, so the task now sends it as a bearer token when it is set. Without it the request stays anonymous, so local runs behave as before.

The scheduled Gitleaks rules job calls the GitHub commits API
anonymously, which is limited to 60 requests per hour per IP and is
shared with other jobs on the runner's address. Send the workflow's
GH_TOKEN as a bearer token when it is set.
@ericmj
ericmj marked this pull request as ready for review November 16, 2026 14:26
@ericmj
ericmj merged commit be6b3cb into main Nov 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant