File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -548,7 +548,9 @@ protected void WriteSurvey()
548548
549549 private void SanitizeOutput ( object sendToPipeline )
550550 {
551- if ( OutputSanitizer ? . RequireSecretsDetection == true )
551+ if ( OutputSanitizer != null && OutputSanitizer . RequireSecretsDetection
552+ && ! OutputSanitizer . IgnoredModules . Contains ( MyInvocation ? . MyCommand ? . ModuleName )
553+ && ! OutputSanitizer . IgnoredCmdlets . Contains ( MyInvocation ? . MyCommand ? . Name ) )
552554 {
553555 OutputSanitizer . Sanitize ( sendToPipeline , out var telemetry ) ;
554556 _qosEvent ? . SanitizerInfo . Combine ( telemetry ) ;
Original file line number Diff line number Diff line change 1212// limitations under the License.
1313// ----------------------------------------------------------------------------------
1414
15+ using System . Collections . Generic ;
16+
1517namespace Microsoft . WindowsAzure . Commands . Common . Sanitizer
1618{
1719 public interface IOutputSanitizer
1820 {
1921 bool RequireSecretsDetection { get ; }
2022
23+ IEnumerable < string > IgnoredModules { get ; }
24+
25+ IEnumerable < string > IgnoredCmdlets { get ; }
26+
2127 void Sanitize ( object sanitizingObject , out SanitizerTelemetry telemetryData ) ;
2228 }
2329}
You can’t perform that action at this time.
0 commit comments