Example #1
0
        static int Configure(ConfigureOptions 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())
            {
                _logger.LogInformation($"Starting build for {app.application_name}");

                _dscLogic.MakeItSoPolicy(app, app.policy);

                if (!_dscLogic.MakeItSoApp(app))
                {
                    return(0);
                }

                _dscLogic.MakeItSoTeam(app);
                foreach (var user in app.users)
                {
                    user.teams = app.application_name;
                    _dscLogic.MakeItSoUser(user, app);
                }
                _dscLogic.MakeItSoMitigations(app);
                _dscLogic.MakeItSoSandboxes(app);
                _logger.LogInformation($"build complete for {app.application_name}");
            }

            _logger.LogDebug($"Exiting {LoggingHelper.GetMyMethodName()} with value {1}");
            return(1);
        }
Example #2
0
 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();
 }