Skip to content

Conversation

@jawira
Copy link
Contributor

@jawira jawira commented Dec 28, 2025

Mask well known patterns used by GitHub tokens.

See #1672

jawira and others added 30 commits February 11, 2019 14:27
@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.33%. Comparing base (d669926) to head (53fd918).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1977      +/-   ##
============================================
+ Coverage     53.31%   53.33%   +0.01%     
- Complexity     9805     9806       +1     
============================================
  Files           495      495              
  Lines         24137    24144       +7     
============================================
+ Hits          12869    12876       +7     
  Misses        11268    11268              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mrook mrook added this to the 3.1.2 milestone Dec 29, 2025
@jawira
Copy link
Contributor Author

jawira commented Dec 29, 2025

Hello @mrook, I have two comments about this PR:

  • The PR do not has test because I cannot find a way to execute the tests with DisguiseLogger. One alternative is to extract masking strategies into classes - one class per strategy - and then test the public masking method as unit tests. Let me know what do you think.
  • The changes in this PR mask github tokens, which are composed by a prefix (ghp_, gho_, ghu_, ghs_, or ghr_) followed by 36 random characters. The regex I use will match any random string up to 36 characters, for example it will also match ghp_aaa111 (only 6 characters random string). Are you ok with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants