-
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 location in mysql vulnerability #4006
Conversation
Overall package sizeSelf size: 5.9 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 #4006 +/- ##
==========================================
- Coverage 84.92% 84.91% -0.02%
==========================================
Files 239 239
Lines 10257 10260 +3
Branches 33 33
==========================================
+ Hits 8711 8712 +1
- Misses 1546 1548 +2 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-01-29 11:25:25 Comparing candidate commit 5c849d1 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 262 metrics, 3 unstable metrics. scenario:plugin-graphql-with-depth-off-18
|
@@ -78,12 +77,7 @@ class SqlInjectionAnalyzer extends InjectionAnalyzer { | |||
|
|||
_report (value, context, dialect) { |
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.
sql-injection-analyzer
is overriding analyze
, _reportIfVulnerable
, _report
, etc methods in order to pass the dialect.
I've checked that no other analyzer overrides them but could we add pass a metadata
o extra
argument to these methods in vulnerability-analyzer
to share the 'extra' info to avoid overriding?
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.
I made more changes to overwrite less methods as you suggested
* Fix location in mysql vulnerability * export logic to report evidence to reuse instead of copying * Fix lint * Improve refactor
* Fix location in mysql vulnerability * export logic to report evidence to reuse instead of copying * Fix lint * Improve refactor
* Fix location in mysql vulnerability * export logic to report evidence to reuse instead of copying * Fix lint * Improve refactor
* Fix location in mysql vulnerability * export logic to report evidence to reuse instead of copying * Fix lint * Improve refactor
* Fix location in mysql vulnerability * export logic to report evidence to reuse instead of copying * Fix lint * Improve refactor
* Fix location in mysql vulnerability * export logic to report evidence to reuse instead of copying * Fix lint * Improve refactor
What does this PR do?
Fix SQL injection vulnerability location when it needs to read the sourcemaps of the file
Motivation
We are not reporting the original source code file and line reporting SQLi vulnerabilities.
Plugin Checklist
Additional Notes
system-tests PR: DataDog/system-tests#2062
Security
Datadog employees:
@DataDog/security-design-and-guidance
.Unsure? Have a question? Request a review!