Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Secure Logging | Safe Coding Practices
Python Security Best Practices

bookChallenge: Secure Logging

Завдання

Swipe to start coding

Write a function that logs user actions without exposing sensitive information. Your function must ensure that no secrets or personal data are included in the logs.

  • Remove any key-value pairs from the details dictionary whose key matches 'password', 'ssn', 'credit_card', or 'secret'.
  • Create a log message that includes the user_id, action, and the filtered details.
  • Log the message using the logging module.
  • Return the log message as a string.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 5
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

Awesome!

Completion rate improved to 5.56

bookChallenge: Secure Logging

Свайпніть щоб показати меню

Завдання

Swipe to start coding

Write a function that logs user actions without exposing sensitive information. Your function must ensure that no secrets or personal data are included in the logs.

  • Remove any key-value pairs from the details dictionary whose key matches 'password', 'ssn', 'credit_card', or 'secret'.
  • Create a log message that includes the user_id, action, and the filtered details.
  • Log the message using the logging module.
  • Return the log message as a string.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 5
single

single

some-alt