-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JS: new Quality
query - Unhandled errors in .pipe()
chain
#19544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
c27157f
Add `UnhandledStreamPipee` Quality query and tests to detect missing …
Napalys f39bf62
test: Add edge cases for stream pipe error handling
Napalys ef1bde5
Fixed issue where streams would not be tracked via chainable methods
Napalys 30f2815
Fixed issue where a custom `pipe` method which returns non stream wou…
Napalys 03d1f9a
Restrict pipe detection to calls with 1-2 arguments
Napalys 5710f0c
Add test cases for non-stream field accesses and methods before and a…
Napalys 4332de4
Eliminate false positives by detecting non-stream objects returned fr…
Napalys d7f86db
Enhance PipeCall to exclude non-function and non-object arguments in …
Napalys 09220fc
Fixed issue where `pipe` calls from `rxjs` package would been identif…
Napalys b104871
Added `UnhandledStreamPipe` to `javascript-security-and-quality.qls` …
Napalys 5b1af0c
Added detection of custom `gulp-plumber` sanitizer, thus one would no…
Napalys ac24fdd
Add predicate to detect non-stream-like usage in sources of pipe calls
Napalys e6ae8bb
Added test cases where second parameter passed to `pipe` is a functio…
Napalys b10a948
Fixed false positives from `strapi` and `rxjs/testing` as well as whe…
Napalys 15ff7cb
Added more test cases which common `js` libraries uses `.pipe()`
Napalys c6db32e
Add exceptions for `arktype`, `execa`, and `highland` to prevent them…
Napalys 248f83c
Added `qhelp` for `UnhandledStreamPipe` query
Napalys 000e69f
Replaced fuzzy `NonNodeStream` MaD to a ql predicate to deal easier w…
Napalys e964b17
Added `maintainability` and `error-handling` tags
Napalys 5214cc0
Excluded `ngrx`, `datorama`, `angular`, `react` and `langchain` from …
Napalys 5bb29b6
Now flags only `.pipe` calls which have an error somewhere down the s…
Napalys f8f5d8f
Exclude `.pipe` detection which are in a test file.
Napalys 2e2b9a9
Make predicates private and clarify stream reference naming.
Napalys d3b2a57
Fixed ql warning `Expression can be replaced with a cast`
Napalys f843cc0
Fix false positives in stream pipe analysis by improving error handle…
Napalys 298ef9a
Now able to track error handler registration via instance properties
Napalys 3cbc414
Update javascript/ql/src/Quality/UnhandledStreamPipe.ql
Napalys 64f00fd
Update javascript/ql/src/Quality/UnhandledStreamPipe.ql
Napalys abd446a
Update javascript/ql/src/Quality/UnhandledStreamPipe.ql
Napalys 7198372
Update javascript/ql/src/Quality/UnhandledStreamPipe.qhelp
Napalys d43695c
Update javascript/ql/src/Quality/UnhandledStreamPipe.qhelp
Napalys ae74edb
Update javascript/ql/src/Quality/UnhandledStreamPipe.ql
Napalys bf2f19d
Update UnhandledStreamPipe.ql
Napalys 7993f7d
Update `qhelp` example to more accurately demonstrate flagged cases
Napalys 8ba1f3f
Update javascript/ql/src/Quality/UnhandledStreamPipe.qhelp
Napalys f6e7059
Merge branch 'main' into js/quality/stream_pipe
Napalys d186994
Renamed `UnhandledStreamPipe.ql` to a better fitting name and ID
Napalys 8521c53
Renamed test directory to match the query name
Napalys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...ipt/ql/src/Quality/UnhandledStreamPipe.ql → ...Quality/UnhandledErrorInStreamPipeline.ql
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
2 changes: 1 addition & 1 deletion
2
javascript/ql/test/query-tests/Quality/UnhandledStreamPipe/test.qlref
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
query: Quality/UnhandledStreamPipe.ql | ||
query: Quality/UnhandledErrorInStreamPipeline.ql | ||
postprocess: utils/test/InlineExpectationsTestQuery.ql |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also rename the test folder.
And rename the
.qlref
file toUnhandledErrorInStreamPipeline.qlref
as per convention.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed here 8521c53