Repository navigation
ci(secu): stop gitleaks job failing on rate limits - #77
Merged
Merged
Conversation
Concurrent scans on the self-hosted runners share one egress, and codeload.github.com answers 429 when the runner downloads actions/checkout at "Set up job": the job fails before any step runs and raises a secret scan alert. The repository is now checked out with plain git, with the same clone as before (PR commits + 2 for pull requests, full history for workflow_dispatch), the same retries and no token persisted, so the job downloads no action at all. On the centreon-ubuntu-26.04-* runners (private and internal centreon repositories), use the gitleaks the image ships without checking its version: the runner image team owns it. The job still fails if the binary is missing. quanta-security does not ship gitleaks yet (MON-212266), so it keeps installing it like the public runners. Assisted-by: Claude Code (claude-opus-5-5)
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.
Description
What are your needs or what are you planning to do in this PR?
Two changes to
.github/workflows/gitleaks-analysis.yml.1. Check out with plain git: the job downloads no action
Concurrent scans on the self-hosted runners share one egress. When the runner downloads
actions/checkoutat "Set up job",codeload.github.comcan answer429 Too Many Requests: the job fails before any step runs and raises a secret scan alert(e.g. centreon-cloud-apps run 38580027651, attempt 1).
The
Checkout Repositorystep now runsgitdirectly, with the same clone as before:pull_requestfetch-depth= PR commits + 2 (PR commits, merge and base commits)workflow_dispatchcleanofactions/checkout.re-fetches. It is never written to
.git/configand is masked in the logs.Compute fetch depth, since the checkout computes the depth itself.2. Use the runner's gitleaks on the centreon self-hosted runners
centreon-ubuntu-26.04-*(private and internalcentreonrepositories)quanta-securityubuntu-26.04(public repositories)The runner criterion is the same as the
centreonbranch ofruns-on.Tests
Each step was run locally, extracted verbatim from the workflow:
centreon-cloud-apps#2760(private), runner shipping gitleaks.git/config, runner binary used, 4 commits scannedcentreon#12022(base 32 commits ahead)workflow_dispatchonsecurity-toolsmain::error::, exit 1quanta-securityrunnerNot yet run on a real runner: to validate on a private repository (self-hosted runner) and
on a public one (
ubuntu-26.04) before merging.Not in scope
dependency-analysis.ymlstill usesactions/checkouton the same runners, so it can hitthe same 429 at "Set up job".
🤖 Generated with Claude Code