🥒 CCC.VPC Test: cfi-1776043305-vpc-cn03-disallowed-requester-02

Test Parameters

ServiceTypevpc
ProviderServiceTypeec2:vpc
CatalogTypesCCC.VPC
TagFilter@MAIN, @CCC.VPC
UIDvpc-0fd941576fc1de4a0
ResourceNamecfi-1776043305-vpc-cn03-disallowed-requester-02
Instance
{
  "ID": "main-aws",
  "Properties": {
    "Provider": "aws",
    "Region": "us-east-1",
    "AzureResourceGroup": "",
    "AzureSubscriptionID": "",
    "GcpProjectId": ""
  },
  "Services": [
    {
      "Type": "object-storage",
      "Properties": {
        "object-storage-retention-period-days": 2
      }
    },
    {
      "Type": "logging",
      "Properties": {
        "aws-cloud-trail-log-group-name": "cfi-test-log-group"
      }
    },
    {
      "Type": "vpc",
      "Properties": {
        "cn03-allowed-requester-vpc-ids": [
          "vpc-02b2cf8649cae372a,vpc-09f36d618737b4da7"
        ],
        "cn03-disallowed-requester-vpc-ids": [
          "vpc-0351e15653a529b6c,vpc-0fd941576fc1de4a0"
        ],
        "cn03-receiver-vpc-id": "vpc-05f4e0d1e4eccf07f"
      }
    }
  ],
  "Rules": {
    "permitted-account-ids": "",
    "permitted-regions": [
      "us-east-1"
    ]
  }
}
AwsCloudTrailLogGroupNamecfi-test-log-group
Cn03AllowedRequesterVpcIds
[
  "vpc-02b2cf8649cae372a,vpc-09f36d618737b4da7"
]
Cn03DisallowedRequesterVpcIds
[
  "vpc-0351e15653a529b6c,vpc-0fd941576fc1de4a0"
]
Cn03ReceiverVpcIdvpc-05f4e0d1e4eccf07f
ObjectStorageRetentionPeriodDays2
PermittedRegions
[
  "us-east-1"
]
Provideraws
Regionus-east-1

Summary

Generated: 2026-04-13 01:30:44

Total Run Time: 1s

Features: 4

Scenarios: 7 (✅ 3 | ❌ 4)

Steps: 80 (✅ 73 | ❌ 4 | ⏭️ 3 | ❓ 0)

