Skip to content

Redact user input in selected logs.#14748

Merged
sundb merged 3 commits intoredis:unstablefrom
RoyBenMoshe:pii-redaction-log-updates
Jan 29, 2026
Merged

Redact user input in selected logs.#14748
sundb merged 3 commits intoredis:unstablefrom
RoyBenMoshe:pii-redaction-log-updates

Conversation

@RoyBenMoshe
Copy link
Contributor

@RoyBenMoshe RoyBenMoshe commented Jan 28, 2026

This PR continues the work #14645 , to further ensure sensitive user data is not exposed in logs when hide_user_data_from_log is enabled.

  • Redact empty key notices during RDB load.

  • Redact key names in eviction/expiration debug logs.

  • Block DEBUG SCRIPT output and suppress raw string dump in crash object debug when redaction is enabled.

  • Redact malformed MODULE LOAD argument snippets and unresolved module configuration logs.

  • Redact empty key notices during RDB load.

  • Redact key names during Lua globals allow‑list warnings.


Note

Low Risk
Changes are limited to log output/visibility and debug-command gating; core data-path behavior is unchanged, with low risk aside from reduced diagnostic detail when redaction is enabled.

Overview
Extends hide_user_data_from_log coverage by redacting user-provided strings (keys/args/config values) in additional log messages, including eviction/expiration deletion logs, module load/config errors, RDB empty-key notices, and Lua globals warnings.

Also tightens debug/crash logging by blocking DEBUG SCRIPT when redaction is enabled and avoiding printing raw string contents in crash reports; debug output that mentions keys now uses redactLogCstr().

Written by Cursor Bugbot for commit cc4b21c. This will update automatically on new commits. Configure here.

@jit-ci
Copy link

jit-ci bot commented Jan 28, 2026

Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.

In case there are security findings, they will be communicated to you as a comment inside the PR.

Hope you’ll enjoy using Jit.

Questions? Comments? Want to learn more? Get in touch with us.

@augmentcode
Copy link

augmentcode bot commented Jan 28, 2026

🤖 Augment PR Summary

Summary: Extends Redis log redaction when hide-user-data-from-log is enabled to reduce the chance of leaking user-provided data.

Changes: Redacts key names in eviction/expiration debug logs, malformed MODULE LOADEX argument snippets, and empty-key notices during RDB loading.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@sundb
Copy link
Collaborator

sundb commented Jan 28, 2026

not sure we should do this for the following:

            serverLog(LL_WARNING, "A key '%s' was added to Lua globals which is not on the globals allow list nor listed on the deny list.", variable_name);
            serverLog(LL_WARNING,"key '%s' found in DB containing the following object:", (char*)key->ptr);

@sundb sundb merged commit bf6287d into redis:unstable Jan 29, 2026
18 checks passed
@sundb sundb added the release-notes indication that this issue needs to be mentioned in the release notes label Jan 29, 2026
@sundb sundb added this to Redis 8.6 Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants