🥒 CCC.VPC Test: cfi-1776044303-vpc-bad

Test Parameters

ServiceTypevpc
ProviderServiceTypeec2:vpc
CatalogTypesCCC.VPC
TagFilter@MAIN, @CCC.VPC, ~@NEGATIVE, ~@OPT_IN
UIDvpc-08d29b9a77c3a1931
ResourceNamecfi-1776044303-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-08d29b9a77c3a1931",
        "cn03-allowed-requester-vpc-ids": null,
        "cn03-allowed-requester-vpc-ids-csv": "vpc-00edf4476fa81d898,vpc-035f0b812cb80ea99",
        "cn03-disallowed-requester-vpc-ids": null,
        "cn03-disallowed-requester-vpc-ids-csv": "vpc-06343230833672ab6,vpc-08678ebdbec637832",
        "cn03-non-allowlisted-requester-vpc-id": "vpc-030739f6bd57beef0",
        "cn03-receiver-vpc-id": "vpc-0232d940ac1e052fc",
        "cn04-flow-log-group-name": "/aws/vpc/flow-logs/cfi-1776044303-vpc"
      }
    }
  ],
  "Rules": {
    "permitted-account-ids": "",
    "permitted-regions": [
      "us-east-1"
    ]
  }
}
AwsCloudTrailLogGroupNamecfi-test-log-group
BadVpcIdvpc-08d29b9a77c3a1931
Cn03AllowedRequesterVpcIdsCsvvpc-00edf4476fa81d898,vpc-035f0b812cb80ea99
Cn03DisallowedRequesterVpcIdsCsvvpc-06343230833672ab6,vpc-08678ebdbec637832
Cn03NonAllowlistedRequesterVpcIdvpc-030739f6bd57beef0
Cn03ReceiverVpcIdvpc-0232d940ac1e052fc
Cn04FlowLogGroupName/aws/vpc/flow-logs/cfi-1776044303-vpc
ObjectStorageRetentionPeriodDays2
PermittedRegions
[
  "us-east-1"
]
Provideraws
Regionus-east-1

Summary

Generated: 2026-04-13 01:47:32

Total Run Time: 18s

Features: 4

Scenarios: 7 (✅ 2 | ❌ 5)

