🥒 CCC.VPC Test: cfi-1776043305-vpc

Test Parameters

ServiceTypevpc
ProviderServiceTypeec2:vpc
CatalogTypesCCC.VPC
TagFilter@MAIN, @CCC.VPC
UIDvpc-05f4e0d1e4eccf07f
ResourceNamecfi-1776043305-vpc
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:45

Total Run Time: 16s

Features: 4

Scenarios: 7 (✅ 7 | ❌ 0)

Steps: 80 (✅ 80 | ❌ 0 | ⏭️ 0 | ❓ 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"59µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"156µs
And I refer to "{result}" as "vpcService"31µs
When I call "{vpcService}" with "CountDefaultVpcs"119ms
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"42µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"162µs
And I refer to "{result}" as "vpcService"16µs
Given I refer to "{UID}" as "TargetVpcId"12µs
When I call "{vpcService}" with "EvaluatePublicSubnetDefaultIPControl" using argument "{TargetVpcId}"315ms
Then "{result.ViolatingSubnetCount}" is "0"78µs
And "{result.Reason}" contains "disable default public IP"28µs
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"40µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"149µs
And I refer to "{result}" as "vpcService"19µs
Given I refer to "{UID}" as "TargetVpcId"19µs
When I call "{vpcService}" with "SelectPublicSubnetForTest" using argument "{TargetVpcId}"239ms
And I refer to "{result.SubnetId}" as "TestSubnetId"52µs
And I call "{vpcService}" with "CreateTestResourceInSubnet" using argument "{TestSubnetId}"2s
And I refer to "{result.ResourceId}" as "TestResourceId"38µs
And I call "{vpcService}" with "GetResourceExternalIpAssignment" using argument "{TestResourceId}"162ms
And I refer to "{result.HasExternalIp}" as "HasExternalIp"40µs
Then "{HasExternalIp}" is false17µs
When I call "{vpcService}" with "DeleteTestResource" using argument "{TestResourceId}"417ms
Then "{result.Deleted}" is true41µs
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"31µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"139µs
And I refer to "{result}" as "vpcService"22µ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"20µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"16µs
And "{ReceiverVpcId}" is not nil14µs
When I call "{vpcService}" with "ValidateDisallowListEnforcement" using argument "{ReceiverVpcId}"180ms
And I attach "{result.Summary}" to the test output as "Disallow-list Enforcement Summary"58µs
And I attach "{result.Results}" to the test output as "Disallow-list Enforcement"62µs
Then "{result.ListDefined}" is true31µs
And "{result.TestedCount}" should be greater than "0"40µs
And "{result.AllCorrect}" is true26µ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 (6439 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: d533c3e3-a43d-4482-8eea-5db9b7c8e4e9, 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: z_6LUwseruCA406tjuUcZ7III66QjyZSr5W7t_6NyJgPv8Q1Fy9s_jsn4VvPo_jqOrOUOwWK9W2jT3dIeQcMgcaHSMuBJiHABa60SpdbwUJ1Mv_DKbs1X-_eypsxTbsFaweTKeOtI6V8FVnRWf6I-w0nspeZFNrfvYfPlIMGGJX4JzKSO3v6_4X4R7HVxWwd6n_-hlVzUX5gwIMgvFeu_IJSauaGXnUsVCxWJU8_gdiuL2cnX1jG8rNXdIgyumOVzC5Q441vvgQsgC8yGE1QO0fwMDVG1wCA0BT1yqsXToyd31nVjKuiwCQseabwx3YVFBZKBt_7bl3LqtEGXctcPKa0t3PE46PZl3Zx9qYeM_soERQeeDSpzw2Bz4SKdWFvVz-uaRchHoncCvnB32DIXJu9tpnsugesl_9vJdXTBKlJIRG6v5uKA1UESqsPOz00AhtiZgLCazZS0HXb86sonibAUghi8dZKqbd-HGPP7AnvJGIsrAD_IrfraR3JOz_JaqBtcjH82RQ0gj4bNW4u2EpLHOaHpkoDbmGnDz4RALFMm_14BU87_sKXp4bBR5SLxpmZwALL0xFKGIqY7bmLsnVl0j9yLsxXekMeWgWlh2Rn1vW6x9DuX4XBhK_eukedq_G0GZwbzhXX6MUxQctoZhd2aPjnwqgrYVsaNUbRFEp5LWkP52QACAQ1ssmkz48MVEAJupGnxpmclWfV-qXdbaSaJd9WeFuUX0g77OE1Xpr19B5i2HseL-vVOZRV0RiBoXZpUFQzDdFmXb9CcbpJ764A; 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: d533c3e3-a43d-4482-8eea-5db9b7c8e4e9, 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: z_6LUwseruCA406tjuUcZ7III66QjyZSr5W7t_6NyJgPv8Q1Fy9s_jsn4VvPo_jqOrOUOwWK9W2jT3dIeQcMgcaHSMuBJiHABa60SpdbwUJ1Mv_DKbs1X-_eypsxTbsFaweTKeOtI6V8FVnRWf6I-w0nspeZFNrfvYfPlIMGGJX4JzKSO3v6_4X4R7HVxWwd6n_-hlVzUX5gwIMgvFeu_IJSauaGXnUsVCxWJU8_gdiuL2cnX1jG8rNXdIgyumOVzC5Q441vvgQsgC8yGE1QO0fwMDVG1wCA0BT1yqsXToyd31nVjKuiwCQseabwx3YVFBZKBt_7bl3LqtEGXctcPKa0t3PE46PZl3Zx9qYeM_soERQeeDSpzw2Bz4SKdWFvVz-uaRchHoncCvnB32DIXJu9tpnsugesl_9vJdXTBKlJIRG6v5uKA1UESqsPOz00AhtiZgLCazZS0HXb86sonibAUghi8dZKqbd-HGPP7AnvJGIsrAD_IrfraR3JOz_JaqBtcjH82RQ0gj4bNW4u2EpLHOaHpkoDbmGnDz4RALFMm_14BU87_sKXp4bBR5SLxpmZwALL0xFKGIqY7bmLsnVl0j9yLsxXekMeWgWlh2Rn1vW6x9DuX4XBhK_eukedq_G0GZwbzhXX6MUxQctoZhd2aPjnwqgrYVsaNUbRFEp5LWkP52QACAQ1ssmkz48MVEAJupGnxpmclWfV-qXdbaSaJd9WeFuUX0g77OE1Xpr19B5i2HseL-vVOZRV0RiBoXZpUFQzDdFmXb9CcbpJ764A"},{"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: 903f0ff7-3113-4ec9-bb20-ed6f2861b0d2, 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: zMAvYln3Gqc5dqpAuS2Tdd5koXFm1GWINo2HngRmLK7M-HrSMm55AwB9BmNsi4tNQ5cqcEz2XozlbytNFmDNzXrQAXfHhD9Bp3S7tOpcN7X-dh7i7crmDyXwIuuCDafjA_2b4j-5ipbWoLzFbu7WM_TNsZ9OGRJ-qDDm4hb2InTkjqvI85YRTpBjbvrcOay503BUzVETof-82GSAIYBReRXG2g8nfSyk_vMsaRQAtbSdOCYGzigqEXpit2AwxTuvNz7G0W0QMymOPeakZdmKRMgJ0FugXIgF4TUwiC0XJTt57-lizcLaJD-UUBnvjC1zuxm-2hzqx-ZI91Hu_qxM5aSkF8I-dEThBBT6-3DsOhn9Fs7oOmNuMB0FD9r_F97SB8cY8oAwZx3ajigQ7X-TaNzQ1tifGZRHwYluJ7REELUiQW-mFS6iI6WMlQ_He6LMue8Un1Zv6LpGFTncmc2c8z8C_yV5Ra-yexgWazaeH3UYUbNaYelpEvKKt9aJBVP6HfXzdjeF9NI2lvElB4zsTOgnZryjAZJSSIhIB6Yo68JNLmEX8K_0-MgMKavLUWGbhPPQT79iWW0smKdN3Cfg0SxbueBwqfK-a8XUXKjKwyP56p13tKzgZQe4HBLxGwkeVEXnRavTAUiKgWArz7dY90tAMNwgBX9-2wYQ0dbwYVG72z-Ag3TfND9iYyEUSGfEHI6kCdwavvEbcPplyqTXQjzVTj8Ra0R9a5F6MLPQuhBMYH7oHxubMxfCQGMPD522VYR90xbgjlDhN3pza3_THwFJ; 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: 903f0ff7-3113-4ec9-bb20-ed6f2861b0d2, 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: zMAvYln3Gqc5dqpAuS2Tdd5koXFm1GWINo2HngRmLK7M-HrSMm55AwB9BmNsi4tNQ5cqcEz2XozlbytNFmDNzXrQAXfHhD9Bp3S7tOpcN7X-dh7i7crmDyXwIuuCDafjA_2b4j-5ipbWoLzFbu7WM_TNsZ9OGRJ-qDDm4hb2InTkjqvI85YRTpBjbvrcOay503BUzVETof-82GSAIYBReRXG2g8nfSyk_vMsaRQAtbSdOCYGzigqEXpit2AwxTuvNz7G0W0QMymOPeakZdmKRMgJ0FugXIgF4TUwiC0XJTt57-lizcLaJD-UUBnvjC1zuxm-2hzqx-ZI91Hu_qxM5aSkF8I-dEThBBT6-3DsOhn9Fs7oOmNuMB0FD9r_F97SB8cY8oAwZx3ajigQ7X-TaNzQ1tifGZRHwYluJ7REELUiQW-mFS6iI6WMlQ_He6LMue8Un1Zv6LpGFTncmc2c8z8C_yV5Ra-yexgWazaeH3UYUbNaYelpEvKKt9aJBVP6HfXzdjeF9NI2lvElB4zsTOgnZryjAZJSSIhIB6Yo68JNLmEX8K_0-MgMKavLUWGbhPPQT79iWW0smKdN3Cfg0SxbueBwqfK-a8XUXKjKwyP56p13tKzgZQe4HBLxGwkeVEXnRavTAUiKgWArz7dY90tAMNwgBX9-2wYQ0dbwYVG72z-Ag3TfND9iYyEUSGfEHI6kCdwavvEbcPplyqTXQjzVTj8Ra0R9a5F6MLPQuhBMYH7oHxubMxfCQGMPD522VYR90xbgjlDhN3pza3_THwFJ"}]
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"53µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"133µs
And I refer to "{result}" as "vpcService"16µ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 nil15µs
Given "{NonAllowlistedRequesterVpcId}" is not nil17µs
When I call "{vpcService}" with "EvaluatePeerAgainstAllowList" using argument "{NonAllowlistedRequesterVpcId}"87µs
Then "{result.AllowedListDefined}" is true21µs
And "{result.Allowed}" is false20µs
When I call "{vpcService}" with "AttemptVpcPeeringDryRun" using arguments "{NonAllowlistedRequesterVpcId}" and "{ReceiverVpcId}"111ms
Then "{result.DryRunAllowed}" is false49µs
And "{result.AllowListDefined}" is true22µs
And "{result.RequesterInAllowList}" is false33µs
And "{result.GuardrailExpectation}" is "deny"22µs
And "{result.GuardrailMismatch}" is false29µs
And "{result.ExitCode}" should be greater than "0"26µs
And "{result.Reason}" contains "guardrail aligned"36µs
And "{result.ConflictType}" is ""19µ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"29µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"297µs
And I refer to "{result}" as "vpcService"42µs
Given I refer to "{UID}" as "TargetVpcId"21µs
When I call "{vpcService}" with "EvaluateVpcFlowLogsControl" using argument "{TargetVpcId}"68ms
Then "{result.FlowLogCount}" should be greater than "0"47µs
And "{result.NonCompliantCount}" is "0"23µ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"32µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"148µs
And I refer to "{result}" as "vpcService"24µs
Given I refer to "{UID}" as "TargetVpcId"22µs
When I call "{vpcService}" with "PrepareFlowLogDeliveryObservation" using argument "{TargetVpcId}"138ms
And I call "{vpcService}" with "GenerateTestTraffic" using argument "{TargetVpcId}"13s
And I refer to "{result.ResourceId}" as "TestResourceId"54µs
And I refer to "{result.CleanupDeleted}" as "TrafficCleanupDeleted"21µs
And I call "{vpcService}" with "ObserveRecentFlowLogDelivery" using argument "{TargetVpcId}"38ms
And I refer to "{result.RecordsObserved}" as "RecordsObserved"33µs
And I call "{vpcService}" with "DeleteTestResource" using argument "{TestResourceId}"420ms
Then "{result.Deleted}" is true51µs
And "{TrafficCleanupDeleted}" is true19µs
And "{RecordsObserved}" is true30µs