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
This commit is contained in:
tduhamel42 committed 2025-10-24 17:05:04 +02:00
1 parent 73dc26493d
commit 1fd525f904
3 files changed
+1 -7

No files matched your search

@@ -16,14 +16,11 @@ Performs static analysis on APK files including permissions, manifest analysis,
# #
# Additional attribution and requirements are provided in the NOTICE file. # Additional attribution and requirements are provided in the NOTICE file.
import asyncio
import hashlib
import json
import logging import logging
import os import os
from collections import Counter from collections import Counter
from pathlib import Path from pathlib import Path
from typing import Dict, Any, List, Optional from typing import Dict, Any, List
import aiohttp import aiohttp
try: try:
@@ -273,8 +273,6 @@ class OpenGrepAndroid(BaseModule):
path_info = result.get("path", "") path_info = result.get("path", "")
start_line = result.get("start", {}).get("line", 0) start_line = result.get("start", {}).get("line", 0)
end_line = result.get("end", {}).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 # Code snippet
lines = extra.get("lines", "") lines = extra.get("lines", "")
@@ -129,7 +129,6 @@ class AndroidStaticAnalysisWorkflow:
# Handle case where workspace_path is a file (single APK upload) # Handle case where workspace_path is a file (single APK upload)
# vs. a directory containing files # vs. a directory containing files
from pathlib import Path
workspace_path_obj = Path(workspace_path) workspace_path_obj = Path(workspace_path)
# Determine actual workspace directory and APK path # Determine actual workspace directory and APK path