From 7a8a07d2dbc9a98ad8fb6aa44a3123711542b2c8 Mon Sep 17 00:00:00 2001 From: tduhamel42 Date: Fri, 24 Oct 2025 17:05:04 +0200 Subject: [PATCH] fix: resolve linter errors in Android modules - Remove unused imports from mobsf_scanner.py (asyncio, hashlib, json, Optional) - Remove unused variables from opengrep_android.py (start_col, end_col) - Remove duplicate Path import from workflow.py --- backend/toolbox/modules/android/mobsf_scanner.py | 5 +---- backend/toolbox/modules/android/opengrep_android.py | 2 -- .../toolbox/workflows/android_static_analysis/workflow.py | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/backend/toolbox/modules/android/mobsf_scanner.py b/backend/toolbox/modules/android/mobsf_scanner.py index 5e2c217..5586ca3 100644 --- a/backend/toolbox/modules/android/mobsf_scanner.py +++ b/backend/toolbox/modules/android/mobsf_scanner.py @@ -16,14 +16,11 @@ Performs static analysis on APK files including permissions, manifest analysis, # # Additional attribution and requirements are provided in the NOTICE file. -import asyncio -import hashlib -import json import logging import os from collections import Counter from pathlib import Path -from typing import Dict, Any, List, Optional +from typing import Dict, Any, List import aiohttp try: diff --git a/backend/toolbox/modules/android/opengrep_android.py b/backend/toolbox/modules/android/opengrep_android.py index 89c6fcf..01e32c4 100644 --- a/backend/toolbox/modules/android/opengrep_android.py +++ b/backend/toolbox/modules/android/opengrep_android.py @@ -273,8 +273,6 @@ class OpenGrepAndroid(BaseModule): path_info = result.get("path", "") start_line = result.get("start", {}).get("line", 0) end_line = result.get("end", {}).get("line", 0) - start_col = result.get("start", {}).get("col", 0) - end_col = result.get("end", {}).get("col", 0) # Code snippet lines = extra.get("lines", "") diff --git a/backend/toolbox/workflows/android_static_analysis/workflow.py b/backend/toolbox/workflows/android_static_analysis/workflow.py index 683f574..8376cd2 100644 --- a/backend/toolbox/workflows/android_static_analysis/workflow.py +++ b/backend/toolbox/workflows/android_static_analysis/workflow.py @@ -129,7 +129,6 @@ class AndroidStaticAnalysisWorkflow: # Handle case where workspace_path is a file (single APK upload) # vs. a directory containing files - from pathlib import Path workspace_path_obj = Path(workspace_path) # Determine actual workspace directory and APK path