Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore_: remove private information for error log #6334

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

qfrank
Copy link
Contributor

@qfrank qfrank commented Feb 7, 2025

relate comment

I've also tried search with keyword: fmt.Error :
fmt.Errorf-search-result.txt.zip

truncated some sensitive information in error messages.

@qfrank qfrank requested review from ilmotta and osmaczko February 7, 2025 10:20
@qfrank qfrank self-assigned this Feb 7, 2025
@status-im-auto
Copy link
Member

status-im-auto commented Feb 7, 2025

Jenkins Builds

Click to see older builds (16)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d3404d3 #1 2025-02-07 10:25:54 ~5 min linux 📦zip
✔️ d3404d3 #1 2025-02-07 10:25:54 ~5 min macos 📦zip
✔️ d3404d3 #1 2025-02-07 10:26:11 ~5 min ios 📦zip
✔️ d3404d3 #1 2025-02-07 10:26:34 ~5 min windows 📦zip
✖️ d3404d3 #1 2025-02-07 10:26:40 ~5 min tests-rpc 📄log
✔️ d3404d3 #1 2025-02-07 10:26:40 ~6 min android 📦aar
✔️ d3404d3 #1 2025-02-07 10:26:40 ~5 min macos 📦zip
✔️ d3404d3 #1 2025-02-07 10:51:41 ~30 min tests 📄log
e83da29 #2 2025-02-10 07:42:31 ~1 min ios 📄log
e83da29 #2 2025-02-10 07:43:07 ~2 min macos 📄log
e83da29 #2 2025-02-10 07:43:10 ~2 min android 📄log
e83da29 #2 2025-02-10 07:43:25 ~2 min windows 📄log
e83da29 #2 2025-02-10 07:43:52 ~2 min linux 📄log
✖️ e83da29 #2 2025-02-10 07:44:21 ~3 min tests-rpc 📄log
✖️ e83da29 #2 2025-02-10 07:44:29 ~3 min tests 📄log
e83da29 #2 2025-02-10 07:44:30 ~3 min macos 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
f5be723 #3 2025-02-10 07:45:55 ~1 min ios 📄log
f5be723 #3 2025-02-10 07:46:34 ~2 min android 📄log
f5be723 #3 2025-02-10 07:46:35 ~2 min macos 📄log
f5be723 #3 2025-02-10 07:46:42 ~2 min windows 📄log
✖️ f5be723 #3 2025-02-10 07:46:52 ~2 min tests 📄log
f5be723 #3 2025-02-10 07:47:19 ~2 min linux 📄log
f5be723 #3 2025-02-10 07:48:00 ~3 min macos 📄log
✖️ f5be723 #3 2025-02-10 07:48:14 ~3 min tests-rpc 📄log
✔️ 24cd545 #4 2025-02-10 11:35:25 ~3 min macos 📦zip
✔️ 24cd545 #4 2025-02-10 11:35:53 ~3 min windows 📦zip
✔️ 24cd545 #4 2025-02-10 11:37:06 ~5 min macos 📦zip
✖️ 24cd545 #4 2025-02-10 11:37:16 ~5 min tests-rpc 📄log
✔️ 24cd545 #4 2025-02-10 11:37:31 ~5 min linux 📦zip
✔️ 24cd545 #4 2025-02-10 11:38:07 ~6 min android 📦aar
✔️ 24cd545 #4 2025-02-10 12:01:48 ~29 min tests 📄log
✔️ 24cd545 #5 2025-02-10 12:32:32 ~3 min tests-rpc 📄log
✔️ 24cd545 #4 2025-02-10 18:41:52 ~7 hr 9 min ios 📦zip

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 21.47651% with 117 lines in your changes missing coverage. Please review.

Project coverage is 60.38%. Comparing base (848b411) to head (24cd545).

Files with missing lines Patch % Lines
server/handlers.go 30.00% 14 Missing ⚠️
mobile/status.go 0.00% 10 Missing ⚠️
protocol/messenger_communities.go 11.11% 8 Missing ⚠️
services/communitytokens/service.go 0.00% 7 Missing ⚠️
services/wallet/collectibles/controller.go 25.00% 6 Missing ⚠️
services/wallet/collectibles/manager.go 0.00% 6 Missing ⚠️
protocol/linkpreview_unfurler_status.go 0.00% 5 Missing ⚠️
api/geth_backend.go 20.00% 4 Missing ⚠️
protocol/messenger.go 33.33% 4 Missing ⚠️
protocol/messenger_share_urls.go 0.00% 4 Missing ⚠️
... and 27 more

❌ Your patch check has failed because the patch coverage (21.47%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6334      +/-   ##
===========================================
- Coverage    60.42%   60.38%   -0.05%     
===========================================
  Files          845      845              
  Lines       111357   111371      +14     
===========================================
- Hits         67289    67251      -38     
- Misses       36270    36301      +31     
- Partials      7798     7819      +21     
Flag Coverage Δ
functional 0.45% <0.00%> (-0.01%) ⬇️
unit 60.39% <21.47%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
common/utils.go 82.14% <100.00%> (+4.36%) ⬆️
protocol/messenger_community_shard.go 70.83% <100.00%> (ø)
services/wallet/router/pathprocessor/errors.go 100.00% <ø> (ø)
account/accounts.go 57.67% <0.00%> (ø)
node/geth_node.go 65.43% <50.00%> (ø)
protocol/communities/manager.go 65.42% <0.00%> (-0.07%) ⬇️
protocol/identity/utils.go 90.47% <66.66%> (ø)
protocol/messenger_contacts.go 62.24% <50.00%> (ø)
protocol/messenger_handler.go 59.79% <0.00%> (+0.16%) ⬆️
protocol/messenger_store_node_request_manager.go 41.60% <0.00%> (ø)
... and 30 more

... and 20 files with indirect coverage changes

@qfrank qfrank requested a review from igor-sirotin February 10, 2025 07:43
@qfrank qfrank force-pushed the chore/remove_private_info_for_error_log branch from e83da29 to f5be723 Compare February 10, 2025 07:44
This commit adds a utility function from the common package to truncate sensitive information (like addresses, IDs, etc.) in error messages across multiple files. This helps prevent accidentally exposing full sensitive data in logs and error messages while maintaining readability.
@qfrank qfrank force-pushed the chore/remove_private_info_for_error_log branch from f5be723 to 24cd545 Compare February 10, 2025 11:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants