Skip to content

fix(ci): skip duplicate gosec pre-commit hook that OOMs the runner (Security Scanning job covers it) - #1439

Merged
cristim merged 1 commit into
mainfrom
fix/ci-skip-gosec-precommit-dup
Jul 17, 2026
Merged

cristim merged 1 commit into
mainfrom
fix/ci-skip-gosec-precommit-dup

Conversation

@cristim

@cristim cristim commented Jul 17, 2026

Copy link
Copy Markdown
Member

Problem

The pre-commit CI job has been dying with The runner has received a shutdown signal at the Go security scanner step on EVERY run (verified on multiple main-branch runs after the tflint fix #1437 landed). Root cause: the gosec pre-commit hook scans only changed packages for a local commit, but pre-commit run --all-files (this CI job) feeds it every .go file across all six modules simultaneously, and gosec's whole-repo analysis OOMs the runner.

Fix

Add gosec to the pre-commit CI SKIP list (alongside the already-skipped terraform_validate). gosec is not dropped as a gate: the dedicated Security Scanning job in ci.yml runs gosec v2.28.0 per-module (SARIF) as the authoritative scanner. This removes only the CI duplicate that crashes the runner — same dedup rationale as terraform_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.

…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.
@cristim cristim added triaged Item has been triaged priority/p2 Backlog-worthy severity/medium Moderate harm type/chore Maintenance / non-user-visible labels Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b7b96eb1-4f91-4dd6-9dda-ffed2d2f51f8

📥 Commits

Reviewing files that changed from the base of the PR and between 89658a3 and bf755ed.

📒 Files selected for processing (1)
  • .github/workflows/pre-commit.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-skip-gosec-precommit-dup

Comment @coderabbitai help to get the list of available commands.

@cristim
cristim merged commit f692085 into main Jul 17, 2026
19 checks passed
@cristim
cristim deleted the fix/ci-skip-gosec-precommit-dup branch July 27, 2026 11:10
cristim added a commit that referenced this pull request Sep 27, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p2 Backlog-worthy severity/medium Moderate harm triaged Item has been triaged type/chore Maintenance / non-user-visible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant