Skip to content

ci(sast): raise the Semgrep job cap to 30 minutes - #25554

Merged
iamwhatever merged 1 commit into
mainfrom
fix/sast-timeout-14818
Oct 29, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
fix/sast-timeout-14818

Conversation

@CrysisDeu

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: a large-diff PR's SAST (Semgrep) lane finishes with a verdict instead of being cancelled by its own time cap.

The sast job has timeout-minutes: 15. Its baseline scan re-runs the rules on the merge-base for every changed file, so it gets slower as the diff grows. On #13348 (ubuntu-latest) it took 9m10s, 9m54s, then was cancelled twice at 15m03s / 15m04s, then passed at 14m27s.

Why it matters

A cancelled lane publishes no verdict, so PR Readiness counts it as blocking and the author has to re-run it. It looks like a flake, but it is a cap the job nearly fills.

Not a goal

  • Sharding the scan, or changing rules, scope, the Semgrep pin or the runner choice.

Intended? / Repro

Intended? No. The cap is meant to stop a hung scan, not a normal large one.

Repro (current main):

What changed (motivation → approach → change)

Symptom: large-diff SAST runs cancelled at 15 min. Cause: the cap sits inside the job's normal range. Change: double the cap.

  • .github/workflows/code-review.yml: sast timeout-minutes: 15 → 30, with a comment giving the measured range and why it grows with the diff.

Security

CI config only. The scan's rules and scope are unchanged; a longer cap can only turn a missing verdict into a real one.

Backwards compatibility

Compatible. Removes nothing.

Tests

None: a workflow timeout value. The lane runs on this PR.

Proof: not provable -- other: timeout only matters on a large-diff run; this PR's own SAST run exercises the edited job

Manual verification

YAML parses (yaml.safe_load). The SAST lane runs on this PR.

Related Issues

Fixes #14818

Sibling sweep

Swept: git grep -n "timeout-minutes" -- .github/workflows/code-review.yml
Sibling: .github/workflows/code-review.yml sast -- changed here
Sibling: other Code Review jobs -- not affected (no measured overrun reported)

Pattern harvest

Not generalizable: one job's cap.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@CrysisDeu
CrysisDeu requested review from a team and KiroCrewCaptain as code owners October 29, 2026 02:22
@CrysisDeu
CrysisDeu requested a review from mbriones98 October 29, 2026 02:22
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 8692f72f83f8266d18273f98a940bf9fae9d8474 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 8692f72f83f8266d18273f98a940bf9fae9d8474 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

A one-value cap change that fixes a measured cancellation (#14818). It adds no new surface.

What this change ships

Inventory (1 items) — 1 justified

Intent: let a large-diff PR's SAST lane finish and publish a verdict instead of being cancelled by its own time cap. This is a FIX.

  1. The SAST (Semgrep) lane's time cap goes from 15 to 30 minutes, with a comment giving the measured range: justified

[FIRST-PRINCIPLES-REVIEWED] 8692f72

Description read

[DESCRIPTION-READ] 49ae163f2decb4f64f51a96c2efc99bc792ce9197997a9a6fec30c35022ea51f

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 8692f72f83f8266d18273f98a940bf9fae9d8474 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the cap sat inside the job's measured normal range, and doubling it is a one-line change that a revert undoes.

Notes

[DESIGN-REVIEWED] 8692f72

Description read

[DESCRIPTION-READ] 73b4db90f7e6a11314fa533f8b749deb70e5782fba6497d9284561749ea5a923

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 8692f72f83f8266d18273f98a940bf9fae9d8474 — this comment is updated in place on each push.

Review details

Candidate 1 is a style/comment-convention matter, which the pipeline's deterministic check owns; no observable wrong outcome. Dropped.

No findings.

[OPUS-REVIEWED] 8692f72

Verdict parsed from the review's SHA-scoped output markers for commit 8692f72f83f8266d18273f98a940bf9fae9d8474.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 8692f72f83f8266d18273f98a940bf9fae9d8474 false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 8692f72f83f8266d18273f98a940bf9fae9d8474 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 8692f72

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 8692f72f83f8266d18273f98a940bf9fae9d8474 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 29, 2026

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE at 8692f72.

The only change raises the sast job's timeout-minutes from 15 to 30 with a comment explaining why (code-review.yml#L318-L323). No permissions, secrets, triggers, runner selection or steps change, so the scan's scope and trust boundary are untouched. All checks on this head are green or skipped, including SAST itself, and every AI lane passed with no findings.

AI findings judged non-blocking

  • Design Review: the comment cites #14818 while the description says the timings came from #13348. This is comment wording only; #14818 is the issue this PR fixes, so the pointer still leads to the history, and the cap value is unaffected. code-review.yml#L318-L322

— crew-pr-reviewer (r134)

@iamwhatever
iamwhatever merged commit 95dc8c2 into main Oct 29, 2026
105 checks passed
@iamwhatever
iamwhatever deleted the fix/sast-timeout-14818 branch October 29, 2026 06:27
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 29, 2026
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.

ci: SAST (Semgrep) runs at 9-14 min against a 15-minute cap, so a large-diff PR cancels unmeasured

2 participants