Skip to content

Commit

Permalink
Access analyzer (duo-labs#811)
Browse files Browse the repository at this point in the history
* small typo caused this alert to be disabled.

* no impact typo fixes

* clarified command arguments and help text.

* make it easier for the next person to update task size.
  • Loading branch information
cbeltranbird authored Nov 30, 2020
1 parent f07b4fd commit 2eec87a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
6 changes: 5 additions & 1 deletion auditor/lib/cloudmapperauditor-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ class CloudmapperauditorStack extends cdk.Stack {
// Define the ECS task
const cluster = new ecs.Cluster(this, 'Cluster', { vpc });

const taskDefinition = new ecs.FargateTaskDefinition(this, 'taskDefinition', {});
const taskDefinition = new ecs.FargateTaskDefinition(this, 'taskDefinition', {
// Uncomment if you need to change resource limits of Fargate task definition and container
// memoryLimitMiB: 512,
// cpu: 256
});

taskDefinition.addContainer('cloudmapper-container', {
image: ecs.ContainerImage.fromAsset('./resources'),
Expand Down
2 changes: 1 addition & 1 deletion commands/audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def run(arguments):
)
parser.add_argument(
"--minimum_severity",
help="Only report issues that are greater than this. Default: LOW",
help="Only report issues that are greater than this. Default: INFO",
default="INFO",
choices=['CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'INFO', 'MUTE']
)
Expand Down
6 changes: 3 additions & 3 deletions commands/iam_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,19 +639,19 @@ def run(arguments):
parser = argparse.ArgumentParser()
parser.add_argument(
"--max-age",
help="Number of days a user or role hasn't been used before it's marked dead",
help="Number of days a user or role hasn't been used before it's marked dead. Default: 90",
default=90,
type=int,
)
parser.add_argument(
"--graph",
help="Do not create and display a graph",
help="Display a graph. Default: False",
dest="show_graph",
action="store_true",
)
parser.add_argument(
"--output",
help="Set the output type for the report",
help="Set the output type for the report. [json | html]. Default: html",
default=OutputFormat.html,
type=OutputFormat,
dest="requested_output"
Expand Down
2 changes: 1 addition & 1 deletion commands/sg_ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# The creation of the map and table of locations is all this does now, which is both
# not very valuable, and is difficult to setup (requires matplotlib, basemap data, and geoip data)

__description__ = "Find all IPs are that are given trusted access via Security Groups"
__description__ = "[Deprecated] Find all IPs are that are given trusted access via Security Groups"


def get_cidrs_for_account(account, cidrs):
Expand Down
2 changes: 1 addition & 1 deletion config/custom_auditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from shared.query import query_aws, get_parameter_file
from shared.common import Finding

# To use custom auditing, you must copy this file to ./private_commands/custom_auditory.py
# To use custom auditing, you must copy this file to ./private_commands/custom_auditor.py
# and uncomment and modify the functions below.

__description__ = "Custom auditing functions"
Expand Down
4 changes: 2 additions & 2 deletions shared/audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def audit_guardduty(findings, region):

def audit_accessanalyzer(findings, region):
analyzer_list_json = query_aws(
region.account, "accessanalzyer-list-analyzers", region
region.account, "accessanalyzer-list-analyzers", region
)
if not analyzer_list_json:
# Access Analyzer must not exist in this region (or the collect data is old)
Expand All @@ -224,7 +224,7 @@ def audit_accessanalyzer(findings, region):


def audit_iam(findings, region):
# By calling the code to find the admins, we'll excercise the code that finds problems.
# By calling the code to find the admins, we'll exercise the code that finds problems.
find_admins_in_account(region, findings)

# By default we get the findings for the admins, but we can also look for specific
Expand Down
2 changes: 1 addition & 1 deletion templates/iam_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Try to avoid this showing up in search results if accidently made public -->
<!-- Try to avoid this showing up in search results if accidentally made public -->
<meta name="robots" content="noindex">
<meta name="googlebot" content="noindex">

Expand Down
2 changes: 1 addition & 1 deletion templates/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Try to avoid this showing up in search results if accidently made public -->
<!-- Try to avoid this showing up in search results if accidentally made public -->
<meta name="robots" content="noindex">
<meta name="googlebot" content="noindex">

Expand Down

0 comments on commit 2eec87a

Please sign in to comment.