Rate limit the SBOM scan reuse endpoint

What does this MR do?

The SBOM scan reuse endpoint does not have a rate limit. This MR limits it to 12,000 calls per project per hour (returning a 429), behind the sbom_scan_reuse_limits ops flag.

The analyzer change that uploads the SBOM for a full scan instead of failing on a 429 is gitlab-org/security-products/analyzers/dependency-scanning!656 (merged).

Returning a job's existing scan instead of inserting a new row on every call is split out to !267293 (merged).

Runbook

sbom_scan_reuse_limits is on by default. Turn it off if dependency scanning jobs start failing on the reuse call, most likely analyzers without gitlab-org/security-products/analyzers/dependency-scanning!656 (merged) failing on the 429:

/chatops gitlab run feature set sbom_scan_reuse_limits false

This turns it off for the whole instance. The endpoint goes back to no rate limit.

Throttled requests are logged to auth.log as Application_Rate_Limiter_Request with env: dependency_scanning_sbom_scan_api_reuse_request_limit, and 429 responses carry RateLimit-Name: dependency_scanning_sbom_scan_api_reuse.

The limit is 12,000 per project per hour: twice the highest observed per-project peak (gitlab-org/gitlab, just under 10,000 on a 2026-11-03 postgres.ai clone of sec; no other project exceeded 6,000). Discussion in this comment.

Relates to

gitlab-org/gitlab#636067

Edited by Ahmad Zaydan

Merge request reports

Loading
Loading