← Java / Spring · 目次

JAVA-056 / 中級

静的リソース・設定ディレクトリでの Git 露出(.git)

A05:2021 Security Misconfiguration · CWE-538 Insertion of Sensitive Information into Externally-Accessible File

なぜ問題になるのか?

/.git/config などからソースと履歴が復元されます。

修正方法

text
JAR のみデプロイし、静的パスを src/main/resources/static に限定して .git を遮断

参考資料