When inferring additional secrets from multi-line content, ignore very short lines.

This commit is contained in:
John Wesley Walker III
2023-05-02 16:32:09 +00:00
parent afcca9bfa4
commit 75ffe93f62
4 changed files with 21 additions and 5 deletions

View File

@@ -40,6 +40,19 @@ namespace GitHub.DistributedTask.Logging
}
}
/// <summary>
/// Provide callers with a recommendation on what to consider a secret.
/// This is helpful in cases where JSON (for example) is broken into multiple lines
/// and we don't want to start treating standalone JSON control characters as secrets.
/// </summary>
public int DerivedSecretRecommendedMinimumLength
{
get
{
return 3;
}
}
/// <summary>
/// This implementation assumes no more than one thread is adding regexes, values, or encoders at any given time.
/// </summary>