android - How to determine which dependency causes Google Play OpenSSL warning? -
i'm working on big legacy project , trying fix openssl vulnerability issue explained @ how address openssl vulnerabilities in apps.
the problem is, there lot of dependencies, open source (i updated didn't break compatibility) added gradle import, custom/closed source provided partners , contractors of company work , attached project jars.
is there way pinpoint specific library has vulnerability? used bash script provided @ google play , openssl warning message , points 1 native dependency (actually .so file). there option pinpoint actual dependency there?
is there option pinpoint actual dependency there?
yes, need know offending openssl version , need grep
. windows find
won't do.
first, take note of offending openssl version. sake of argument, due openssl 1.0.1h
.
next, gather list of dependencies , top level folders. sake of argument, $home/desktop/aosp-app
, $home/sdk-a
, /usr/local/sdk-b
, /opt/local/sdk-c
.
finally, top level directories:
grep -r '1.0.1h' "$home/desktop/aosp-app" grep -r '1.0.1h' "$home/sdk-a" grep -r '1.0.1h' /usr/local/sdk-b grep -r '1.0.1h' /opt/local/sdk-c
you don't need grep -ir
, case insensitive (-i
) recursive (-r
) search. don't need grep -ir
, recursive (-r
) search skips binary files (-i
).
all of works because openssl library embeds version in data section string. eventually, hit on culprit, sdk comes pre-built shared object includes openssl static library. 1 sdk seems identified frequently, , uses curl built against static openssl library.
if have jar files , suspect them, can perform following quick test:
find <dir> -name '*.jar' -exec grep -r '1.0.1h' {} \;
the command in directory <dir>
, subdirectories. search files *.jar
extension. when finds one, run grep
on looking string. find
every *.jar
finds.
Comments
Post a Comment