fix(enrichment): bound EOL runtime lookups#1546
Open
JSONbored wants to merge 1 commit into
Open
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This was referenced Jun 27, 2026
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge
Nits — 2 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
This was referenced Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
endoflife.datefetch per distinct product:version, which allowed request amplification against the third‑party calendar API and risked degrading enrichment availability.Description
MAX_EOL_FILES,MAX_EOL_PATCH_LINES, andMAX_EOL_PINSand enforce them inextractVersionPinsto bound files scanned, patch lines scanned, and pins returned in a single request (review-enrichment/src/analyzers/eol-check.ts).cyclesByProductcache insidescanEolsofetchCycles(product)is invoked at most once per product per request and repeated version lookups reuse the cached calendar.review-enrichment/test/enrichment.test.tsthat assert extraction is capped and thatscanEolissues only one fetch per product (tests:extractVersionPins: caps attacker-controlled EOL scan inputandscanEol: caches endoflife.date cycles per product).Testing
cd review-enrichment && npm test, and the review-enrichment test suite passed (all tests in that package succeeded).npm run test:cilocally, but the run could not be completed in this environment due to unrelated tooling/coverage failures (TypeError: jsTokens is not a functionin the coverage tooling), so the full CI gate was not verified here.npm audit --audit-level=moderate, but the npm audit endpoint returned403 Forbiddenand the audit check could not be completed in this environment.Codex Task