fix: use exact package match in bugreport receiver check#812
fix: use exact package match in bugreport receiver check#812DevenDucommun wants to merge 3 commits into
Conversation
The check_receiver_prefix method used unanchored substring matching, causing false CRITICAL alerts when a legitimate AOSP receiver class path contained an indicator value as a substring (e.g. TheOneSpy's "com.android.services" matching inside com.android.phone's SIP telephony receiver). Replace with check_app_id on the extracted package name, consistent with the artifact module's approach. Remove the now-unused check_receiver_prefix method. Fixes mvt-project#803 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Hi @DevenDucommun, thanks for the PR! This sounds all very good and plausible, but I'm having trouble reproducing and testing the issue on my side. |
|
Hi @viktor3002, thanks for taking a look. I don't have a real-world bugreport I can share, but the false positive doesn't need one. It only requires a receiver whose class path contains So I put together a minimal synthetic bugreport that triggers it. Two files in a zip:
And a one-indicator STIX2 file with TheOneSpy's real { "pattern": "[app:id='com.android.services']", "pattern_type": "stix" }Running
I'll also email the ready-made zip and stix2 file to mail@lab.rsf.org so you can run it directly. Happy to fold this into a regression test fixture under (For transparency: the patch and this analysis were done with AI assistance, as noted in the PR body.) |
The check_receiver_prefix method used unanchored substring matching, causing false CRITICAL alerts when a legitimate AOSP receiver class path contained an indicator value as a substring (e.g. TheOneSpy's "com.android.services" matching inside com.android.phone's SIP telephony receiver).
Replace with check_app_id on the extracted package name, consistent with the artifact module's approach. Remove the now-unused check_receiver_prefix method.
Fixes #803
AI assisted