public void Test_CompleteConfiguration_FullScan_ApplyMitigations() { SetupCompleteConfiguration(); TearDownFromConfiguration(); SetupFromConfiguration(); foreach (var app in application_profiles) { _dscLogic.MakeItSoScan(app, app.upload.ToArray(), app.modules.ToArray()); _dscLogic.MakeItSoMitigations(app); } TearDownFromConfiguration(); }
static int Scan(ScanOptions options) { _logger.LogDebug($"Entering {LoggingHelper.GetMyMethodName()} with scan options {options}"); var _localizationRepository = LoggingHelper.GetLocalizationRepository(options.Language); _logger.LogInformation(_localizationRepository.GetText("INFO00001", options.ToString())); var declareConfigRepository = new DeclareConfigurationRepository(options.JsonFileLocation); foreach (var app in declareConfigRepository.Apps()) { bool scheduled = false; if (String.IsNullOrWhiteSpace(app.policy_schedule)) { _logger.LogWarning(_localizationRepository.GetText("WARN00002", app.application_name)); } else { scheduled = _dscLogic.IsScanDueFromSchedule(app); } if (scheduled || options.IgnoreSchedule) { _logger.LogWarning(_localizationRepository.GetText("INFO00007", app.application_name)); _logger.LogWarning(_localizationRepository.GetText("INFO00008", app.application_name)); foreach (var file in app.upload.Select(x => x.location)) { _logger.LogInformation($"{file}"); } _logger.LogWarning(_localizationRepository.GetText("INFO00009", app.application_name)); foreach (var module in app.modules.Select(x => $"module_name={x.module_name},entry_point={x.entry_point}")) { _logger.LogInformation($"{module}"); } _dscLogic.MakeItSoScan(app, app.upload.ToArray(), app.modules.ToArray()); } } _logger.LogDebug($"Exiting {LoggingHelper.GetMyMethodName()} with value {1}"); return(1); }