Steps: 80 (✅ 65 | ❌ 5 | ⏭️ 10 | ❓ 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"37µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"109µs
And I refer to "{result}" as "vpcService"13µs
When I call "{vpcService}" with "CountDefaultVpcs"290ms
Then "{result}" is "0"44µ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"37µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"160µs
And I refer to "{result}" as "vpcService"25µs
Given I refer to "{UID}" as "TargetVpcId"24µs
When I call "{vpcService}" with "EvaluatePublicSubnetDefaultIPControl" using argument "{TargetVpcId}"468ms
Then "{result.ViolatingSubnetCount}" is "0"57µs
expected {result.ViolatingSubnetCount} to equal '0', got '2'
And "{result.Reason}" contains "disable default public IP"36µ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"48µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"141µs
And I refer to "{result}" as "vpcService"24µs
Given I refer to "{UID}" as "TargetVpcId"23µs
When I call "{vpcService}" with "SelectPublicSubnetForTest" using argument "{TargetVpcId}"365ms
And I refer to "{result.SubnetId}" as "TestSubnetId"47µs
And I call "{vpcService}" with "CreateTestResourceInSubnet" using argument "{TestSubnetId}"2s
And I refer to "{result.ResourceId}" as "TestResourceId"63µs
And I call "{vpcService}" with "GetResourceExternalIpAssignment" using argument "{TestResourceId}"327ms
And I refer to "{result.HasExternalIp}" as "HasExternalIp"36µs
Then "{HasExternalIp}" is false19µs
When I call "{vpcService}" with "DeleteTestResource" using argument "{TestResourceId}"437ms
Then "{result.Deleted}" is true55µ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"45µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"125µs
And I refer to "{result}" as "vpcService"16µs
And I refer to "{UID}" as "ReceiverVpcId"14µs
And I refer to "{Cn03NonAllowlistedRequesterVpcId}" as "NonAllowlistedRequesterVpcId"12µ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}"342ms
And I attach "{result.Summary}" to the test output as "Disallow-list Enforcement Summary"70µs
And I attach "{result.Results}" to the test output as "Disallow-list Enforcement"100µs
Then "{result.ListDefined}" is true74µs
And "{result.TestedCount}" should be greater than "0"36µs
And "{result.AllCorrect}" is true45µs
expected {result.AllCorrect} to be truthy, got false (type: bool)
And "{result.ViolationCount}" is "0"21µ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-08d29b9a77c3a1931","Reason":"DryRunOperation indicates request would be allowed; CN03 guardrail mismatch: allow-list expects deny for requester vpc-06343230833672ab6","ReceiverVpcId":"vpc-08d29b9a77c3a1931","RequesterInAllowList":false,"RequesterVpcId":"vpc-06343230833672ab6","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 412, RequestID: f44d1568-5704-452e-822c-31db3d91ab21, 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-08d29b9a77c3a1931","Reason":"DryRunOperation indicates request would be allowed; CN03 guardrail mismatch: allow-list expects deny for requester vpc-08678ebdbec637832","ReceiverVpcId":"vpc-08d29b9a77c3a1931","RequesterInAllowList":false,"RequesterVpcId":"vpc-08678ebdbec637832","Stderr":"operation error EC2: CreateVpcPeeringConnection, https response error StatusCode: 412, RequestID: 67ff3750-56ce-45cc-98db-fb4366444e20, 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"43µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"141µs
And I refer to "{result}" as "vpcService"28µs
And I refer to "{UID}" as "ReceiverVpcId"26µs
And I refer to "{Cn03NonAllowlistedRequesterVpcId}" as "NonAllowlistedRequesterVpcId"19µs
And I load environment variable "CN03_PEER_TRIAL_MATRIX_FILE" as "PeerTrialMatrixFile"18µs
And "{ReceiverVpcId}" is not nil14µs
Given "{NonAllowlistedRequesterVpcId}" is not nil16µs
When I call "{vpcService}" with "EvaluatePeerAgainstAllowList" using argument "{NonAllowlistedRequesterVpcId}"90µs
Then "{result.AllowedListDefined}" is true24µs
And "{result.Allowed}" is false19µs
When I call "{vpcService}" with "AttemptVpcPeeringDryRun" using arguments "{NonAllowlistedRequesterVpcId}" and "{ReceiverVpcId}"260ms
Then "{result.DryRunAllowed}" is false45µs
expected {result.DryRunAllowed} to be falsy, got true (type: bool)
And "{result.AllowListDefined}" is true21µs
And "{result.RequesterInAllowList}" is false24µs
And "{result.GuardrailExpectation}" is "deny"27µs
And "{result.GuardrailMismatch}" is false21µs
And "{result.ExitCode}" should be greater than "0"26µs
And "{result.Reason}" contains "guardrail aligned"24µs
And "{result.ConflictType}" is ""23µ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"120µs
And I refer to "{result}" as "vpcService"24µs
Given I refer to "{UID}" as "TargetVpcId"22µs
When I call "{vpcService}" with "EvaluateVpcFlowLogsControl" using argument "{TargetVpcId}"155ms
Then "{result.FlowLogCount}" should be greater than "0"50µs
expected {result.FlowLogCount} (0) to be greater than 0
And "{result.NonCompliantCount}" is "0"26µ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"34µs
And I call "{api}" with "GetServiceAPI" using argument "vpc"123µs
And I refer to "{result}" as "vpcService"25µs
Given I refer to "{UID}" as "TargetVpcId"15µs
When I call "{vpcService}" with "PrepareFlowLogDeliveryObservation" using argument "{TargetVpcId}"252ms
And I call "{vpcService}" with "GenerateTestTraffic" using argument "{TargetVpcId}"13s
And I refer to "{result.ResourceId}" as "TestResourceId"42µs
And I refer to "{result.CleanupDeleted}" as "TrafficCleanupDeleted"29µs
And I call "{vpcService}" with "ObserveRecentFlowLogDelivery" using argument "{TargetVpcId}"68ms
And I refer to "{result.RecordsObserved}" as "RecordsObserved"38µs
And I call "{vpcService}" with "DeleteTestResource" using argument "{TestResourceId}"397ms
Then "{result.Deleted}" is true48µs
And "{TrafficCleanupDeleted}" is true37µs
And "{RecordsObserved}" is true27µs
expected {RecordsObserved} to be truthy, got false (type: bool)