Skip to content
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 false positives caused in Android manifest analysis #2481

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nick-lupien
Copy link

@nick-lupien nick-lupien commented Jan 7, 2025

Describe the Pull Request

Problem:

  • Recurring false positives coming from the Android manifest analysis module.
  • FPs occur when well-known URLs like assetlinks.json redirect from http->https. In these instances, high-severity findings would appear in the Manifest Analysis section suggesting that the URLs were configured incorrectly, when in fact the 301 redirect is a valid configuration.
  • Ordinarily this would be resolved by setting allow_redirects to True in the requests.get, but this was removed in (f22c584) specifically to mitigate GHSA-m435-9v6r-v5f6.
  • This PR aims to reduce a specific, common false positive while maintaining protections against SSRF.

Solution:

  • Check redirects to see if they're simple TLS upgrades; if so, perform a manual redirect to the TLS version.

Checklist for PR

  • Run MobSF unit tests and lint tox -e lint,test
  • Tested Working on Linux, Mac, Windows, and Docker
  • Add unit test for any new Web API (Refer: StaticAnalyzer/tests.py)
  • Make sure tests are passing on your PR MobSF tests

Additional Comments (if any)

@nick-lupien nick-lupien marked this pull request as ready for review January 8, 2025 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant