refactor(keyretriever): reduce duplicate master-key WARN logs#589
refactor(keyretriever): reduce duplicate master-key WARN logs#589
Conversation
- Demote in-chain retriever failures to Debug - GcoredumpRetriever logs at Debug and falls through silently - Dedupe master-key WARN per browser instead of per profile - Clarify "exit status 128 ()" with empty stderr message Closes #588
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #589 +/- ##
==========================================
+ Coverage 71.25% 73.60% +2.35%
==========================================
Files 61 61
Lines 3294 2815 -479
==========================================
- Hits 2347 2072 -275
+ Misses 757 553 -204
Partials 190 190
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors Chromium master-key retrieval logging to reduce repeated WARN-level messages during multi-profile extraction, particularly on macOS when key retrieval commonly fails in expected ways (e.g., no keychain access / not root).
Changes:
- Demotes per-retriever failures inside
ChainRetrieverfrom WARN to Debug to avoid noisy “expected failure” logs. - Updates macOS
GcoredumpRetrieverto silently fall through (return(nil, nil)) on internal failures while logging only at Debug. - Deduplicates “master key retrieval” WARN logs across Chromium profiles by emitting a WARN once and subsequent failures as Debug; also improves
securitycommand error clarity when stderr is empty.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crypto/keyretriever/keyretriever_darwin.go | Adjusts macOS retrievers to avoid repeated warning-worthy failures; improves security error messaging. |
| crypto/keyretriever/keyretriever.go | Demotes in-chain retriever failure logs from WARN to Debug. |
| browser/chromium/chromium.go | Adds per-browser WARN deduplication for master-key retrieval failures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… per browser name Address Copilot review: glob-expanded configs (e.g., MSIX/UWP browsers with publisher hash suffixes) yield multiple installations sharing a BrowserName but with different UserDataDir. Include UserDataDir in the dedupe key so each installation still emits its first WARN.
Summary
Test plan
golangci-lint runcleango test ./...passesCloses #588