-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Refactor mobsf parser for v4 reports #11056
Conversation
DryRun Security SummaryThe provided code changes enhance the DefectDojo application's integration and parsing of the MobSF (Mobile Security Framework) Scorecard tool, including the addition of a new parser, configuration updates, documentation, and unit tests to ensure accurate representation and prioritization of security issues in mobile applications. Expand for full summarySummary: The provided code changes introduce several improvements and additions to the DefectDojo application, primarily focused on enhancing the integration and parsing of the MobSF (Mobile Security Framework) Scorecard tool. These changes include:
Overall, these changes enhance the DefectDojo application's capabilities in managing and tracking security vulnerabilities in mobile applications by integrating the MobSF Scorecard tool. The code changes appear to be well-designed and secure, with a focus on accurate parsing, severity mapping, and deduplication of security findings. Files Changed:
Code AnalysisWe ran Riskiness🟢 Risk threshold not exceeded. |
Does this PR maintain backward compatibility with older versions of the tool? |
Sorry, I should have been more specific. Is the MobSF parser compatible with older versions of the tool after the changes in this PR? It looks like all of the unit tests and sample scans are removed/rewritten in this PR. If this change to support version 4.x of MobSF cannot support older formats of MobSF, then the PR cannot be accepted |
@Maffooch Yes, reports from tool with version older then 3.5 will not be loaded in new parser at all, reports with version from 3.5+ will be loaded with different results from new parser and old one, cause new parser use agregated results from maintainers of mobsf, old one parses raw data from report sections (and has bugs with that). I can add switch, if version of report > 4 use new logic, else use old one. As alternative I can leave current parser as is and add new one with name Mobsf Scorecard, so change will not break logic for exist users and add alternative for new setups. |
If the results are significantly different than the older format, then a new parser might be best. I'll leave that up to you to decide 😄 The main point is that we can maintain to the old and the new formats at once |
@Maffooch Hi Cody! Sorry for long delay... I've separate all new logic into parser MobSF Scorecard Scan and restore old parser files as is. Hope this fits ) |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
@mtesauro Yeh, now messed up with paths to sample reports and lost test for old parser... |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
@dmarushkin Yikes. Looks like that hash has changed - I went ahead and kicked off the tests again. Wait till they finish to fix the sha256sum and we should be good to start the reviews & approvals. Thanks for your patience on this one 👍 |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
@mtesauro Fixed hash, double-checked that new one will actual for new dev settings with applied change. |
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.
Approved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
@dmarushkin Sorry, one more fix of the sha256sum and I'll quickly merge this before it happens again. BTW, we're looking at different methods for what that sum does so this doesn't impact contributors so sorry you've had to deal with it so much in the PR. Hopefully, for your next contribution, it will be gone. 🤞 |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
@mtesauro Not a problem, then God was giving others brain, I was in queue for patience ) |
Hi guys!
Looks like in 4th version of Mobsf json reports parser failed again for android and ios, it loose some vulns after loading and has html tags in vuln titles and descriptions.
I've drilled down into current reports structure and parser logic and found that new reports in Mobsf have
appsec
section with same structure for ios and android reports and well rendered by maintainers vuln titles and descriptions, in mobsf UI it used in Scoreboad:So I deside to refactor current parser to get dd findings and test description from this
appsec
items.Results look like: