mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
Refactored cleartext storage libraries
This commit is contained in:
@@ -12,15 +12,12 @@
|
||||
*/
|
||||
|
||||
import java
|
||||
import SensitiveStorage
|
||||
import semmle.code.java.security.CleartextStorageClassQuery
|
||||
|
||||
from SensitiveSource data, ClassStore s, Expr input, Expr store
|
||||
where
|
||||
input = s.getAnInput() and
|
||||
store = s.getAStore() and
|
||||
data.flowsToCached(input) and
|
||||
// Exclude results in test code.
|
||||
not testMethod(store.getEnclosingCallable()) and
|
||||
not testMethod(data.getEnclosingCallable())
|
||||
data.flowsToCached(input)
|
||||
select store, "Storable class $@ containing $@ is stored here. Data was added $@.", s, s.toString(),
|
||||
data, "sensitive data", input, "here"
|
||||
|
||||
@@ -11,15 +11,12 @@
|
||||
*/
|
||||
|
||||
import java
|
||||
import SensitiveStorage
|
||||
import semmle.code.java.security.CleartextStorageCookieQuery
|
||||
|
||||
from SensitiveSource data, Cookie s, Expr input, Expr store
|
||||
where
|
||||
input = s.getAnInput() and
|
||||
store = s.getAStore() and
|
||||
data.flowsToCached(input) and
|
||||
// Exclude results in test code.
|
||||
not testMethod(store.getEnclosingCallable()) and
|
||||
not testMethod(data.getEnclosingCallable())
|
||||
data.flowsToCached(input)
|
||||
select store, "Cookie $@ containing $@ is stored here. Data was added $@.", s, s.toString(), data,
|
||||
"sensitive data", input, "here"
|
||||
|
||||
@@ -11,15 +11,12 @@
|
||||
*/
|
||||
|
||||
import java
|
||||
import SensitiveStorage
|
||||
import semmle.code.java.security.CleartextStoragePropertiesQuery
|
||||
|
||||
from SensitiveSource data, Properties s, Expr input, Expr store
|
||||
where
|
||||
input = s.getAnInput() and
|
||||
store = s.getAStore() and
|
||||
data.flowsToCached(input) and
|
||||
// Exclude results in test code.
|
||||
not testMethod(store.getEnclosingCallable()) and
|
||||
not testMethod(data.getEnclosingCallable())
|
||||
data.flowsToCached(input)
|
||||
select store, "'Properties' class $@ containing $@ is stored here. Data was added $@.", s,
|
||||
s.toString(), data, "sensitive data", input, "here"
|
||||
|
||||
Reference in New Issue
Block a user