-
Notifications
You must be signed in to change notification settings - Fork 306
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
Fix mongoose IAST exec with callback #4045
Conversation
Overall package sizeSelf size: 6.03 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4045 +/- ##
=======================================
Coverage 85.29% 85.29%
=======================================
Files 243 243
Lines 10558 10558
Branches 33 33
=======================================
Hits 9005 9005
Misses 1553 1553 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-02-12 13:31:18 Comparing candidate commit 3be8ee6 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 258 metrics, 7 unstable metrics. scenario:plugin-graphql-with-depth-off-18
|
...dd-trace/test/appsec/iast/analyzers/nosql-injection-mongodb-analyzer.mongoose.plugin.spec.js
Outdated
Show resolved
Hide resolved
* Add test for fix * Another test, expecting to detect the vuln * fix mongoose instru not supporting deferred callback * add more tests * make sure callback is not wrapped twice --------- Co-authored-by: simon-id <simon.id@datadoghq.com>
* Add test for fix * Another test, expecting to detect the vuln * fix mongoose instru not supporting deferred callback * add more tests * make sure callback is not wrapped twice --------- Co-authored-by: simon-id <simon.id@datadoghq.com>
* Add test for fix * Another test, expecting to detect the vuln * fix mongoose instru not supporting deferred callback * add more tests * make sure callback is not wrapped twice --------- Co-authored-by: simon-id <simon.id@datadoghq.com>
* Add test for fix * Another test, expecting to detect the vuln * fix mongoose instru not supporting deferred callback * add more tests * make sure callback is not wrapped twice --------- Co-authored-by: simon-id <simon.id@datadoghq.com>
* Add test for fix * Another test, expecting to detect the vuln * fix mongoose instru not supporting deferred callback * add more tests * make sure callback is not wrapped twice --------- Co-authored-by: simon-id <simon.id@datadoghq.com>
* Add test for fix * Another test, expecting to detect the vuln * fix mongoose instru not supporting deferred callback * add more tests * make sure callback is not wrapped twice --------- Co-authored-by: simon-id <simon.id@datadoghq.com>
What does this PR do?
Fix mongoose instrumentation when it is used with
.exec(callback)
function, likeModel.find(query).exec(cb)
instead ofModel.find(query).then(cb)
orModel.find(query, cb)
.Motivation
Fix bug
Checklist
Additional Notes
Security
Datadog employees:
@DataDog/security-design-and-guidance
.Unsure? Have a question? Request a review!