Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The extensive call-graph and synthesized-node modeling warrants final human validation for precision and performance.
0 open findings
What changed in this PR
Improves JavaScript data-flow modeling for Node.js stream pipelines and their callbacks.
Changes:
- Models chunks from
Readable.fromthroughpipe,write,_write, and_transform. - Preserves piped file-stream data as filesystem-read sources.
- Adds extensive stream-flow tests and query join-order hints.
| File | Description |
|---|---|
javascript/ql/lib/semmle/javascript/frameworks/NodeJSLib.qll |
Adds stream pipeline and callback modeling. |
javascript/ql/lib/semmle/javascript/security/dataflow/ReflectedXssCustomizations.qll |
Adds optimizer binding hints. |
javascript/ql/lib/semmle/javascript/security/dataflow/UnsafeJQueryPluginCustomizations.qll |
Adds optimizer binding hints. |
javascript/ql/lib/change-notes/2026-10-12-nodejs-stream-pipe.md |
Documents improved stream modeling. |
javascript/ql/test/library-tests/frameworks/NodeJSLib/StreamPipeDataFlow.ql |
Defines stream flow assertions. |
javascript/ql/test/library-tests/frameworks/NodeJSLib/StreamPipeDataFlow.expected |
Provides generated test expectations. |
javascript/ql/test/library-tests/frameworks/NodeJSLib/stream-pipe.js |
Exercises stream and transform scenarios. |
javascript/ql/test/library-tests/frameworks/Concepts/file-access.js |
Tests piped filesystem reads. |
javascript/ql/test/library-tests/frameworks/Concepts/tests.expected |
Updates generated concept expectations. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
Gee, thanks a lot for this in-depth review, Copilot. |
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 gist of these changes is to add modeling for:
This is done in f083ced. However, Copilot kept informing me of other, related, APIs that should also have modeling. And thus comes the flurry of subsequent commits that add more modeling 😰
I've done my best to babysit Copilot so that the code looks reasonable, and the commits are somewhat reviewable.
DCA looks uneventful (after some join order fixes in a couple of queries)