🥒 CCC.VPC Test: cfi-20260409t081624z-vpc-bad

Test Parameters

ServiceTypevpc
ProviderServiceTypeec2:vpc
CatalogTypesCCC.VPC
TagFilter@MAIN, @CCC.VPC, ~@NEGATIVE, ~@OPT_IN
UIDvpc-022fefc877eaaa292
ResourceNamecfi-20260409t081624z-vpc-bad
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": {
        "bad-vpc-id": "vpc-022fefc877eaaa292",
        "cn03-allowed-requester-vpc-ids": null,
        "cn03-allowed-requester-vpc-ids-csv": "vpc-04a9b036faceb51c1,vpc-0d4a9192631c747b6",
        "cn03-disallowed-requester-vpc-ids": null,
        "cn03-disallowed-requester-vpc-ids-csv": "vpc-05cd70ec8c2768550,vpc-0891a4a861e79a190",
        "cn03-non-allowlisted-requester-vpc-id": "vpc-0285333a6cb68dde8",
        "cn03-receiver-vpc-id": "vpc-0538ea308fdf4f8c4",
        "cn04-flow-log-group-name": "/aws/vpc/flow-logs/cfi-20260409t081624z-vpc"
      }
    }
  ],
  "Rules": {
    "permitted-account-ids": "",
    "permitted-regions": [
      "us-east-1"
    ]
  }
}
AwsCloudTrailLogGroupNamecfi-test-log-group
BadVpcIdvpc-022fefc877eaaa292
Cn03AllowedRequesterVpcIdsCsvvpc-04a9b036faceb51c1,vpc-0d4a9192631c747b6
Cn03DisallowedRequesterVpcIdsCsvvpc-05cd70ec8c2768550,vpc-0891a4a861e79a190
Cn03NonAllowlistedRequesterVpcIdvpc-0285333a6cb68dde8
Cn03ReceiverVpcIdvpc-0538ea308fdf4f8c4
Cn04FlowLogGroupName/aws/vpc/flow-logs/cfi-20260409t081624z-vpc
ObjectStorageRetentionPeriodDays2
PermittedRegions
[
  "us-east-1"
]
Provideraws
Regionus-east-1

Summary

Generated: 2026-04-09 08:26:15

Total Run Time: 36s

Features: 4

Scenarios: 7 (✅ 1 | ❌ 6)

