RedHatQE / widgetastic.core

Making testing of UIs fantastic.
Other
36 stars 42 forks source link

Don't log sensitive data with logged method #244

Open jakurban opened 1 year ago

jakurban commented 1 year ago

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.

codecov[bot] commented 1 year ago

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:
jakurban commented 1 year ago

@digitronik @mshriver could you please look at this ?

mshriver commented 3 weeks ago

@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!

jakurban commented 3 weeks ago

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

RonnyPfannschmidt commented 3 weeks ago

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