Repository navigation
fix: resolve valid audit findings from PRs #200-#203 - #223
Conversation
There was a problem hiding this comment.
Codra Review
Here are some automated review suggestions for this pull request.
Note
1 file could not be reviewed, so this pass is incomplete.
Reviewed commit: db568e55cc
ℹ️ About Codra in GitHub
Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:
- Open a pull request for review
- Mark a draft as ready
If Codra has suggestions, it will comment; otherwise it will react with 👍.
| if (key.toLowerCase() === lower && typeof value === "string") { | ||
| return value; | ||
| } | ||
| const timestamp = Date.parse(trimmed); |
There was a problem hiding this comment.
Use of unreliable Date.parse for HTTP header parsing
The parseRetryAfterMs function uses Date.parse() to handle the Retry-After header when it is not a decimal number. The Retry-After header, according to RFC 7231, can be an HTTP-date (e.g., 'Wed, 21 Oct 2015 07:28:00 GMT') or a delay-seconds integer. Date.parse() is implementation-dependent and often fails to parse standard HTTP-date formats in non-browser environments or specific locale settings, potentially leading to incorrect delay calculations or failures to delay when required by the API, which could cause increased rate-limiting.
Description
Follow-up fixes for valid findings from the reviews of PRs #200, #201, #202, and #203 (excluding items already resolved in #219).
public/diff-preview.html, moved thefile-diff.cssimport to the top oftokens.cssand exported it, fixed unified diff parsing for indented lines, CRLF, extended git headers, and file paths with spaces, removed demo fallbacks, improved dark-mode specificity, gutter sizing, WCAG AA contrast, and<pre>unwrapping in comment cards.WebhookRuntimeboundaries, skipped dead queue jobs for ignored PR events, and guarded KV reads and SHA inputs in the diff cache.retry-afteroverx-ratelimit-reset, capped retry delays at 60s, added jitter andAbortSignalsupport, restrictedGitHubError.headersto allowlisted keys, and disabled 5xx/timeout retries on mutating review and check-run POST requests.isOpenAIReasoningModelforgpt-5*, gateway prefixes, andft:IDs, fixed legacyo1-mini/o1-previewpayloads, removed thereasoning_contentfallback, and alignedapps/node/DockerfileHEALTHCHECKwith/health/ready.vitest.config.tsand split static checks fromVerify Stabilityin.github/workflows/ci.ymlwith job timeouts, Playwright caching, and single-pass builds.Type of change
How Has This Been Tested?
npm run test:unitandnpm run test:all)npm testagainst PostgreSQL: 75 files, 554 tests passed)Also ran
check:builds,build:packages,check:exports,publint,typecheck,typecheck:all,lint,vite build,wrangler deploy --dry-run, andbuild:node. Playwright E2E (npm run test:e2e) was not run locally because local Postgres, Redis, and Docker are not running on this host.Checklist: