[PR #5948] [MERGED] fix: prevent sensitive data leakage in error logs #36423

Closed
opened 2026-04-20 23:17:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/5948
Author: @MatissJanis
Created: 10/17/2025
Status: Merged
Merged: 10/18/2025
Merged by: @MatissJanis

Base: masterHead: fix-sensitive-data-logging


📝 Commits (4)

  • 7d88efa fix: prevent sensitive data leakage in error logs
  • 6cc117f Add changelog file
  • b04170a refactor: remove console logging from IntegrationBank tests
  • cd62b6d Fix sorted transactions test expectation

📊 Changes

6 files changed (+29 additions, -80 deletions)

View changed files

📝 packages/sync-server/src/app-gocardless/app-gocardless.js (+4 -4)
📝 packages/sync-server/src/app-gocardless/banks/integration-bank.js (+0 -19)
📝 packages/sync-server/src/app-gocardless/banks/tests/integration_bank.spec.js (+17 -53)
📝 packages/sync-server/src/app-gocardless/util/handle-error.js (+1 -3)
📝 packages/sync-server/src/app-simplefin/app-simplefin.js (+1 -1)
upcoming-release-notes/5948.md (+6 -0)

📄 Description

Summary

This PR fixes a security issue where sensitive data (private keys, tokens, stack traces) could be leaked in error logs.

Changes

  • app-gocardless.js: Replaced inspect(error, { depth: null }) with error.message to prevent logging full error objects with sensitive data
  • handle-error.js: Applied same fix to error handler
  • integration-bank.js: Removed debug logging that exposed full account and transaction details
  • app-simplefin.js: Removed logging of SimpleFIN access keys
  • Removed unused inspect imports

Security Impact

Previously, error logging could expose:

  • Private keys and authentication tokens in stack traces
  • Full SimpleFIN access keys
  • Complete account and transaction data

Now, only safe error messages are logged while maintaining debugging capability.

Testing

  • Existing tests should continue to pass
  • Error handling behavior remains unchanged, only logging is modified

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/5948 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 10/17/2025 **Status:** ✅ Merged **Merged:** 10/18/2025 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `fix-sensitive-data-logging` --- ### 📝 Commits (4) - [`7d88efa`](https://github.com/actualbudget/actual/commit/7d88efa24ef2a8f4deeb5d4204712b133709d7fc) fix: prevent sensitive data leakage in error logs - [`6cc117f`](https://github.com/actualbudget/actual/commit/6cc117f30530d68ff8bddfbb510c4c812e76ddfa) Add changelog file - [`b04170a`](https://github.com/actualbudget/actual/commit/b04170a119e89e3a23fc4b082b9c07131b84a16b) refactor: remove console logging from IntegrationBank tests - [`cd62b6d`](https://github.com/actualbudget/actual/commit/cd62b6db6b7e775bb01f8979d35b0634ac8d9e11) Fix sorted transactions test expectation ### 📊 Changes **6 files changed** (+29 additions, -80 deletions) <details> <summary>View changed files</summary> 📝 `packages/sync-server/src/app-gocardless/app-gocardless.js` (+4 -4) 📝 `packages/sync-server/src/app-gocardless/banks/integration-bank.js` (+0 -19) 📝 `packages/sync-server/src/app-gocardless/banks/tests/integration_bank.spec.js` (+17 -53) 📝 `packages/sync-server/src/app-gocardless/util/handle-error.js` (+1 -3) 📝 `packages/sync-server/src/app-simplefin/app-simplefin.js` (+1 -1) ➕ `upcoming-release-notes/5948.md` (+6 -0) </details> ### 📄 Description ## Summary This PR fixes a security issue where sensitive data (private keys, tokens, stack traces) could be leaked in error logs. ## Changes - **app-gocardless.js**: Replaced `inspect(error, { depth: null })` with `error.message` to prevent logging full error objects with sensitive data - **handle-error.js**: Applied same fix to error handler - **integration-bank.js**: Removed debug logging that exposed full account and transaction details - **app-simplefin.js**: Removed logging of SimpleFIN access keys - Removed unused `inspect` imports ## Security Impact Previously, error logging could expose: - Private keys and authentication tokens in stack traces - Full SimpleFIN access keys - Complete account and transaction data Now, only safe error messages are logged while maintaining debugging capability. ## Testing - Existing tests should continue to pass - Error handling behavior remains unchanged, only logging is modified --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 23:17:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#36423