mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
19 lines
728 B
Plaintext
19 lines
728 B
Plaintext
import java
|
|
import semmle.code.java.security.FragmentInjection
|
|
import TestUtilities.InlineExpectationsTest
|
|
|
|
class FragmentInjectionInPreferenceActivityTest extends InlineExpectationsTest {
|
|
FragmentInjectionInPreferenceActivityTest() { this = "FragmentInjectionInPreferenceActivityTest" }
|
|
|
|
override string getARelevantTag() { result = "hasPreferenceFragmentInjection" }
|
|
|
|
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
tag = "hasPreferenceFragmentInjection" and
|
|
exists(IsValidFragmentMethod isValidFragment | isValidFragment.isUnsafe() |
|
|
isValidFragment.getLocation() = location and
|
|
element = isValidFragment.toString() and
|
|
value = ""
|
|
)
|
|
}
|
|
}
|