Repository navigation
Conversation
Automated security fix generated by OrbisAI Security
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The batching still permits unbounded concurrent requests and does not reject oversized duplicate-heavy inputs.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds bibliography request limits intended to mitigate resource exhaustion.
Changes:
- Splits bibliography references into batches of 100.
- Merges batched responses and expiration metadata.
| File | Description |
|---|---|
src/core/biblio.js |
Adds batching for bibliography network requests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+96
to
+98
| const results = ( | ||
| await Promise.all(batches.map(batch => fetchBibrefs(batch.join(",")))) | ||
| ).filter(found => found); |
This branch has not been deployed
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.

The updateFromNetwork() function accepts an unbounded array of reference identifiers without size validation. While refs are batched into a single comma-separated query string (mitigating unbounded concurrent requests), an attacker providing a very large array (10,000+ refs) could construct an extremely long URL causing application slowdown and API quota depletion for bibliography services. The affected code is
src/core/biblio.js:68. This change is the fix I would apply.Reference: CWE-770
What changed
src/core/biblio.jsVerification
No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.
Regression test
The security boundary is maintained under adversarial input
Test
Automated security fix by OrbisAI Security