pingcap / tidb

TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.
https://pingcap.com
Apache License 2.0
37.34k stars 5.85k forks source link

br: redact secret strings when logging arguments (#57593) #57602

Open ti-chi-bot opened 1 day ago

ti-chi-bot commented 1 day ago

This is an automated cherry-pick of #57593

What problem does this PR solve?

Issue Number: close #57585

Problem Summary: Some values from the command line are not properly redacted.

What changed and how does it work?

In additional to the existing handling for --storage, we also apply redaction to the following parameters:

Check List

Tests

Side effects

Documentation

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

When invoking BR in command line with secret keys passed directly from arguments, they are no longer printed as plaintext in the log.
codecov[bot] commented 22 hours ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (release-7.1@f00a584). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## release-7.1 #57602 +/- ## ================================================ Coverage ? 73.4737% ================================================ Files ? 1213 Lines ? 382067 Branches ? 0 ================================================ Hits ? 280719 Misses ? 83446 Partials ? 17902 ```

🚨 Try these New Features:

ti-chi-bot[bot] commented 10 hours ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kennytm

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/pingcap/tidb/blob/release-7.1/OWNERS)~~ [kennytm] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ti-chi-bot[bot] commented 10 hours ago

[LGTM Timeline notifier]

Timeline: