fix(security): remove account identifiers from log output (CWE-312)#19
Merged
Merged
Conversation
CodeQL cs/cleartext-storage-of-sensitive-information flagged two log
statements that serialised account-scoped identifiers into structured log
events — a concern for a financial application under PII logging policy.
• FlowLedgerApiClient.GetJsonAsync: dropped {Url} from the LogError
template; URLs may carry ?accountId=<Guid> query parameters. The
operation description alone is sufficient to identify the failed call.
• FinancialSyncService.SeedRecurringFlowsAsync: dropped {ProviderId}
from the LogWarning template; provider account IDs are account-scoped
identifiers that should not appear in log output. The seed name
provides enough diagnostic context.
Resolves CodeQL alerts #1 and #2 (HIGH / cs/cleartext-storage-of-sensitive-information).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FlowLedgerApiClient, line 93): Removed{Url}from theLogErrortemplate inGetJsonAsync. URLs constructed byGetTransactionsAsyncmay carry?accountId=<Guid>query parameters populated from the UI filter — logging these in cleartext is a PII concern in a financial application. The operation description is sufficient to identify the failed call.FinancialSyncService, line 323): Removed{ProviderId}from theLogWarningtemplate inSeedRecurringFlowsAsync. Provider account IDs are account-scoped identifiers that should not appear in log output per the project's PII logging policy. The seed name alone gives enough diagnostic context.Resolves CodeQL HIGH alerts #1 and #2:
cs/cleartext-storage-of-sensitive-information(CWE-312 / CWE-315).Test plan
🤖 Generated with Claude Code