-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sanitize Docker environment vars in logs (#1163)
- Loading branch information
Showing
5 changed files
with
166 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,12 +14,13 @@ public class StringUtilitiesTests | |
[DataRow(null, null)] | ||
[DataRow(" ", " ")] | ||
[DataRow(" https:// ", " https:// ")] | ||
[DataRow("https://username:[email protected]", "https://******@domain.me")] | ||
[DataRow("https://username:[email protected]", $"https://{StringUtilities.SensitivePlaceholder}@domain.me")] | ||
[DataRow("HTTPS://username:[email protected]", $"HTTPS://{StringUtilities.SensitivePlaceholder}@domain.me")] | ||
[DataRow("https://domain.me", "https://domain.me")] | ||
[DataRow("https://@domain.me", "https://@domain.me")] | ||
[DataRow( | ||
"install -r requirements.txt --dry-run --ignore-installed --quiet --report file.zvn --index-url https://user:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@someregistry.localhost.com", | ||
"install -r requirements.txt --dry-run --ignore-installed --quiet --report file.zvn --index-url https://******@someregistry.localhost.com")] | ||
$"install -r requirements.txt --dry-run --ignore-installed --quiet --report file.zvn --index-url https://{StringUtilities.SensitivePlaceholder}@someregistry.localhost.com")] | ||
public void RemoveSensitiveInformation_ReturnsAsExpected(string input, string expected) | ||
{ | ||
var actual = StringUtilities.RemoveSensitiveInformation(input); | ||
|