forked from nccgroup/ScoutSuite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nccgroup#508 from nccgroup/develop
release/5.4.0
- Loading branch information
Showing
21 changed files
with
139 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
__author__ = 'NCC Group' | ||
__version__ = '5.3.3' | ||
__version__ = '5.4.0' | ||
|
||
ERRORS_LIST = [] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 30 additions & 13 deletions
43
ScoutSuite/output/data/html/partials/aws/services.awslambda.regions.id.functions.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,32 @@ | ||
<!-- Lambda function partial --> | ||
<script id="services.awslambda.regions.id.functions.partial" type="text/x-handlebars-template"> | ||
<div id="resource-name" class="list-group-item active"> | ||
<h4 class="list-group-item-heading">{{name}}</h4> | ||
</div> | ||
<div class="list-group-item"> | ||
<h4 class="list-group-item-heading">Information</h4> | ||
<div class="list-group-item-text item-margin">Description: <span id="awslambda.regions.{{region}}.functions.{{@key}}.description"><samp>{{value_or_none description}}</samp></span></div> | ||
<div class="list-group-item-text item-margin">Role: <span id="awslambda.regions.{{region}}.functions.{{@key}}.role"><samp>{{value_or_none role}}</samp></span></div> | ||
<div class="list-group-item-text item-margin">Last Modified: <span id="awslambda.regions.{{region}}.functions.{{@key}}.last_modified"><samp>{{format_date last_modified}}</samp></span></div> | ||
<div class="list-group-item-text item-margin">Runtime: <span id="awslambda.regions.{{region}}.functions.{{@key}}.runtime"><samp>{{value_or_none runtime}}</samp></span></div> | ||
<div class="list-group-item-text item-margin">Version: <span id="awslambda.regions.{{region}}.functions.{{@key}}.version"><samp>{{value_or_none version}}</samp></span></div> | ||
<div class="list-group-item-text item-margin">Revision ID: <span id="awslambda.regions.{{region}}.functions.{{@key}}.revision_id"><samp>{{value_or_none revision_id}}</samp></span></div> | ||
<div class="list-group-item-text item-margin">Code Sha256: <span id="awslambda.regions.{{region}}.functions.{{@key}}.code_sha256"><samp>{{value_or_none code_sha256}}</samp></span></div> | ||
<div class="list-group-item-text item-margin">Handler: <span id="awslambda.regions.{{region}}.functions.{{@key}}.handler"><samp>{{value_or_none handler}}</samp></span></div> | ||
<div class="list-group-item-text item-margin">Code Size: <span id="awslambda.regions.{{region}}.functions.{{@key}}.code_size"><samp>{{value_or_none code_size}}</samp></span></div> | ||
<div class="list-group-item-text item-margin">Memory Size: <span id="awslambda.regions.{{region}}.functions.{{@key}}.memory_size"><samp>{{value_or_none memory_size}}</samp></span></div> | ||
<div class="list-group-item-text item-margin">Timeout: <span id="awslambda.regions.{{region}}.functions.{{@key}}.timeout"><samp>{{value_or_none timeout}}</samp></span></div> | ||
</div> | ||
</script> | ||
|
||
<!-- Lambda function partial --> | ||
<script id="services.awslambda.regions.id.functions.partial" type="text/x-handlebars-template"> | ||
<div class="list-group-item active"> | ||
<h4 class="list-group-item-heading">{{name}}</h4> | ||
</div> | ||
<div class="list-group-item"> | ||
<h4 class="list-group-item-heading">Attributes</h4> | ||
{{> generic_object resource}} | ||
</div> | ||
</script> | ||
<script> | ||
Handlebars.registerPartial("services.awslambda.regions.id.functions", $("#services\\.awslambda\\.regions\\.id\\.functions\\.partial").html()); | ||
</script> | ||
<script> | ||
Handlebars.registerPartial("services.awslambda.regions.id.functions", $("#services\\.awslambda\\.regions\\.id\\.functions\\.partial").html()); | ||
</script> | ||
|
||
<!-- Single awslambda function template --> | ||
<script id="single_awslambda_function-template" type="text/x-handlebars-template"> | ||
{{> modal-template template='services.awslambda.regions.id.functions'}} | ||
</script> | ||
<script> | ||
var single_awslambda_function_template = Handlebars.compile($("#single_awslambda_function-template").html()); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 14 additions & 12 deletions
26
ScoutSuite/providers/base/authentication_strategy_factory.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
from ScoutSuite.providers.aws.authentication_strategy import AWSAuthenticationStrategy | ||
from ScoutSuite.providers.gcp.authentication_strategy import GCPAuthenticationStrategy | ||
from ScoutSuite.providers.azure.authentication_strategy import AzureAuthenticationStrategy | ||
from ScoutSuite.providers.aliyun.authentication_strategy import AliyunAuthenticationStrategy | ||
from ScoutSuite.providers.oci.authentication_strategy import OracleAuthenticationStrategy | ||
|
||
_strategies = { | ||
'aws': AWSAuthenticationStrategy, | ||
'gcp': GCPAuthenticationStrategy, | ||
'azure': AzureAuthenticationStrategy, | ||
'aliyun': AliyunAuthenticationStrategy, | ||
'oci': OracleAuthenticationStrategy | ||
'aws': 'AWSAuthenticationStrategy', | ||
'gcp': 'GCPAuthenticationStrategy', | ||
'azure': 'AzureAuthenticationStrategy', | ||
'aliyun': 'AliyunAuthenticationStrategy', | ||
'oci': 'OracleAuthenticationStrategy' | ||
} | ||
|
||
|
||
def import_authentication_strategy(provider): | ||
strategy_class = _strategies[provider] | ||
module = __import__('ScoutSuite.providers.{}.authentication_strategy'.format(provider), fromlist=[strategy_class]) | ||
authentication_strategy = getattr(module, strategy_class) | ||
return authentication_strategy | ||
|
||
|
||
def get_authentication_strategy(provider: str): | ||
""" | ||
Returns an authentication strategy implementation for a provider. | ||
:param provider: The authentication strategy | ||
""" | ||
return _strategies[provider]() | ||
authentication_strategy = import_authentication_strategy(provider) | ||
return authentication_strategy() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.