Feature: CCC.VPC.CN01.AR01 - Subscription must not contain default network resources
Scenario: Main check: no default VPC exists @vpc @tlp-amber @tlp-red @CCC.VPC.CN01 @CCC.VPC.CN01.AR01 @Policy @MAIN @CCC.VPC @DEFAULT
Given a cloud api for "{Instance}" in "api"52µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"161µs
And I refer to "{result}" as "vpcService"13µs
When I call "{vpcService}" with "CountDefaultVpcs"155ms
Then "{result}" is "0"26µs
Feature: CCC.VPC.CN02.AR01 - No external IP by default in public subnets
Scenario: Main check (config): public subnets do not auto-assign external IPs @vpc @tlp-red @CCC.VPC.CN02 @CCC.VPC.CN02.AR01 @Policy @MAIN @CCC.VPC @DEFAULT
Given a cloud api for "{Instance}" in "api"38µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"152µs
And I refer to "{result}" as "vpcService"13µs
Given I refer to "{UID}" as "TargetVpcId"11µs
When I call "{vpcService}" with "EvaluatePublicSubnetDefaultIPControl" using argument "{TargetVpcId}"155ms
Then "{result.ViolatingSubnetCount}" is "0"41µs
And "{result.Reason}" contains "disable default public IP"31µs
expected {result.Reason} to contain 'disable default public IP', but got 'no public subnets found for in-scope VPC'
Scenario: Behavioural check (active): resource launched in public subnet is not assigned an external IP @vpc @tlp-red @CCC.VPC.CN02 @CCC.VPC.CN02.AR01 @Behavioural @MAIN @CCC.VPC
Given a cloud api for "{Instance}" in "api"32µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"168µs
And I refer to "{result}" as "vpcService"22µs
Given I refer to "{UID}" as "TargetVpcId"23µs
When I call "{vpcService}" with "SelectPublicSubnetForTest" using argument "{TargetVpcId}"80ms
And I refer to "{result.SubnetId}" as "TestSubnetId"44µs
And I call "{vpcService}" with "CreateTestResourceInSubnet" using argument "{TestSubnetId}"30µs
And I refer to "{result.ResourceId}" as "TestResourceId"19µs
And I call "{vpcService}" with "GetResourceExternalIpAssignment" using argument "{TestResourceId}"21µs
And I refer to "{result.HasExternalIp}" as "HasExternalIp"16µs
Then "{HasExternalIp}" is false22µs
When I call "{vpcService}" with "DeleteTestResource" using argument "{TestResourceId}"18µs
Then "{result.Deleted}" is true25µs
expected {result.Deleted} to be truthy, got (type: )
Feature: CCC.VPC.CN03.AR01 - Restrict VPC peering requests from non-allowlisted requesters
Scenario: Enforcement proof (dry-run): all disallowed requesters are denied against in-scope receiver VPC @vpc @tlp-amber @tlp-red @CCC.VPC.CN03 @CCC.VPC.CN03.AR01 @Destructive @MAIN @DEFAULT @CCC.VPC
Given a cloud api for "{Instance}" in "api"74µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"228µs
And I refer to "{result}" as "vpcService"24µs
And I load environment variable "CN03_RECEIVER_VPC_ID" as "ReceiverVpcId"26µs
And I load environment variable "CN03_NON_ALLOWLISTED_REQUESTER_VPC_ID" as "NonAllowlistedRequesterVpcId"35µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"24µs
And "{ReceiverVpcId}" is not nil20µs
When I call "{vpcService}" with "ValidateDisallowListEnforcement" using argument "{ReceiverVpcId}"198ms
And I attach "{result.Summary}" to the test output as "Disallow-list Enforcement Summary"48µs
And I attach "{result.Results}" to the test output as "Disallow-list Enforcement"79µs
Then "{result.ListDefined}" is true32µs
And "{result.TestedCount}" should be greater than "0"34µs
And "{result.AllCorrect}" is true19µs
And "{result.ViolationCount}" is "0"21µs
📎 Attachments:
Disallow-list Enforcement Summary
View Content (56 bytes)
all 2 disallow-list VPC(s) correctly denied by guardrail
Disallow-list Enforcement
View JSON (6443 bytes)
[{"AllowListDefined":true,"ConflictMessage":"","ConflictType":"","DryRunAllowed":false,"ErrorCode":"UnauthorizedOperation","ExitCode":1,"GuardrailExpectation":"deny","GuardrailMismatch":false,"Origin":"terraform-fixture","PeerOwnerId":"","PeerVpcId":"vpc-05f4e0d1e4eccf07f","Reason":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 403, RequestID: 5ee7c87f-1045-4ed2-94c5-a39c3345583b, api error UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:sts::211203495394:assumed-role/TerraformRole/GitHubActions is not authorized to perform: ec2:CreateVpcPeeringConnection on resource: arn:aws:ec2:us-east-1:211203495394:vpc-peering-connection/* with an explicit deny in an identity-based policy: arn:aws:iam::211203495394:policy/CN03PeeringGuardrail. Encoded authorization failure message: dkbmQQu9ZtNEyUIL4GmGYmtQL-jSZj0qw9TxsTYimd_sG9kEc_PKOcfKuY7T2QzEqapRqKGYCUg0kANzImUkXgpqSh6K8ODBUecfgf_Jz_16t_KwJNCoV_RC6niExxInpsL3J8NOBbOKtSpuKVPt2gGhrXUKZFWf3_-4gl1Gv94lUQYkVJcyhSCGthq4BhLqme9L_CWLTHI7qjIJ2xf0RPA0uw1fDlv7HaRhmyjD_PgrJGGUW9F8ComE2EysthAdo0RTGmV-_lPJvnqmX4nnjjGg4g-S0DfxlvjhG3p8QMrl56DFGMNQOTPZkPEr_P1IE3_bpO_CAfYGozD8cWgMhjPO43Iu4rOb6vC4Na82cfucja1BRTU5TjDYDmEQE7DF7KpeZvC5hwpE-82V8HlE1phoa5f3zR88wJuk7_Um62h9MHz18TYKmZwhWNatVA6g3wdhwXH7ZwNCN08xwoV22GH-IAXJ0K_aZ0z5MuaYJsCpKQVyJGczJi8BNkdi4RiSBlp0l7yG4nr398gLYOnnYXf8iDp7sY1DJog-uW3X6B3GrDW6RndcqC0uaQKvIiOzfpq6Xe73JEZsydBkISUA6PUD8TPyDdANFTYQ_IbgI3RxxGztuctgTfxFbptT_V-cktcOKloOeZ2jpon254oZ_fCsNWoyU8aeK_CgWt2UTYs7Z85dbaa-I-Ywf8joAQfyTr9_x-bQov_vrlBOYmuB7Blo-6jrvQXzE7mb0quh_c1IEcfofI120z2mwbV1TgSieuB3Yvt8QjcE5KWm_MTjZ2US; CN03 guardrail aligned: allow-list expects deny for requester vpc-0351e15653a529b6c","ReceiverVpcId":"vpc-05f4e0d1e4eccf07f","RequesterInAllowList":false,"RequesterVpcId":"vpc-0351e15653a529b6c","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 403, RequestID: 5ee7c87f-1045-4ed2-94c5-a39c3345583b, api error UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:sts::211203495394:assumed-role/TerraformRole/GitHubActions is not authorized to perform: ec2:CreateVpcPeeringConnection on resource: arn:aws:ec2:us-east-1:211203495394:vpc-peering-connection/* with an explicit deny in an identity-based policy: arn:aws:iam::211203495394:policy/CN03PeeringGuardrail. Encoded authorization failure message: dkbmQQu9ZtNEyUIL4GmGYmtQL-jSZj0qw9TxsTYimd_sG9kEc_PKOcfKuY7T2QzEqapRqKGYCUg0kANzImUkXgpqSh6K8ODBUecfgf_Jz_16t_KwJNCoV_RC6niExxInpsL3J8NOBbOKtSpuKVPt2gGhrXUKZFWf3_-4gl1Gv94lUQYkVJcyhSCGthq4BhLqme9L_CWLTHI7qjIJ2xf0RPA0uw1fDlv7HaRhmyjD_PgrJGGUW9F8ComE2EysthAdo0RTGmV-_lPJvnqmX4nnjjGg4g-S0DfxlvjhG3p8QMrl56DFGMNQOTPZkPEr_P1IE3_bpO_CAfYGozD8cWgMhjPO43Iu4rOb6vC4Na82cfucja1BRTU5TjDYDmEQE7DF7KpeZvC5hwpE-82V8HlE1phoa5f3zR88wJuk7_Um62h9MHz18TYKmZwhWNatVA6g3wdhwXH7ZwNCN08xwoV22GH-IAXJ0K_aZ0z5MuaYJsCpKQVyJGczJi8BNkdi4RiSBlp0l7yG4nr398gLYOnnYXf8iDp7sY1DJog-uW3X6B3GrDW6RndcqC0uaQKvIiOzfpq6Xe73JEZsydBkISUA6PUD8TPyDdANFTYQ_IbgI3RxxGztuctgTfxFbptT_V-cktcOKloOeZ2jpon254oZ_fCsNWoyU8aeK_CgWt2UTYs7Z85dbaa-I-Ywf8joAQfyTr9_x-bQov_vrlBOYmuB7Blo-6jrvQXzE7mb0quh_c1IEcfofI120z2mwbV1TgSieuB3Yvt8QjcE5KWm_MTjZ2US"},{"AllowListDefined":true,"ConflictMessage":"","ConflictType":"","DryRunAllowed":false,"ErrorCode":"UnauthorizedOperation","ExitCode":1,"GuardrailExpectation":"deny","GuardrailMismatch":false,"Origin":"terraform-fixture","PeerOwnerId":"","PeerVpcId":"vpc-05f4e0d1e4eccf07f","Reason":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 403, RequestID: 270139ef-27e2-4b46-b754-005a57dc6f16, api error UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:sts::211203495394:assumed-role/TerraformRole/GitHubActions is not authorized to perform: ec2:CreateVpcPeeringConnection on resource: arn:aws:ec2:us-east-1:211203495394:vpc-peering-connection/* with an explicit deny in an identity-based policy: arn:aws:iam::211203495394:policy/CN03PeeringGuardrail. Encoded authorization failure message: HFDbHV80j3yLcZf_ZesazMAtBVtVpqFDdYuOhy_YVMvQmUs5C-VlItE7zQqyWCnewqbO2SMReKzxBtf5DAb0fAMyS4ecloUiHLLIaCD99xYYH9LyLdqx3mKDR9z_F6AFfbbemk4eriXgtT6AmVqiVINNv4aOMIbBYXCjCBZSy4dk_w1b0B9mxXVV-a8crNU712hD0EhgFDQrg6Bc4lNqKIEftQsIeHOKq1bJJJCOA34y0NBXni83vpa1hrtgMxDv2wXxH7C-MCSSTurNwbO4QF_uP4mkhdS7LT37MiTVAAJcvEmEvy0TNvDNZ6lziZrRJPLKearH6QEUKKLXH5dWlj8SP8Mjj_OZYXgyW8OmydHCKIckvDAgukk2bQLeq20ZuIv5VZ-AvSERsgjqKlUI6ih-jrTriLKphmkT2omrkvulH3TM3r8OpJeDMkwZaTtzy5WwJA2nMqXemM8OlG7XUsMkIimKUJdoN2CruPRgqfCnUtz5qfNlObWymDqVIdK3cWD7rd9rAAvAA9RngMFNK6M52ZGLd4sJUwWCrlnzcYswrVRjuxzU3xdP5slbdh78lUCdpoak0SClYmq2wHVU29T-eYvoUI71XMbg9PUPhECIAsHwyPH4FQMbqf6gajJ2vLuPSt-xWDV8Tr52QLOT9CpB9-9lqycxBBP6elI0A2Q8psi6jtT9U7re8-Ylwz6A7k-eEW4yyLqPzMyWnMvU4XcL8m2kqm8ONyWeYEcOEAW8f79R2Dzpz_ga78wnCZyW6U4rPA_g6eH8p84k_jmHPBFN9A; CN03 guardrail aligned: allow-list expects deny for requester vpc-0fd941576fc1de4a0","ReceiverVpcId":"vpc-05f4e0d1e4eccf07f","RequesterInAllowList":false,"RequesterVpcId":"vpc-0fd941576fc1de4a0","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 403, RequestID: 270139ef-27e2-4b46-b754-005a57dc6f16, api error UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:sts::211203495394:assumed-role/TerraformRole/GitHubActions is not authorized to perform: ec2:CreateVpcPeeringConnection on resource: arn:aws:ec2:us-east-1:211203495394:vpc-peering-connection/* with an explicit deny in an identity-based policy: arn:aws:iam::211203495394:policy/CN03PeeringGuardrail. Encoded authorization failure message: HFDbHV80j3yLcZf_ZesazMAtBVtVpqFDdYuOhy_YVMvQmUs5C-VlItE7zQqyWCnewqbO2SMReKzxBtf5DAb0fAMyS4ecloUiHLLIaCD99xYYH9LyLdqx3mKDR9z_F6AFfbbemk4eriXgtT6AmVqiVINNv4aOMIbBYXCjCBZSy4dk_w1b0B9mxXVV-a8crNU712hD0EhgFDQrg6Bc4lNqKIEftQsIeHOKq1bJJJCOA34y0NBXni83vpa1hrtgMxDv2wXxH7C-MCSSTurNwbO4QF_uP4mkhdS7LT37MiTVAAJcvEmEvy0TNvDNZ6lziZrRJPLKearH6QEUKKLXH5dWlj8SP8Mjj_OZYXgyW8OmydHCKIckvDAgukk2bQLeq20ZuIv5VZ-AvSERsgjqKlUI6ih-jrTriLKphmkT2omrkvulH3TM3r8OpJeDMkwZaTtzy5WwJA2nMqXemM8OlG7XUsMkIimKUJdoN2CruPRgqfCnUtz5qfNlObWymDqVIdK3cWD7rd9rAAvAA9RngMFNK6M52ZGLd4sJUwWCrlnzcYswrVRjuxzU3xdP5slbdh78lUCdpoak0SClYmq2wHVU29T-eYvoUI71XMbg9PUPhECIAsHwyPH4FQMbqf6gajJ2vLuPSt-xWDV8Tr52QLOT9CpB9-9lqycxBBP6elI0A2Q8psi6jtT9U7re8-Ylwz6A7k-eEW4yyLqPzMyWnMvU4XcL8m2kqm8ONyWeYEcOEAW8f79R2Dzpz_ga78wnCZyW6U4rPA_g6eH8p84k_jmHPBFN9A"}]
Scenario: Enforcement proof (dry-run): non-allowlisted requester is denied even when not explicitly listed as disallowed @vpc @tlp-amber @tlp-red @CCC.VPC.CN03 @CCC.VPC.CN03.AR01 @Destructive @MAIN @CCC.VPC
Given a cloud api for "{Instance}" in "api"26µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"130µs
And I refer to "{result}" as "vpcService"14µs
And I load environment variable "CN03_RECEIVER_VPC_ID" as "ReceiverVpcId"17µs
And I load environment variable "CN03_NON_ALLOWLISTED_REQUESTER_VPC_ID" as "NonAllowlistedRequesterVpcId"19µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"16µs
And "{ReceiverVpcId}" is not nil16µs
Given "{NonAllowlistedRequesterVpcId}" is not nil20µs
When I call "{vpcService}" with "EvaluatePeerAgainstAllowList" using argument "{NonAllowlistedRequesterVpcId}"92µs
Then "{result.AllowedListDefined}" is true22µs
And "{result.Allowed}" is false22µs
When I call "{vpcService}" with "AttemptVpcPeeringDryRun" using arguments "{NonAllowlistedRequesterVpcId}" and "{ReceiverVpcId}"187ms
Then "{result.DryRunAllowed}" is false38µs
And "{result.AllowListDefined}" is true22µs
And "{result.RequesterInAllowList}" is false21µs
And "{result.GuardrailExpectation}" is "deny"26µs
And "{result.GuardrailMismatch}" is false18µs
And "{result.ExitCode}" should be greater than "0"24µs
And "{result.Reason}" contains "guardrail aligned"22µs
And "{result.ConflictType}" is ""20µs
Feature: CCC.VPC.CN04.AR01 - Flow logs must capture all VPC traffic
Scenario: Main check (config): flow logs are active and capture all traffic @vpc @tlp-amber @tlp-red @CCC.VPC.CN04 @CCC.VPC.CN04.AR01 @Policy @MAIN @DEFAULT @CCC.VPC
Given a cloud api for "{Instance}" in "api"32µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"121µs
And I refer to "{result}" as "vpcService"19µs
Given I refer to "{UID}" as "TargetVpcId"18µs
When I call "{vpcService}" with "EvaluateVpcFlowLogsControl" using argument "{TargetVpcId}"72ms
Then "{result.FlowLogCount}" should be greater than "0"77µs
expected {result.FlowLogCount} (0) to be greater than 0
And "{result.NonCompliantCount}" is "0"24µs
Scenario: Behavioral check (active): traffic produces flow log records @vpc @tlp-amber @tlp-red @CCC.VPC.CN04 @CCC.VPC.CN04.AR01 @Behavioural @MAIN @CCC.VPC
Given a cloud api for "{Instance}" in "api"43µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"161µs
And I refer to "{result}" as "vpcService"17µs
Given I refer to "{UID}" as "TargetVpcId"22µs
When I call "{vpcService}" with "PrepareFlowLogDeliveryObservation" using argument "{TargetVpcId}"66ms
And I call "{vpcService}" with "GenerateTestTraffic" using argument "{TargetVpcId}"207ms
And I refer to "{result.ResourceId}" as "TestResourceId"47µs
And I refer to "{result.CleanupDeleted}" as "TrafficCleanupDeleted"22µs
And I call "{vpcService}" with "ObserveRecentFlowLogDelivery" using argument "{TargetVpcId}"43ms
And I refer to "{result.RecordsObserved}" as "RecordsObserved"225µs
And I call "{vpcService}" with "DeleteTestResource" using argument "{TestResourceId}"75µs
Then "{result.Deleted}" is true64µs
expected {result.Deleted} to be truthy, got (type: )
And "{TrafficCleanupDeleted}" is true37µs
And "{RecordsObserved}" is true41µs