-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Only warn about singleTask/singleInstance when API level is <21 #750
Conversation
… than 21 is supported The underlying vulnerability is that with ActivityManager.getRecentTasks() any app with the permission GET_TASKS can read the Intents sent to create the task. This would reveal the possibly sensitive contents of these Intents. According to the Android documentation at https://developer.android.com/reference/android/app/ActivityManager.html#getRecentTasks(int,%20int) starting with API level 21 it is no longer possible to read all Intents sent to a root activity by using ActivityManager.getRecentTasks(). After API level 21, only Intents sent from your own app and other apps to be known insensitive like the home/launcher app. See also chapter 4.1.3.3 (page 94) in http://www.jssec.org/dl/android_securecoding_en.pdf
Did you run the tests? |
@matandobr No, see the last line of my submission message. |
It is through the browser, head to /runtest/ |
I'll figure out tomorrow how to fix this. |
sounds like min_sdk is not an integer but empty in your case |
It's fine when running a real apk analysis. From my understanding it's impossible to build an .apk without having a min_sdk version set somewhere in the process. Therefore, I believe this to be a missing part of the test suite. Nonetheless I could insert a test if the value does not exist or is None, just to be on the safe side. |
on the top of file, and use this constant. ANDROID_5_0_LEVEL = 21 |
@magaofei Well, I built this in the fashion of the already existing code at line 1034 and 1035 and would make code clean-ups in a separate PR. But here you go. |
Btw: You really shouldn't talk about constants in Python. There is no such thing. (At least in the Python language or stdlib. You can build your own consts though.) |
@vollkorn1982 Btw: You should not use except, you should specify exception |
@magaofei From the category "Naming Conventions". You see the problem yourself? ;) Anymore changes? Please don't feed them to me one by one, but make a list I can work off at once. Thank you. |
@vollkorn1982 If you come over and discuss the constants and naming conventions with me, you don't need them. I only pay attention to the results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test works fine!
Thanks @vollkorn1982 for the PR
What was a problem?
How this PR fixes the problem?
Check lists (check
x
in[ ]
of list items)Additional Comments (if any)