-
Notifications
You must be signed in to change notification settings - Fork 180
chore: pass secret config around instead of discrete args #982
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
Conversation
b7a8bac to
7ee194c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #982 +/- ##
==========================================
+ Coverage 91.49% 91.58% +0.08%
==========================================
Files 180 180
Lines 7597 7605 +8
==========================================
+ Hits 6951 6965 +14
+ Misses 646 640 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
7ee194c to
382c3c8
Compare
084299e to
dd27878
Compare
dd27878 to
1b2bd9a
Compare
agateau-gg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor remark, looks good otherwise.
| def __init__( | ||
| self, show_secrets: bool = False, ignore_known_secrets: bool = False | ||
| ) -> None: | ||
| def __init__(self, *args: Any, **kwargs: Any) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not fond of this because it prevents type-hinting checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, removing the __init__ method entirely. The only impact is that verbose could be set to True, while unused by the SecretGitLabWebUIOutputHandler, but that doesn't seem like a real issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or should I copy the other arguments in the SecretGitLabWebUIOutputHandler ?
agateau-gg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
What has been done
Refactor how secret scan parameters are passed around: pass the SecretConfig around, instead of discrete args (both to the scanner, and in output handlers).
Validation
There should be no functional change.