Sensitive Data In Logs (ARCH7160)
هذا المحتوى غير متوفر بلغتك بعد.
Key php.logging.sensitive-data-in-logs · Severity error · Category logging
Logging sensitive data such as passwords, tokens, secrets, or card numbers leaks secrets into log sinks and exposes them permanently.
Incorrect
Section titled “Incorrect”<?php$this->logger->info('Login attempt', [ 'email' => $email, 'password' => $password, 'apiKey' => $apiKey,]);Correct
Section titled “Correct”<?php$this->logger->info('Login attempt', [ 'email' => $email,]);Remove or mask sensitive fields from the log context; never log them in clear text.