Skip to content

fix(audit-action): retry, chunk and bound npm advisory requests - #17

Merged
cherviakovtaskworld merged 1 commit into
mainfrom
cherviakovtaskworld/audit-registry-retries
Sep 9, 2026
Merged

cherviakovtaskworld merged 1 commit into
mainfrom
cherviakovtaskworld/audit-registry-retries

Conversation

@cherviakovtaskworld

Copy link
Copy Markdown
Contributor

The bulk advisory client made a single attempt with a 10s budget for the whole
prod closure in one body, so a transient registry 503 or a slow upload on a
loaded runner turned into a red CI check.

Extract the transport into registryClient.ts: retry 429/5xx/timeouts up to 4
times with exponential backoff (honouring Retry-After), split the payload into
chunks of 400 packages sent with a concurrency of 3, and bound the whole run by
a shared 120s deadline so a degraded registry cannot stall the CI step. Registry
unavailability now surfaces as RegistryUnavailableError and as a new
registry-unavailable output, so an infrastructure failure is distinguishable
from an audit failure.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

The bulk advisory client made a single attempt with a 10s budget for the whole
prod closure in one body, so a transient registry 503 or a slow upload on a
loaded runner turned into a red CI check.

Extract the transport into registryClient.ts: retry 429/5xx/timeouts up to 4
times with exponential backoff (honouring Retry-After), split the payload into
chunks of 400 packages sent with a concurrency of 3, and bound the whole run by
a shared 120s deadline so a degraded registry cannot stall the CI step. Registry
unavailability now surfaces as RegistryUnavailableError and as a new
registry-unavailable output, so an infrastructure failure is distinguishable
from an audit failure.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Vulnerabilities

Vulnerabilities were found in audit-action.

⚪ Info 0
🔵 Low 2 `>undici@6.25.0`
🟡 Moderate 4 `>undici@6.25.0`
🟠 High 4 `>brace-expansion@1.1.14`, `>undici@6.25.0`
🔴 Critical 0

@cherviakovtaskworld
cherviakovtaskworld merged commit 78276ee into main Sep 9, 2026
1 of 2 checks passed
@cherviakovtaskworld
cherviakovtaskworld deleted the cherviakovtaskworld/audit-registry-retries branch September 9, 2026 04:24
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.

2 participants