log4j 中有一個最近的漏洞https://nvd.nist.gov/vuln/detail/CVE-2021-44228,其重要性評分為 10
如何檢查 gradle 中是否存在 Log4j 易受攻擊的版本,以便它列出所有依賴項,包括傳遞依賴項?
uj5u.com熱心網友回復:
我們可以用
./gradlew -q dependencies
列出依賴樹。它將列出所有依賴項及其各自的版本。由于此輸出可能很長,我們可以使用以下命令對其進行過濾grep:
./gradelw -q dependencies | grep -i log4j
這將列出所有log4j-dependencies 及其各自的版本。
uj5u.com熱心網友回復:
gradle -q dependencyInsight --dependency org.apache.logging.log4j
--configuration scm
根據文章,還有另一種使用dependencyInsight檢查此串列的方法:- https://venturebeat.com/2021/12/17/how-to-detect-whether-you-have-the-log4j2-vulnerability/
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/393370.html
