Bolded the fact that user has to run monkey from Island to start ScoutSuite security scan

This commit is contained in:
VakarisZ 2021-01-28 12:16:08 +02:00
parent 255bfe9444
commit 7761d16cf8
2 changed files with 11 additions and 4 deletions

View File

@ -12,13 +12,12 @@ from monkey_island.cc.services.config_schema.config_value_paths import AWS_KEYS_
def is_cloud_authentication_setup(provider: CloudProviders) -> Tuple[bool, str]: def is_cloud_authentication_setup(provider: CloudProviders) -> Tuple[bool, str]:
if provider == CloudProviders.AWS.value: if provider == CloudProviders.AWS.value:
if is_aws_keys_setup(): if is_aws_keys_setup():
return True, "AWS keys already setup. Run Monkey on Island to start the scan." return True, "AWS keys already setup."
import common.cloud.scoutsuite.ScoutSuite.providers.aws.authentication_strategy as auth_strategy import common.cloud.scoutsuite.ScoutSuite.providers.aws.authentication_strategy as auth_strategy
try: try:
profile = auth_strategy.AWSAuthenticationStrategy().authenticate() profile = auth_strategy.AWSAuthenticationStrategy().authenticate()
return True, f" Profile \"{profile.session.profile_name}\" is already setup. " \ return True, f" Profile \"{profile.session.profile_name}\" is already setup. "
f"Run Monkey on Island to start the scan."
except AuthenticationException: except AuthenticationException:
return False, "" return False, ""

View File

@ -29,7 +29,7 @@ const getContents = (props) => {
.then(res => res.json()) .then(res => res.json())
.then(res => { .then(res => {
if(res.is_setup){ if(res.is_setup){
setDescription(res.message + ' Click next to change the configuration.'); setDescription(getDescription(res.message));
setIconType('icon-success'); setIconType('icon-success');
setIcon(faCheck); setIcon(faCheck);
} else { } else {
@ -40,6 +40,14 @@ const getContents = (props) => {
}); });
}, [props]); }, [props]);
function getDescription(message){
return (
<>
{message} Run <b>from the Island</b> to start the scan. Click next to change the configuration.
</>
)
}
return ( return (
<> <>
<NextSelectionButton title={'AWS'} <NextSelectionButton title={'AWS'}