Skip to content
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

Use consistent secret scrubbing #10006

Merged
merged 6 commits into from
Apr 24, 2024
Merged

Use consistent secret scrubbing #10006

merged 6 commits into from
Apr 24, 2024

Conversation

emmyoop
Copy link
Member

@emmyoop emmyoop commented Apr 22, 2024

resolves #9987

Problem

Secrets are not consistently redacted as ***** and sometimes show up as $$$DBT_SECRET_START$$$DBT_ENV_SECRET_MINE$$$DBT_SECRET_END$$$

Solution

Change the log function to redact the secret in the same way as we do elsewhere in logs.

To avoid circular dependencies, I moved SECRET_PLACEHOLDER into constant.py. I also removed SECRET_ENV_PREFIX in favor of the one defined in dbt-common to avoid having to keep them in sync with each other and risk anything out of sync unexpecedly.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@emmyoop emmyoop requested a review from a team as a code owner April 22, 2024 19:56
@cla-bot cla-bot bot added the cla:yes label Apr 22, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.14%. Comparing base (27943a5) to head (6bac246).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10006      +/-   ##
==========================================
- Coverage   88.17%   88.14%   -0.03%     
==========================================
  Files         181      181              
  Lines       22614    22631      +17     
==========================================
+ Hits        19939    19949      +10     
- Misses       2675     2682       +7     
Flag Coverage Δ
integration 85.44% <100.00%> (-0.12%) ⬇️
unit 62.25% <54.54%> (+0.04%) ⬆️

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

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

@emmyoop emmyoop added the artifact_minor_upgrade To bypass the CI check by confirming that the change is not breaking label Apr 23, 2024
@emmyoop emmyoop merged commit 29429ec into main Apr 24, 2024
62 checks passed
@emmyoop emmyoop deleted the er/9987-logs branch April 24, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
artifact_minor_upgrade To bypass the CI check by confirming that the change is not breaking cla:yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Use consistent secret scrubbing
2 participants