私は Python コードのセキュリティを見直している最中です。
そのために、Bandits (Python のモジュール) や DeepCode (www.deepcode.ai) などのツールを使用しています。Bandit は、ログインとパスワードのハードコーディングにいくつかの脆弱性があることを発見しましたが、DeepCode には脆弱性は見つかりませんでした。問題のコードは次のとおりです。
# Guest only login
# Used for Login as Guest button and login the current session as GUEST
APP_GUEST_USERNAME = "ppams.asguest"
APP_GUEST_PASSWORD = "ppams123456"
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '10-6d$q$&xxc9heb(hjeda$w%7pxC#+hhx%b0xl&_q(p8(u#uu'
資格情報をハードコーディングしてはならないという記事を見つけました。ここにいくつかの記事があります: https://qxf2.com/blog/dont-hardcode-usernames-and-passwords-in-your-test-scripts/ ; https://www.owasp.org/index.php/Use_of_hard-coded_password ; https://www.preemptive.com/blog/article/1059-create-more-secure-applications-don-t-hard-code-credentials-instead-use-application-hardening/106-risk-management .
では、ハードコードされた資格情報を使用するリスクは何ですか? いくつかのサンプルを見せてもらえますか? 資格情報をハードコーディングできない場合、資格情報を保護する別の方法は何ですか?
ありがとう