Skip to content

Commit

Permalink
Adds multi-profile support and create_role bug fix (#91)
Browse files Browse the repository at this point in the history
* Adds multi-profile support
* Fixes bug with create_role function triggering too early
---------

Co-authored-by: David Dearden <[email protected]>
  • Loading branch information
TylerTMizuyabu and david-dearden-ssc authored Jan 17, 2025
1 parent e6eca3a commit 12970e4
Show file tree
Hide file tree
Showing 60 changed files with 2,191 additions and 567 deletions.
12 changes: 12 additions & 0 deletions arch/templates/AuditAccountPreRequisitesPart1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ Parameters:
Type: String
Default: "python3.12"
Description: The python runtime to use for the compliance dashboard
DefaultCloudProfile:
Type: String
Description: The cloud profile to use when one is not provided by an account.

Conditions:
GenerateEvidenceBucketName: !Equals
Expand Down Expand Up @@ -408,6 +411,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

## GC02
GC02CheckAccountManagementPlanLambda:
Expand All @@ -425,6 +431,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC02CheckPasswordProtectionMechanismsLambda:
Condition: IsAuditAccount
Expand All @@ -441,3 +450,6 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile
18 changes: 18 additions & 0 deletions arch/templates/AuditAccountPreRequisitesPart2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Parameters:
Type: String
Default: "python3.12"
Description: The python runtime to use for the compliance dashboard
DefaultCloudProfile:
Type: String
Description: The cloud profile to use when one is not provided by an account.

Conditions:
IsAuditAccount: !Equals
Expand Down Expand Up @@ -48,6 +51,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC01CheckDedicatedAdminAccountLambda:
Condition: IsAuditAccount
Expand All @@ -64,6 +70,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

## GC02
GC02CheckIAMPasswordPolicyLambda:
Expand All @@ -81,6 +90,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC02CheckGroupAccessConfigurationLambda:
Condition: IsAuditAccount
Expand All @@ -97,6 +109,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC02CheckPrivilegedRolesReviewLambda:
Condition: IsAuditAccount
Expand All @@ -113,3 +128,6 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile
30 changes: 30 additions & 0 deletions arch/templates/AuditAccountPreRequisitesPart3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Parameters:
Type: String
Default: "python3.12"
Description: The python runtime to use for the compliance dashboard
DefaultCloudProfile:
Type: String
Description: The cloud profile to use when one is not provided by an account.

Conditions:
IsAuditAccount: !Equals
Expand Down Expand Up @@ -54,6 +57,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

## GC08
GC08CheckTargetNetworkArchitectureLambda:
Expand All @@ -71,6 +77,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC08CheckCloudDeploymentGuideLambda:
Condition: IsAuditAccount
Expand All @@ -87,6 +96,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC08CheckCloudSegmentationDesignLambda:
Condition: IsAuditAccount
Expand All @@ -103,6 +115,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

## GC09
GC09CheckNetworkSecurityArchitectureDocumentLambda:
Expand All @@ -120,6 +135,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC09CheckNonPublicStorageAccountsLambda:
Condition: IsAuditAccount
Expand All @@ -136,6 +154,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

## GC10
GC10CheckCyberCenterSensorsLambda:
Expand All @@ -153,6 +174,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC10CheckSignedMOULambda:
Condition: IsAuditAccount
Expand All @@ -169,6 +193,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

## GC11
GC11CheckSecurityContactLambda:
Expand All @@ -186,3 +213,6 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile
57 changes: 57 additions & 0 deletions arch/templates/AuditAccountPreRequisitesPart4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Parameters:
Type: String
Default: "python3.12"
Description: The python runtime to use for the compliance dashboard
DefaultCloudProfile:
Type: String
Description: The cloud profile to use when one is not provided by an account.

Conditions:
IsAuditAccount: !Equals
Expand Down Expand Up @@ -50,6 +53,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC11CheckMonitoringUseCasesLambda:
Condition: IsAuditAccount
Expand All @@ -66,6 +72,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC11CheckPolicyEventLoggingLambda:
Condition: IsAuditAccount
Expand All @@ -82,6 +91,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC11CheckTimezoneLambda:
Condition: IsAuditAccount
Expand All @@ -98,6 +110,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC11CheckTrailLoggingLambda:
Condition: IsAuditAccount
Expand All @@ -114,6 +129,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

## GC12
GC12CheckMarketplacesLambda:
Expand All @@ -131,6 +149,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

## GC01
GC01CheckRootAccountMFAEnabledLambda:
Expand All @@ -148,6 +169,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC01CheckFederatedUsersMFA:
Condition: IsAuditAccount
Expand All @@ -164,6 +188,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC01CheckMonitoringAndLoggingLambda:
Condition: IsAuditAccount
Expand All @@ -180,6 +207,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC01CheckAlertsFlagMisuseLambda:
Condition: IsAuditAccount
Expand All @@ -196,6 +226,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC01CheckMFADigitalPolicy:
Condition: IsAuditAccount
Expand All @@ -212,6 +245,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

## GC03
GC03CheckEndpointAccessConfigLambda:
Expand All @@ -229,6 +265,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC03CheckIAMCloudWatchAlarmsLambda:
Condition: IsAuditAccount
Expand All @@ -245,6 +284,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC03CheckTrustedDevicesAdminAccessLambda:
Condition: IsAuditAccount
Expand All @@ -261,6 +303,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

## GC13
GC13EmergencyAccountManagementLambda:
Expand All @@ -278,6 +323,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC13EmergencyAccountMgmtApprovalsLambda:
Condition: IsAuditAccount
Expand All @@ -294,6 +342,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC13EmergencyAccountAlertsLambda:
Condition: IsAuditAccount
Expand All @@ -310,6 +361,9 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile

GC13EmergencyAccountTestingLambda:
Condition: IsAuditAccount
Expand All @@ -326,3 +380,6 @@ Resources:
LoggingConfig:
LogGroup: !Sub "${OrganizationName}gc_guardrails"
LogFormat: "JSON"
Environment:
Variables:
DEFAULT_CLOUD_PROFILE: !Ref DefaultCloudProfile
Loading

0 comments on commit 12970e4

Please sign in to comment.