Repository navigation
fix(ci): skip duplicate gosec pre-commit hook that OOMs the runner (Security Scanning job covers it) - #1439
Conversation
…r in CI The gosec pre-commit hook (scripts/gosec-hook.sh) is designed to scan only a local commit's changed packages, but 'pre-commit run --all-files' (the CI job) feeds it every .go file across all six modules at once. gosec's whole-repo analysis exhausts the runner memory and the pre-commit job dies with 'The runner has received a shutdown signal' at that exact step on every run (verified on multiple main runs after the tflint fix landed - tflint itself now passes). gosec is NOT dropped from CI: the dedicated 'Security Scanning' job in ci.yml runs gosec v2.28.0 per-module (SARIF) as the authoritative gate. This only removes the CI duplicate that OOMs the runner - the same dedup rationale as the already-skipped terraform_validate (covered by the Validate Terraform job). Local devs keep the fast per-changed-package gosec hook.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…r in CI (#1439) The gosec pre-commit hook (scripts/gosec-hook.sh) is designed to scan only a local commit's changed packages, but 'pre-commit run --all-files' (the CI job) feeds it every .go file across all six modules at once. gosec's whole-repo analysis exhausts the runner memory and the pre-commit job dies with 'The runner has received a shutdown signal' at that exact step on every run (verified on multiple main runs after the tflint fix landed - tflint itself now passes). gosec is NOT dropped from CI: the dedicated 'Security Scanning' job in ci.yml runs gosec v2.28.0 per-module (SARIF) as the authoritative gate. This only removes the CI duplicate that OOMs the runner - the same dedup rationale as the already-skipped terraform_validate (covered by the Validate Terraform job). Local devs keep the fast per-changed-package gosec hook.
Problem
The pre-commit CI job has been dying with
The runner has received a shutdown signalat theGo security scannerstep on EVERY run (verified on multiple main-branch runs after the tflint fix #1437 landed). Root cause: thegosecpre-commit hook scans only changed packages for a local commit, butpre-commit run --all-files(this CI job) feeds it every.gofile across all six modules simultaneously, and gosec's whole-repo analysis OOMs the runner.Fix
Add
gosecto the pre-commit CISKIPlist (alongside the already-skippedterraform_validate). gosec is not dropped as a gate: the dedicatedSecurity Scanningjob inci.ymlruns gosec v2.28.0 per-module (SARIF) as the authoritative scanner. This removes only the CI duplicate that crashes the runner — same dedup rationale asterraform_validate(covered by the Validate Terraform job). Local devs still get the fast per-changed-package gosec hook on commit.Self-validating: this PR's own pre-commit run skips gosec and should go green, proving the fix.