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

Proxy fixes #2490

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

Proxy fixes #2490

wants to merge 12 commits into from

Conversation

Antiksec
Copy link
Contributor

@Antiksec Antiksec commented Feb 6, 2025

Describe the Pull Request

I made some proxy fixes because of two bugs:
- When running docker-compose setup because of mapping clean volume to "mobsf_data/tools" Jadx included in docker image will be deleted. download_file func uses system proxy instead of upstream_proxy func which causes not downloading Jadx during startup
- app func from google_play_scrapper lib doesn't support proxy + because of big timeout here https://github.com/JoMingyu/google-play-scraper/blob/ce1df6d67e6d8c39826daac2f668808fc025f284/google_play_scraper/utils/request.py#L11
if you behind proxy causes 15 minutes delay which looks like mobsf stucking when "fetching google play details" (https://github.com/MobSF/Mobile-Security-Framework-MobSF/issues/1974)

To be able to import uppstream_proxy into tools_download.py I had to move uppstream_proxy and other proxy functions into proxy.py because of a bug in cyclic import and import of django models when it was in utils.py

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)

DESCRIBE HERE

if verify:
ssl_context = ssl.create_default_context()
else:
ssl_context = ssl._create_unverified_context()

Check failure

Code scanning / SonarCloud

Server hostnames should be verified during SSL/TLS connections High

Enable server hostname verification on this SSL/TLS connection. See more on SonarQube Cloud
if verify:
ssl_context = ssl.create_default_context()
else:
ssl_context = ssl._create_unverified_context()

Check failure

Code scanning / SonarCloud

Server certificates should be verified during SSL/TLS connections High

Enable server certificate validation on this SSL/TLS connection. See more on SonarQube Cloud
if verify:
ssl_context = ssl.create_default_context()
else:
ssl_context = ssl._create_unverified_context()

Check failure

Code scanning / SonarCloud

Server hostnames should be verified during SSL/TLS connections High

Enable server hostname verification on this SSL/TLS connection. See more on SonarQube Cloud
if verify:
ssl_context = ssl.create_default_context()
else:
ssl_context = ssl._create_unverified_context()

Check failure

Code scanning / SonarCloud

Server certificates should be verified during SSL/TLS connections High

Enable server certificate validation on this SSL/TLS connection. See more on SonarQube Cloud
Khabarov Konstantin Olegovich added 2 commits February 7, 2025 01:03
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