やりたいこと
- AppScanを使ってRailsアプリケーションの脆弱性をチェックしたい
- ログイン周りの処理はdeviseを使って実装済み
発生した問題
- AppScanでテストすると、セッション情報が無効ですと言われてテストが途中で止まる
原因
- deviseのアカウントがロックされている
- AppScanが大量に不正ログインを試みた結果と思われる
対策
- deviseでアカウントをロックしない
-
:failed_attemptsから、:noneに変更する
# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
# :none = No lock strategy. You should handle locking by yourself.
# config.lock_strategy = :failed_attempts
config.lock_strategy = :none