Controls
Controls are the rules that keep the environment safe. Logging can't be switched off. Nobody gets a permanent AWS login. Storage can't be opened to the public by accident.
Each rule is written as code and enforced automatically. Each one is also tested, in one of two ways: a read-only script checks the live accounts, or an automated test checks every change before it ships.
Each control here is traced through four links, from the written rule to a check anyone can rerun.
Which standards each control maps to, by ISO 27001, SOC 2 and other framework IDs. Classed one framework control at a time, they are on the compliance pages.
The figures below show how many rules passed their latest test. The table under them lists every rule, the code that enforces it and the test that proves it.
- Verified36/3625 by the live run, 11 by checks on every change
- Controls passing the run25/25run 11-15
- Failing0a regression shows here, not as a gap
- Risk-accepted findings →13each with a reason; a Guard exception expires
Control table
Table scrolls sideways. Result and control stay pinned. →
| Result | Control | What it enforces | Policy text | Attached to | Verified by | Frameworks |
|---|---|---|---|---|---|---|
| Organization policies | ||||||
| PASS | SCP-01 | Deny leaving the org, closing accounts and changing account contact or billing settings | org/hkb-org-scp.yamlhkb-scp-core-protection: Scp01DenyLeaveCloseAndAccountSettings | Root | INV-03 | ISO 2 SOC 2 2 |
| PASS | SCP-03 | Protect the security baseline: no stopping or deleting CloudTrail, Config, GuardDuty, Security Hub or Access Analyzer; hkb-baseline-* roles and stacks changed only by the StackSets execution role; IMDSv2 required at launch, with no switching back afterwards | org/hkb-org-scp.yamlhkb-scp-baseline-protection: Scp03DenyDisablingSecurityServices, Scp03DenyBaselineRoleChanges, Scp03DenyBaselineStackChanges | Root | INV-03 | ISO 3 SOC 2 2 |
| PASS | SCP-04 | No long-lived credentials: no IAM users, access keys or console passwords | org/hkb-org-scp.yamlhkb-scp-core-protection: Scp04DenyLongLivedCredentials | Root | INV-03, INV-05 | ISO 3 SOC 2 2 |
| PASS | SCP-05 | Data protection: account-level S3 Block Public Access can't be weakened; KMS keys are deleted only by the pipeline and AWS-managed deployment roles | org/hkb-org-scp.yamlhkb-scp-core-protection: Scp05DenyWeakeningS3PublicAccessBlock, Scp05DenyKmsKeyDeletion | Root | INV-03 | ISO 2 SOC 2 2 |
| PASS | SCP-06 | AI allowlist: Bedrock only in the Workloads and Sandbox OUs, approved models only, no provisioned throughput or customization | org/hkb-org-scp.yamlhkb-scp-ai-and-cost-guardrails: Scp06DenyBedrockOutsideWorkloadsAndSandbox, Scp06DenyUnapprovedModels, Scp06DenyThroughputAndCustomization | Root | INV-03 | ISO 1 SOC 2 2 |
| PASS | SCP-07 | Cost guardrails: EC2 and NAT only in Workloads and Sandbox, instance-type allowlist, no OpenSearch Serverless, reserved purchases or Marketplace subscriptions | org/hkb-org-scp.yamlhkb-scp-ai-and-cost-guardrails: Scp07DenyEc2AndNatOutsideWorkloadsAndSandbox, Scp07DenyUnapprovedInstanceTypes, Scp07DenyOpenSearchServerlessReservedAndMarketplace | Root | INV-03, INV-07, INV-08 | ISO 1 SOC 2 2 |
| PASS | SCP-08 | Deny all: quarantine for a compromised account | org/hkb-org-scp.yamlhkb-scp-suspended-deny-all: Scp08DenyAll | Suspended OU | INV-03 | ISO 2 SOC 2 1 |
| PASS | SCP-09 | Deny all root-user actions except task-scoped root sessions (D42) | org/hkb-org-scp.yamlhkb-scp-deny-root: Scp09DenyRootExceptTaskSessions | Each member account, directly | INV-03 | ISO 2 SOC 2 2 |
| PASS | SCP-10 | Sandbox isolation: no peering, Transit Gateway or resource shares, no roles in other accounts, no public IPs, Elastic IPs or internet-facing load balancers, narrow instance allowlist | org/hkb-org-scp.yamlhkb-scp-sandbox-guardrails: Scp10DenyPeeringTransitGatewayAndResourceShares, Scp10DenyAssumingRolesInOtherAccounts, Scp10DenyPublicIpsOnInstances, Scp10DenyElasticIps, Scp10DenyInternetFacingLoadBalancers, Scp10DenyUnapprovedInstanceTypes | Sandbox OU | INV-03, S5-02 | ISO 2 SOC 2 1 |
| PASS | RCP-01 | Data perimeter: S3, KMS, Secrets Manager and STS deny principals outside the org; AWS service principals exempt | org/hkb-org-rcp.yamlhkb-rcp-data-perimeter: Rcp01DenyPrincipalsOutsideOrganization | Root | INV-04 | ISO 3 SOC 2 3 |
| PASS | RCP-02 | Deny non-TLS requests to S3, KMS and Secrets Manager | org/hkb-org-rcp.yamlhkb-rcp-tls-only: Rcp02DenyNonTlsRequests | Root | INV-04 | ISO 2 SOC 2 1 |
| PASS | AIO-01 | Opt every account out of AWS AI services using content for service improvement | org/hkb-org-mgmt-policies.yamlhkb-aio-opt-out | Root | INV-04 | ISO 2 SOC 2 2 |
| PASS | TAG-01 | Standard tag keys and allowed values; report-only in Organizations, enforced in the pipeline by GR-03 | org/hkb-org-mgmt-policies.yamlhkb-tag-standard | Root | INV-04, S4-04 | ISO 1 SOC 2 1 |
| PASS | DEC-01 | Block public AMI sharing and all public snapshot sharing. IMDSv2 isn't part of it: Organizations rejects instance_metadata_defaults, so SCP-03 enforces it | org/hkb-org-declarative.yamlhkb-dec-ec2-baseline | Root | INV-04 | ISO 2 SOC 2 2 |
| Template rules (Guard) | ||||||
| PASS | GR-02 | Every IAM role HKB creates carries a permissions boundary | guard/rules/gr-02-role-boundary.guard | every template, in CI and Validate | S3-07 | ISO 2 SOC 2 2 |
| PASS | GR-03 | TAG-01 tag keys on taggable resources; hkb- names on named resources | guard/rules/gr-03-tags-and-names.guard | every template, in CI and Validate | S4-04 | ISO 1 |
| PASS | GR-04 | No IAM users, access keys or login profiles in any template (D8) | guard/rules/gr-04-no-iam-users.guard | every template, in CI and Validate | INV-05 | ISO 2 SOC 2 2 |
| GR-05 | S3 baseline: Block Public Access on, SSE-KMS, a bucket policy that denies non-TLS requests | guard/rules/gr-05-s3-baseline.guard | every template, in CI and Validate | none yet | ISO 2 SOC 2 2 | |
| GR-06 | Stateful resources retain on delete and replace; symmetric KMS keys rotate | guard/rules/gr-06-stateful-retain.guard | every template, in CI and Validate | none yet | ISO 2 SOC 2 2 | |
| Pipeline and repository checks | ||||||
| cfn-lint on every template | — | CI and Validate; blocks the pipeline | ||||
IAM Access Analyzer validate-policy on every policy in a template (fails on ERROR and SECURITY_WARNING) | — | Validate (pipeline/scripts/validate_policies.py); blocks the pipeline | ||||
| gitleaks secret scan | — | CI and Validate; blocks the pipeline | ||||
shellcheck on verify/ at warning severity | — | CI; advisory, R-03 | ||||
| Exceptions expiry: a past date fails, a date within 14 days warns | — | CI; advisory, R-03 | ||||
| Guard Rules Registry, Well-Architected Security Pillar set | — | Validate; does not block | ||||
| No IDs in templates; pipeline ID parameters are SSM-typed | — | verifier S2-11; does not block | ||||
| Two pipelines, each with its own orchestrator, stages and path-filtered trigger; the site deploy roles trust only the site orchestrator (step 3.14, DQ-82, ADR-0043) | — | verifier S2-14; does not block | ||||
| CI-01 | Checkov on every template in cfn-lint's list; each skipped check carries a reason and an expiry in guard/exceptions.yaml and a matching skip in the resource's Metadata (TL.6, DQ-140) | — | CI; advisory, R-03 | ISO 2 SOC 2 2 | ||
| Identity, alerting and cost | ||||||
| PASS | No IAM users | No IAM users in master or any readable member | — | — | INV-05 | |
| PASS | Retired master deployer | hkb-master-deployer is gone | — | — | S2-05 | |
| PASS | No cross-account trust into master | No IAM role in master trusts another account (Control Tower and service-linked roles excepted, and hkb-scanner, held to hkb-tool-prowler in Security under hkb-scanner-boundary) | — | — | S2-12 | |
| PASS | No Bootstrap-Admin access path | No Bootstrap-Admin assignment in any account and no bootstrap-admins group (DQ-21) | — | — | S2-07 | |
| PASS | Read-only access works | HKB-ReadOnly opens a session in every existing member | — | — | S1-05 | |
| PASS | Master alerts | Eight EventBridge rules enabled; hkb-master-alerts topic present | — | — | INV-09 | |
| PASS | No idle billable resources | No NAT gateways, Elastic IPs or EC2 outside the expected set | — | — | INV-07 | |
| PASS | Spend limit | Month-to-date spend under the stage limit | — | — | INV-08 | |
Child pages
Page information
- Owner
- Security Engineering
- Status
- current Current: generated from the templates and records in the repository at this build.
- Generated from
docs/evidence/README.md,site/content/controls-intro.md,guard- Linked from
- Architecture, Risk-accepted findings, Standards per control, ISO 27001 Statement of Applicability, SOC 2 view, Findings review and 16 more