How we found 24 Android vulnerabilities using our open source AI security agent GitHub Security Lab reported 24 Android vulnerabilities found using its open source AI security agent, the GitHub Security Lab Taskflow Agent, with more than 20 reported by the post's author. The taskflows, run via the seclab-taskflows repository with a GitHub Copilot license, add mobile-specific prompts such as gather_mobile_entry_point_info.yaml and classify_application_local.yaml to target Android vulnerability classes like confused deputy and insecure broadcasts. Disclosed findings include a tracking vulnerability in the OsmAnd navigation app. With the rise of AI in the security space, our team created the GitHub Security Lab Taskflow Agent https://github.blog/security/community-powered-security-with-ai-an-open-source-framework-for-security-research/ as a way for security researchers to easily automate, package, and share the AI prompts and workflows that they find effective for their work. In this blog post, I’ll share how I created auditing taskflows to find vulnerabilities in Android applications. While new models are getting better at understanding code, custom taskflow prompts let security researchers guide them—splitting research into incremental steps to help the LLM find complex vulnerabilities faster, or that it would have missed entirely. Using these taskflows, I’ve reported more than 20 vulnerabilities in Android applications. You can check out our advisories page https://securitylab.github.com/ai-agents/ to see when new vulnerabilities are disclosed. Otherwise, keep reading for a few concrete examples of high-impact vulnerabilities that these taskflows found. How to run the taskflows on your own project Want to get started right away? The taskflows are open source and easy to run yourself. Please note: A GitHub Copilot license is required, and the prompts will use premium model requests. Running the taskflows can result in many tool calls, which can easily consume a large amount of tokens. 1. Go to the seclab-taskflows repository and start a codespace. 2. Wait a few minutes for the codespace to initialize. 3. In the terminal, run ./scripts/audit/run mobile.sh myorg/myrepo It might take an hour or two to finish on a medium-sized repository. When it finishes, it’ll open an SQLite viewer with the results. Open the “audit results” table and look for rows with a checkmark in the “has vulnerability” column. Creating targeted audit taskflows for Android apps My colleagues Peter and Mo previously wrote a blog post https://github.blog/security/how-to-scan-for-vulnerabilities-with-github-security-labs-open-source-ai-powered-framework/ about their audit task flows. Although those taskflows already work well on their own, Android applications have their own specific classes of vulnerabilities that we’d like the taskflows to focus on, so we need to guide them. First, I added a taskflow called gather mobile entry point info.yaml . Entry points are places in the code that attacker-controlled data could flow through. This taskflow takes the entry points and separates them into mobile entry points and non-mobile entry points. This allows the AI to run on repos that contain a variety of different application types—a mobile application, web servers, desktop applicationswhile still understanding the correct attack surface. Second, I edited classify application local.yaml . In it, I specify a list of popular vulnerability classes and ask the LLM to consider them in the context of each entry point and component. Since mobile application vulnerabilities are less widely known and LLMs are non-deterministic, we should ensure the LLM checks for certain essential vulnerabilities classes. For example, if in the previous step the taskflow identified an intent-based entry point, then it should have a list of common intent-based vulnerabilities it will check for, such as confused deputy or insecure broadcasts. This helps the LLM find connections between components and maintain an overview of the threat model. By combining both prompts across multiple runs, we get the best of each: the strict prompt and repeated runs ensure obvious vulnerabilities aren’t missed, while the broad prompt lets the AI apply its creativity to the fullest. Two examples of vulnerabilities found by the taskflows In this section, we’ll show two examples of vulnerabilities that were found by the taskflows and that have already been disclosed. In total, we have found and reported 24 vulnerabilities so far. Tracking Users via OsmAnd OsmAnd is a popular third-party navigation app that uses Open-Street-Map as its main data source. Available on both the App Store and Play Store, we will look at the Android version, which has over 10 million downloads. In this section, we will look at the most interesting of the three vulnerabilities that were discovered: a vulnerability that allows malicious apps to track the location of the device. OsmAnd exports an activity called MapActivity. An Android activity is a single, focused screen in an app that provides a UI for the user to interact with. MapActivity handles opening settings files and deeplinks within the app and is exported. An exported activity is an activity that can be launched by components outside of its own app. However, when opening settings files, the app allows for intent extras settings version , silent import , replace , export type list key . Intents are messaging objects in Android used to request an action from another app component, and intent extras are key-value pairs of data attached to an intent to pass information along with that request. MapActivity only expects these extras to come from an AIDL service. They should have been passed through an in-process channel instead of intent extras, because any app can put arbitrary extras on any intent to any exported activity . Android provides no mechanism to restrict which extras an external caller can set. Because MapActivity is exported, any app can send an intent https://developer.android.com/reference/android/content/Intent to the activity with any extras https://developer.android.com/reference/android/content/Intent we want, including intent extras that can allow us to import settings to the app undetected. The Android app uses the handleOsmAndSettingsImport function to import the following settings: - SilentImport: allows importing without a notification - Replace: allows us to replace instead of just add settings - SettingsTypes: allows us to import without a user confirmation private void handleOsmAndSettingsImport Uri intentUri, String fileName, Bundle extras { fileName = fileName.replace ZIP EXT, "" ; if extras = null && CollectionUtils.containsAny extras.keySet , SETTINGS VERSION KEY, SETTINGS LATEST CHANGES KEY { int version = extras.getInt SETTINGS VERSION KEY, -1 ; String latestChanges = extras.getString SETTINGS LATEST CHANGES KEY ; boolean replace = extras.getBoolean REPLACE KEY ; // ← attacker-controlled boolean silentImport = extras.getBoolean SILENT IMPORT KEY ; // ← attacker-controlled ArrayList