widgetastic.core icon indicating copy to clipboard operation
widgetastic.core copied to clipboard

Don't log sensitive data with logged method

Open jakurban opened this issue 2 years ago • 5 comments

sensitive parameter was introduced recently, but it was not reflected in log function decorator. This PR changes behaviour to hide all attributes except the safe ones.

jakurban avatar Jul 31 '23 14:07 jakurban

Codecov Report

Merging #244 (7c7e083) into master (b891f49) will decrease coverage by 0.06%. The diff coverage is 66.66%.

:exclamation: Current head 7c7e083 differs from pull request most recent head 1df4fc4. Consider uploading reports for the commit 1df4fc4 to get more accurate results

@@            Coverage Diff             @@
##           master     #244      +/-   ##
==========================================
- Coverage   86.45%   86.40%   -0.06%     
==========================================
  Files          18       18              
  Lines        2570     2574       +4     
==========================================
+ Hits         2222     2224       +2     
- Misses        348      350       +2     
Flag Coverage Δ
unittests 86.40% <66.66%> (-0.06%) :arrow_down:

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

Files Changed Coverage Δ
src/widgetastic/log.py 93.50% <66.66%> (-2.39%) :arrow_down:

codecov[bot] avatar Jul 31 '23 14:07 codecov[bot]

@digitronik @mshriver could you please look at this ?

jakurban avatar Aug 03 '23 11:08 jakurban

@JaurbanRH marking draft until the comments have been addressed. If you're not able to continue work on this let us know and we'll take over ownership of the commit.

Thanks!

mshriver avatar Aug 27 '24 14:08 mshriver

@mshriver Yes, I am unable to continue to work on this issue.

jakurban avatar Aug 28 '24 09:08 jakurban

im wondering if we could make use of pydantic Secret objects to explicitly mark secrets, and then have a logging filter for the selenium namespace to explicitly mark the sensitive data

unfortunately introducing secrets now will be very disruptive for users at first

RonnyPfannschmidt avatar Aug 28 '24 15:08 RonnyPfannschmidt