Steps: 80 (✅ 62 | ❌ 6 | ⏭️ 12 | ❓ 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"40µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"221µs
And I refer to "{result}" as "vpcService"21µs
When I call "{vpcService}" with "CountDefaultVpcs"356ms
Then "{result}" is "0"74µ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"35µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"145µs
And I refer to "{result}" as "vpcService"24µs
Given I refer to "{UID}" as "TargetVpcId"22µs
When I call "{vpcService}" with "EvaluatePublicSubnetDefaultIPControl" using argument "{TargetVpcId}"693ms
Then "{result.ViolatingSubnetCount}" is "0"70µs
expected {result.ViolatingSubnetCount} to equal '0', got '2'
And "{result.Reason}" contains "disable default public IP"29µ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"706µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"273µs
And I refer to "{result}" as "vpcService"21µs
Given I refer to "{UID}" as "TargetVpcId"19µs
When I call "{vpcService}" with "SelectPublicSubnetForTest" using argument "{TargetVpcId}"590ms
And I refer to "{result.SubnetId}" as "TestSubnetId"47µs
And I call "{vpcService}" with "CreateTestResourceInSubnet" using argument "{TestSubnetId}"7s
And I refer to "{result.ResourceId}" as "TestResourceId"39µs
And I call "{vpcService}" with "GetResourceExternalIpAssignment" using argument "{TestResourceId}"154ms
And I refer to "{result.HasExternalIp}" as "HasExternalIp"49µs
Then "{HasExternalIp}" is false36µs
expected {HasExternalIp} to be falsy, got true (type: bool)
When I call "{vpcService}" with "DeleteTestResource" using argument "{TestResourceId}"52µs
Then "{result.Deleted}" is true22µ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"35µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"143µs
And I refer to "{result}" as "vpcService"26µs
And I refer to "{UID}" as "ReceiverVpcId"17µs
And I refer to "{Cn03NonAllowlistedRequesterVpcId}" as "NonAllowlistedRequesterVpcId"16µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"20µs
And "{ReceiverVpcId}" is not nil19µs
When I call "{vpcService}" with "ValidateDisallowListEnforcement" using argument "{ReceiverVpcId}"596ms
And I attach "{result.Summary}" to the test output as "Disallow-list Enforcement Summary"143µs
And I attach "{result.Results}" to the test output as "Disallow-list Enforcement"181µs
Then "{result.ListDefined}" is true86µs
And "{result.TestedCount}" should be greater than "0"101µs
And "{result.AllCorrect}" is true82µs
expected {result.AllCorrect} to be truthy, got false (type: bool)
And "{result.ViolationCount}" is "0"50µs
📎 Attachments:
Disallow-list Enforcement Summary
View Content (50 bytes)
2 of 2 disallow-list VPC(s) had guardrail mismatch
Disallow-list Enforcement
View JSON (1649 bytes)
[{"AllowListDefined":true,"ConflictMessage":"non-allowlisted requester permitted by guardrail policy","ConflictType":"DENYLIST_CONFLICT","DryRunAllowed":true,"ErrorCode":"DryRunOperation","ExitCode":0,"GuardrailExpectation":"deny","GuardrailMismatch":true,"Origin":"terraform-fixture","PeerOwnerId":"","PeerVpcId":"vpc-022fefc877eaaa292","Reason":"DryRunOperation indicates request would be allowed; CN03 guardrail mismatch: allow-list expects deny for requester vpc-05cd70ec8c2768550","ReceiverVpcId":"vpc-022fefc877eaaa292","RequesterInAllowList":false,"RequesterVpcId":"vpc-05cd70ec8c2768550","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 412, RequestID: 42a09f30-ba63-47a8-943d-af6aee01d5bd, api error DryRunOperation: Request would have succeeded, but DryRun flag is set."},{"AllowListDefined":true,"ConflictMessage":"non-allowlisted requester permitted by guardrail policy","ConflictType":"DENYLIST_CONFLICT","DryRunAllowed":true,"ErrorCode":"DryRunOperation","ExitCode":0,"GuardrailExpectation":"deny","GuardrailMismatch":true,"Origin":"terraform-fixture","PeerOwnerId":"","PeerVpcId":"vpc-022fefc877eaaa292","Reason":"DryRunOperation indicates request would be allowed; CN03 guardrail mismatch: allow-list expects deny for requester vpc-0891a4a861e79a190","ReceiverVpcId":"vpc-022fefc877eaaa292","RequesterInAllowList":false,"RequesterVpcId":"vpc-0891a4a861e79a190","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 412, RequestID: abe3943b-4a8d-4108-9838-a24fc238beef, api error DryRunOperation: Request would have succeeded, but DryRun flag is set."}]
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"33µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"140µs
And I refer to "{result}" as "vpcService"25µs
And I refer to "{UID}" as "ReceiverVpcId"23µs
And I refer to "{Cn03NonAllowlistedRequesterVpcId}" as "NonAllowlistedRequesterVpcId"16µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"18µs
And "{ReceiverVpcId}" is not nil15µs
Given "{NonAllowlistedRequesterVpcId}" is not nil17µs
When I call "{vpcService}" with "EvaluatePeerAgainstAllowList" using argument "{NonAllowlistedRequesterVpcId}"91µs
Then "{result.AllowedListDefined}" is true24µs
And "{result.Allowed}" is false19µs
When I call "{vpcService}" with "AttemptVpcPeeringDryRun" using arguments "{NonAllowlistedRequesterVpcId}" and "{ReceiverVpcId}"390ms
Then "{result.DryRunAllowed}" is false45µs
expected {result.DryRunAllowed} to be falsy, got true (type: bool)
And "{result.AllowListDefined}" is true22µs
And "{result.RequesterInAllowList}" is false23µs
And "{result.GuardrailExpectation}" is "deny"26µs
And "{result.GuardrailMismatch}" is false23µs
And "{result.ExitCode}" should be greater than "0"27µs
And "{result.Reason}" contains "guardrail aligned"25µs
And "{result.ConflictType}" is ""22µ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"34µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"132µs
And I refer to "{result}" as "vpcService"24µs
Given I refer to "{UID}" as "TargetVpcId"16µs
When I call "{vpcService}" with "EvaluateVpcFlowLogsControl" using argument "{TargetVpcId}"317ms
Then "{result.FlowLogCount}" should be greater than "0"98µs
expected {result.FlowLogCount} (0) to be greater than 0
And "{result.NonCompliantCount}" is "0"27µ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"36µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"144µs
And I refer to "{result}" as "vpcService"25µs
Given I refer to "{UID}" as "TargetVpcId"27µs
When I call "{vpcService}" with "PrepareFlowLogDeliveryObservation" using argument "{TargetVpcId}"355ms
And I call "{vpcService}" with "GenerateTestTraffic" using argument "{TargetVpcId}"23s
And I refer to "{result.ResourceId}" as "TestResourceId"66µs
And I refer to "{result.CleanupDeleted}" as "TrafficCleanupDeleted"37µs
And I call "{vpcService}" with "ObserveRecentFlowLogDelivery" using argument "{TargetVpcId}"112ms
And I refer to "{result.RecordsObserved}" as "RecordsObserved"62µs
And I call "{vpcService}" with "DeleteTestResource" using argument "{TestResourceId}"1s
Then "{result.Deleted}" is true48µs
And "{TrafficCleanupDeleted}" is true23µs
And "{RecordsObserved}" is true25µs
expected {RecordsObserved} to be truthy, got false (type: bool)