refactoring security-daily.sh