-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
CDK: Improve filter_secrets
skip empty secret
#15684
CDK: Improve filter_secrets
skip empty secret
#15684
Conversation
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
@@ -67,5 +67,6 @@ def filter_secrets(string: str) -> str: | |||
# TODO this should perform a maximal match for each secret. if "x" and "xk" are both secret values, and this method is called twice on | |||
# the input "xk", then depending on call order it might only obfuscate "*k". This is a bug. | |||
for secret in __SECRETS_FROM_CONFIG: | |||
string = string.replace(str(secret), "****") | |||
if secret: |
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.
could you unit test this behavior please?
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 I will add now
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
/publish-cdk dry-run=true
|
/publish-cdk dry-run=false
|
filter_secrets
skip empty stringfilter_secrets
skip empty secret
* Improve `filter_secrets` skip empty string Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
what's the process for getting this update into source-bing-ads? Do I just need to publish a new version? |
@edgao yes we just need to re-release |
Signed-off-by: Sergey Chvalyuk grubberr@gmail.com
What
source-bing-ads
has empty secret value on purpose:it produce "strange" log output like this:
How
Don't replace empty string with 4 starts