Skip to content

🧹 fix: Stop Cache Audit From Logging Cache Keys and Values - #16995

Merged
berry-13 merged 7 commits into
devfrom
berry-13/redact-cache-audit
Oct 12, 2026
Merged

berry-13 merged 7 commits into
devfrom
berry-13/redact-cache-audit

Conversation

@berry-13

@berry-13 berry-13 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

With DEBUG_MEMORY_CACHE on and no Redis, the minute-interval cache audit printed every key and raw value of the in-memory TTL caches to console.log, bypassing the logger's redaction. Those stores include exchanged OpenID tokens, admin OAuth exchange codes, passkey challenges and cached messages.

The audit now reports only namespace, entry count and TTL, the delete-failure warnings no longer print the cache key, and all of this module's cache diagnostics go through the winston logger so central redaction applies.

Stacked on #16994.

Type of change

  • Bug fix

Testing

Tested environments/configuration:

  • DEBUG_MEMORY_CACHE=true, USE_REDIS off.

Automated tests:

  • Added api/cache/getLogStores.spec.js: seeds a TTL store with a secret key and value, runs the audit, and asserts neither appears in the output and console.log is never called. npx jest cache/getLogStores.spec.js: 1 passed.
  • npx eslint and npx prettier --check on changed files: clean.

Screenshots / recordings

No user-facing change

Risk / compatibility

The debug output now goes through logger.debug, so it also requires debug-level logging to be visible, and it no longer lists individual keys.

Checklist

  • I reviewed my own changes
  • Relevant tests have been added or updated
  • Existing relevant tests pass
  • The change does not introduce new warnings or errors
  • Required documentation PR: N/A

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T12:15:49.918965Z 4141928 New commits
🔒 Security Review ✅ Completed 2026-10-11T21:47:19.652380Z 8d93614 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d93614199

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread api/cache/getLogStores.js Outdated
Comment thread api/cache/getLogStores.js
Base automatically changed from berry-13/redact-auth-email-logs to dev October 12, 2026 08:51
@codegraph-librechat codegraph-librechat Bot added 🗺️ Platform Security codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🛡️ security review labels Oct 12, 2026
Copilot AI balanced review requested due to automatic review settings October 12, 2026 12:11
@berry-13
berry-13 force-pushed the berry-13/redact-cache-audit branch from 799792a to 4141928 Compare October 12, 2026 12:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@berry-13
berry-13 added this pull request to stack #17022 October 12, 2026 13:59
@berry-13
berry-13 merged commit f7a2ed1 into dev Oct 12, 2026
37 checks passed
@berry-13
berry-13 deleted the berry-13/redact-cache-audit branch October 12, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ Platform Security codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🛡️ security review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants