Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

refactor: process error stack and mask potential secrets in error message in telemetry #11290

Merged
merged 12 commits into from
Apr 11, 2024

Conversation

jayzhang
Copy link
Member

@jayzhang jayzhang commented Apr 7, 2024

  1. extract only method names from error stack and drop the unuseful content.
  2. Mask tokens in error message that has high entropy value (possibility to be a secret) to make sure the error message property meets with the privacy issue
  3. rename error-message and error-stack to err-message and err-stack

packages/fx-core/src/common/telemetry.ts Dismissed Show dismissed Hide dismissed
Copy link

codecov bot commented Apr 7, 2024

Codecov Report

Attention: Patch coverage is 96.59091% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 87.46%. Comparing base (2fe49d5) to head (c731a44).
Report is 4 commits behind head on dev.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #11290      +/-   ##
==========================================
+ Coverage   87.42%   87.46%   +0.03%     
==========================================
  Files         463      464       +1     
  Lines       28197    28284      +87     
  Branches     5595     5466     -129     
==========================================
+ Hits        24652    24738      +86     
  Misses       1771     1771              
- Partials     1774     1775       +1     
Files Coverage Δ
packages/api/src/error.ts 100.00% <100.00%> (ø)
packages/fx-core/src/component/constants.ts 100.00% <ø> (ø)
...mponent/driver/middleware/addSWADeployTelemetry.ts 80.76% <100.00%> (ø)
...x-core/src/component/driver/script/scriptDriver.ts 88.67% <100.00%> (ø)
packages/fx-core/src/component/utils/envUtil.ts 89.05% <ø> (-0.37%) ⬇️
packages/fx-core/src/index.ts 100.00% <100.00%> (ø)
packages/fx-core/src/common/telemetry.ts 97.75% <90.00%> (-0.37%) ⬇️
packages/fx-core/src/common/stringUtils.ts 97.26% <97.26%> (ø)

... and 3 files with indirect coverage changes

@jayzhang jayzhang requested a review from hund030 as a code owner April 7, 2024 09:30
@jayzhang jayzhang changed the title refactor: extract method names from error stack refactor: process error stack and mask potential secrets in error message in telemetry Apr 7, 2024
@jayzhang jayzhang requested a review from Siglud as a code owner April 10, 2024 04:26
@jayzhang jayzhang merged commit 5ddf860 into dev Apr 11, 2024
25 checks passed
@jayzhang jayzhang deleted the huajie/error-stack-telemetry branch April 11, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants