Jul 26, 2026

Check Bug and Old Laravel Structure

 # Cari sisa struktur Laravel lama (pre-11) yang seharusnya sudah tidak ada

find . -name "Kernel.php"

find . -path "*/Http/Kernel.php"


# Cari penggunaan deprecated/pola lama

grep -rn "Illuminate\\\\Foundation\\\\Http\\\\Kernel" --include="*.php"

grep -rn "\$fillable = \[\]" --include="*.php"  # fillable kosong = mass assignment terbuka lebar kalau guarded juga kosong


grep -rlnE "eval\s*\(|base64_decode\s*\(|gzinflate\s*\(|str_rot13\s*\(|assert\s*\(|create_function\s*\(|passthru\s*\(|shell_exec\s*\(|system\s*\(|exec\s*\(" /var/www/html/ --include="*.php" | grep -v vendor/

grep -rn "DB::raw" --include="*.php"  # potensi SQL injection kalau nampung input mentah

grep -rn "->where(.*\\\$_GET\|\\\$_POST\|\\\$_REQUEST" --include="*.php"  # input superglobal mentah

grep -rn "eval(" --include="*.php"

grep -rn "dd(\|dump(\|var_dump(" --include="*.php"  # sisa debug yang lupa dihapus

grep -rln "env(" --include="*.php" | grep -v "config/"  # env() dipanggil langsung di luar config (anti-pattern Laravel)



root@m:/var/www/html# find resources/lib -type f \( -name "*.php" -o -name "*.txt" -o -name "*.zip" \)
resources/lib/waypoints/links.php
root@m:/var/www/html# grep -rn "links.php" resources/views
root@m:/var/www/html#