-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
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
Empty file modified
0
local-app/python-tools/cross-organization/check_tgw_attachments.py
100644 → 100755
Empty file.
15 changes: 15 additions & 0 deletions
15
local-app/python-tools/cross-organization/generate-cloudtrail-stop.sh
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,15 @@ | ||
| #!/bin/bash | ||
|
|
||
| FILE=$1 | ||
| if [ -z $FILE ] | ||
| then | ||
| echo "* missing $FILE" | ||
| exit 1 | ||
| fi | ||
| if [ ! -r $FILE ] | ||
| then | ||
| echo "* cannot read $FILE" | ||
| exit 1 | ||
| fi | ||
|
|
||
| awk -F, '{print "aws --profile",$2 "-" $3,"--region",$4,"cloudtrail","stop-logging","--name",$5}' $FILE |
Empty file.
Empty file modified
0
local-app/python-tools/cross-organization/remediate_tgw_dns.py
100644 → 100755
Empty file.
7 changes: 7 additions & 0 deletions
7
local-app/python-tools/cross-organization/run.check_iam_roles.sh
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,7 @@ | ||
| #!/bin/bash | ||
|
|
||
| ORG="ent-gov" | ||
| REGION="us-gov-east-1" | ||
| CHECK="check_iam_roles" | ||
|
|
||
| ./org_runner.py --profile $ORG.org --region $REGION --role-name r-inf-org-controller --output --enable-checks $CHECK 2>&1 |& tee $ORG.$CHECK.$(date +%s).txt |
6 changes: 6 additions & 0 deletions
6
local-app/python-tools/cross-organization/run.check_tgw_attachments.sh
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,6 @@ | ||
| #!/bin/bash | ||
|
|
||
| ORG="ent-gov" | ||
| REGION="us-gov-east-1" | ||
|
|
||
| ./org_runner.py --profile $ORG.org --region $REGION --role-name r-inf-org-controller --output --enable-checks check_tgw_attachments 2>&1 |& tee $ORG.check_tgw_attachments.$(date +%s).txt |
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,17 @@ | ||
| #!/bin/bash | ||
|
|
||
| STAMP=$(date +%s) | ||
| for f in lab-gov ent-gov ent-ew | ||
| do | ||
| if [ $f == "ent-ew" ] | ||
| then | ||
| REGION="us-east-1" | ||
| else | ||
| REGION="us-gov-east-1" | ||
| fi | ||
|
|
||
| echo "# $f" | ||
| ./org_runner.py --profile $f.org --region $REGION --role-name r-inf-org-controller --output --enable-checks check_cloudtrail check_config 2>&1 |& tee org_runner.$f.txt | ||
| mkdir $f.$STAMP | ||
| mv org_runner.$f.txt audit_results.* $f.$STAMP/ | ||
| done |