-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Google Cloud Config and App Profile Audit Capability (#1676)
Missing: * 2.12.1 * 2.14.7 * 3.1.1 (Asset inventory in my test environment is enabled with or without the API enabled) * 3.9.11 * 3.10.5
- Loading branch information
Showing
72 changed files
with
1,368 additions
and
41 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
24 changes: 24 additions & 0 deletions
24
...tSuite/output/data/html/partials/gcp/services.computeengine.projects.id.ssl_policies.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Compute Engine sslpolicies partial --> | ||
<script id="services.computeengine.projects.id.sslpolicies.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"> | ||
<div class="list-group-item-text">Profile: <span id="computeengine.projects.{{@../key}}.sslpolicies.{{@key}}.profile">{{profile}}</span></div> | ||
<div class="list-group-item-text">Minimum TLS Version: <span id="computeengine.projects.{{@../key}}.sslpolicies.{{@key}}.minTlsVersion">{{minTlsVersion}}</span></div> | ||
<div class="list-group-item-text">Fingerprint: <span id="computeengine.projects.{{@../key}}.sslpolicies.{{@key}}.fingerprint">{{fingerprint}}</span></div> | ||
</div> | ||
</script> | ||
|
||
<script> | ||
Handlebars.registerPartial("services.computeengine.projects.id.sslpolicies", $("#services\\.computeengine\\.projects\\.id\\.sslpolicies\\.partial").html()); | ||
</script> | ||
|
||
<!-- Single computeengine sslpolicy template --> | ||
<script id="single_computeengine_sslpolicy-template" type="text/x-handlebars-template"> | ||
{{> modal-template template='services.computeengine.projects.id.sslpolicies'}} | ||
</script> | ||
<script> | ||
var single_computeengine_sslpolicy_template = Handlebars.compile($("#single_computeengine_sslpolicy-template").html()); | ||
</script> |
32 changes: 32 additions & 0 deletions
32
ScoutSuite/output/data/html/partials/gcp/services.iam.projects.id.audit_configs.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
<!-- Cloud Resources Manager audit_configs' partial --> | ||
<script id="services.iam.projects.id.audit_configs.partial" type="text/x-handlebars-template"> | ||
<div id="resource-name" class="list-group-item active"> | ||
<h4 class="list-group-item-heading">{{service}}</h4> | ||
</div> | ||
<div class="list-group-item"> | ||
{{#each auditLogConfigs}} | ||
<h5 class="list-group-item-heading">{{logType}}</h5> | ||
<h6>Exempted Members</h6> | ||
<ul id="iam.projects.{{@../../key}}.audit_configs.{{@../key}}.auditLogConfigs.{{@key}}.exemptedMembers"> | ||
{{#each exemptedMembers}} | ||
<li><samp>{{this}}</samp></li> | ||
{{else}} | ||
<li><samp>None</samp></li> | ||
{{/each}} | ||
</ul> | ||
{{/each}} | ||
</div> | ||
</script> | ||
|
||
<script> | ||
Handlebars.registerPartial("services.iam.projects.id.audit_configs", $("#services\\.iam\\.projects\\.id\\.audit_configs\\.partial").html()); | ||
</script> | ||
|
||
<!-- Single iam audit_config template --> | ||
<script id="single_iam_audit_config-template" type="text/x-handlebars-template"> | ||
{{> modal-template template='services.iam.projects.id.audit_configs'}} | ||
</script> | ||
<script> | ||
var single_iam_audit_config_template = Handlebars.compile($("#single_iam_audit_config-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from ScoutSuite.core.console import print_exception | ||
from ScoutSuite.providers.gcp.facade.basefacade import GCPBaseFacade | ||
from ScoutSuite.providers.gcp.facade.utils import GCPFacadeUtils | ||
|
||
class EssentialContactsFacade(GCPBaseFacade): | ||
def __init__(self): | ||
super().__init__('essentialcontacts', 'v1') # API Client | ||
|
||
async def get_contacts(self, project_id: str): | ||
try: | ||
essentialcontacts_client = self._get_client() | ||
contacts = essentialcontacts_client.projects().contacts() | ||
request = contacts.list(parent=f"projects/{project_id}") | ||
results = await GCPFacadeUtils.get_all('contacts', request, contacts) | ||
return results | ||
except Exception as e: | ||
print_exception(f'Failed to list Essential Contacts: {e}') | ||
return [] |
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
Oops, something went wrong.